﻿<!--

        var preLoad = new Array();
        var Picture = new Array();

        var agt = navigator.userAgent.toLowerCase();
        var is_major = parseInt(navigator.appVersion);
        var is_minor = parseFloat(navigator.appVersion);
        var is_gecko = (agt.indexOf('gecko') != -1);
        var is_ie = (agt.indexOf("msie") != -1);
        var is_opera = (agt.indexOf("opera") != -1);

        
        // Set the slideshow speed (in milliseconds)
        var SlideShowSpeed = 4000;

        // Set the duration of crossfade (in seconds)
        var CrossFadeDuration = 3;

        var preloadCounter;
        var diashowCounter = 1;
        var timer;

        function runSlideShow(siteId) {

            if (siteId == '2'){
                Picture[1] = '/Content/images/compo_09.jpg';
            }
            else if (siteId == '3'){
                Picture[1] = '/Content/images/compo_09.jpg';
            }
            else if (siteId == '1'){
                Picture[1] = '/Content/images/compo_05.jpg';
                Picture[2] = '/Content/images/compo_06.jpg';
                Picture[3] = '/Content/images/compo_02.jpg';
                Picture[4] = '/Content/images/compo_01.jpg';
                Picture[5] = '/Content/images/compo_08.jpg';
                Picture[6] = '/Content/images/compo_07.jpg';
                Picture[7] = '/Content/images/compo_04.jpg';
                Picture[8] = '/Content/images/compo_03.jpg';
            }

            var PictureArrayLength = Picture.length - 1;

            for (preloadCounter = 1; preloadCounter < PictureArrayLength + 1; preloadCounter++) {
                preLoad[preloadCounter] = new Image();
                preLoad[preloadCounter].src = Picture[preloadCounter];
            }

            if (is_gecko || is_opera) {
                document.images.PictureBox.src = preLoad[diashowCounter].src;
            }
            else {
                document.images.PictureBox.style.filter = "blendTrans(duration=2)";
                document.images.PictureBox.style.filter = "blendTrans(duration=CrossFadeDuration)";
                document.images.PictureBox.filters.blendTrans.Apply();
                document.images.PictureBox.src = preLoad[diashowCounter].src;
                document.images.PictureBox.filters.blendTrans.Play();
            }
            diashowCounter = diashowCounter + 1;
            if (diashowCounter > (PictureArrayLength)) diashowCounter = 1;
            timer = setTimeout('runSlideShow(\''+ siteId + '\')', SlideShowSpeed);
        }

        function stop() {
            window.clearTimeout(timer);
        }
//-->
