﻿// JScript File
//script to fade rotating images.

    // do not edit anything below this line
     var slideShowSpeed = 3000;
     var ClickhereSpeed = 3000;
     var crossFadeDuration = 3;
     var preLoadpics = new Image();
     var theNightpics = new Image();
     var theFantasypics = new Image();
     var theDaypics = new Image();
     var theWorkpics = new Image();
     var t;
     var tp;
     var j;
     var l;
     var p;
     var n;
     var s;
     var sp;
     var g;
     var gn;
     
     function prepareLadiesNightClickHere()
     {
              
        n = 0;
        np = theNight.length;
        for (i = 0; i < np; i++) {
            theNightpics[i] = new Image();
            theNightpics[i].src = theNight[i];
        }

        runClickHere()
     }
     
     function prepareWorkShopSlideShow()
     {
               
        g = 0;
        gn = theWorkShop.length;
        for (gnn = 0; gnn < gn; gnn++) {
            theWorkpics[gnn] = new Image();
            theWorkpics[gnn].src = theWorkShop[gnn];
        }

        runClickHereWork()
     
     }
     
     function prepareFantasyClickHere()
     {
              
        s = 0;
        sp = theFantasy.length;
        for (i = 0; i < np; i++) {
            theFantasypics[i] = new Image();
            theFantasypics[i].src = theFantasy[i];
        }

        runClickHereFantasy()
     }
         
     function prepareLadiesDayClickHere()
     {
              
        n = 0;
        nq = theDay.length;
        for (j = 0; j < nq; j++) {
            theDaypics[j] = new Image();
            theDaypics[j].src = theDay[j];
        }

        runClickHereDay()
     }
     
     function prepareEventsSlideShow()
     {
              
        j = 0;
        p = thePics.length;
        for (i = 0; i < p; i++) {
            preLoadpics[i] = new Image();
            preLoadpics[i].src = thePics[i];
        }

         runSlideShow()
     
     }
          
     function prepareContactUsSlideShow()
     {
       
          
        j = 0;
        p = thePics.length;
        for (i = 0; i < p; i++) {
            preLoadpics[i] = new Image();
            preLoadpics[i].src = thePics[i];
        }

        runSlideShow()
     
     }

    function prepareStudioSlideShow()
     {
       
        j = 0;
        p = thePics.length;
        for (i = 0; i < p; i++) {
            preLoadpics[i] = new Image();
            preLoadpics[i].src = thePics[i];
        }

        runSlideShow()
     
     }
     
     
     function prepareWorkSlideShow()
     {
       
        j = 0;
        p = thePics.length;
        for (i = 0; i < p; i++) {
            preLoadpics[i] = new Image();
            preLoadpics[i].src = thePics[i];
        }

        runSlideShow()
     
     }
 
     
     function prepareClassesSlideShow()
     {
       
   
        j = 0;
        p = thePics.length;
        for (i = 0; i < p; i++) {
            preLoadpics[i] = new Image();
            preLoadpics[i].src = thePics[i];
        }

        runSlideShow()
     
     }
 
 
 
 
    function runSlideShow() {

    
    if (document.all) {
        document.images.SlideShow.style.filter="blendTrans(duration=2)";
        document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)";
        document.images.SlideShow.filters.blendTrans.Apply();
    }
    document.images.SlideShow.src = preLoadpics[j].src;
    if (document.all) {
    document.images.SlideShow.filters.blendTrans.Play();
    }
        j = j + 1;
        if (j > (p - 1)) j = 0;
        t = setTimeout('runSlideShow()', slideShowSpeed);
    }
    
    function runClickHere() {

    
            if (document.all) {
                document.images.Clickhere.style.filter="blendTrans(duration=2)";
                document.images.Clickhere.style.filter="blendTrans(duration=crossFadeDuration)";
                document.images.Clickhere.filters.blendTrans.Apply();
            }
            document.images.Clickhere.src = theNightpics[n].src;
            if (document.all) {
            document.images.Clickhere.filters.blendTrans.Play();
            }
                n = n + 1;
                if (n > (np - 1)) n = 0;
                tp = setTimeout('runClickHere()', ClickhereSpeed);
    }
    
     function runClickHereWork() {

        
            if (document.all) {
                document.images.ClickhereWorkShop.style.filter="blendTrans(duration=2)";
                document.images.ClickhereWorkShop.style.filter="blendTrans(duration=crossFadeDuration)";
                document.images.ClickhereWorkShop.filters.blendTrans.Apply();
            }
            document.images.ClickhereWorkShop.src = theWorkpics[g].src;
            if (document.all) {
            document.images.ClickhereWorkShop.filters.blendTrans.Play();
            }
                g = g + 1;
                if (g > (gn - 1)) g = 0;
                tp = setTimeout('runClickHereWork()', ClickhereSpeed);
    }
    
    
    function runClickHereFantasy()
     {

    
            if (document.all) {
                document.images.ClickhereFantasy.style.filter="blendTrans(duration=2)";
                document.images.ClickhereFantasy.style.filter="blendTrans(duration=crossFadeDuration)";
                document.images.ClickhereFantasy.filters.blendTrans.Apply();
            }
            document.images.ClickhereFantasy.src = theFantasypics[n].src;
            if (document.all) {
            document.images.ClickhereFantasy.filters.blendTrans.Play();
            }
                s = s + 1;
                if (s > (sp - 1)) s = 0;
                tp = setTimeout('runClickHereFantasy()', ClickhereSpeed);
    }
    
    
    function runClickHereDay() {

    
            if (document.all) {
              
                document.images.ClickhereDay.style.filter="blendTrans(duration=2)";
                document.images.ClickhereDay.style.filter="blendTrans(duration=crossFadeDuration)";
                document.images.ClickhereDay.filters.blendTrans.Apply();
            }
            document.images.ClickhereDay.src = theDaypics[n].src;
            if (document.all) {
            document.images.ClickhereDay.filters.blendTrans.Play();
            }
                l= l + 1;
                if (l > (nq - 1)) l = 0;
                tp = setTimeout('runClickHereDay()', ClickhereSpeed);
                
    }
    


