// JavaScript Document

// Slideshow javascript 

    var slideimages=new Array()
    var slidelinks=new Array()
    
    function slideshowimages()
    {
        for (i=0;i<slideshowimages.arguments.length;i++)
	{
            slideimages[i]=new Image()
            slideimages[i].src=slideshowimages.arguments[i]
        }
    }

    function slideshowlinks()
    {
        for (i=0;i<slideshowlinks.arguments.length;i++)
	{
           slidelinks[i]=slideshowlinks.arguments[i]
	}
    }

    function gotoshow()
    {
        if (!window.winslide||winslide.closed)
	{
            winslide=window.open(slidelinks[whichlink])
	}
        else
	{
            winslide.location=slidelinks[whichlink]
	}
        winslide.focus()
    }
	
    //configure the paths of the images, plus corresponding target links
    slideshowimages(
                    "./images/1-GIFT.jpg",
                    "./images/2-SURFACT.jpg",
                    "./images/2.5-BREATHE-hands2.jpg",
                    "./images/3-GIFT.jpg",
                    "./images/3.5AXE-FORWEBS-S.jpg",
                    "./images/3.7-TYH-FORWEB-S.jpg", 
                    "./images/3.9-ENDGAME-FORWEB-S.jpg", 
                    "./images/4-CHRYSLER.jpg",
                    "./images/4.5LEVIS-FORWEB-S.jpg",
                    "./images/5-KNOCK_OUT.jpg",
                    "./images/6-KARENS_GUY.jpg",
                    "./images/6.5-DRINK-for web-S.jpg",
                    "./images/7-PLASTIC_SUNSHINE.jpg", 
                    "./images/8-PILGRIM.jpg",
                    "./images/9-SONGBIRD.jpg",
                    "./images/10-SURFACT.jpg",
                    "./images/10.5-BURIED.jpg",
                    "./images/11-GIFT.jpg",
                    "./images/11.5-InALonelyPlace.jpg", 
                    "./images/12-PLASTIC_SUNSHINE.jpg",
                    "./images/13-KARENS_GUY.jpg",
                    "./images/14-SURFACT.jpg",
                    "./images/15-COKE.jpg",
                    "./images/16-PILGRIM.jpg",
                    "./images/17-GIFT.jpg",
                    "./images/18-GIFT.jpg",
                    "./images/19-COKE.jpg",
                    "./images/20-SURFACT.jpg",
                    "./images/20.5-CB-HeretoRock.jpg", 
                    "./images/21-PILGRIM.jpg",
                    "./images/22-PLASTIC_SUNSHINE.jpg",
                    "./images/23-SURFACT.jpg",
                    "./images/24-SONGBIRD.jpg", 
                    "./images/25-uber.jpg", 
                    "./images/26-HEINEKEN-COMMERCIAL.jpg", 
                    "./images/28-DONT-READ.jpg")
                    
                    
    slideshowlinks(
                   "http://JohnAlanThompson.com/MusicVideo", 	/* 1*/
                   "http://JohnAlanThompson.com/MusicVideo",  /* 2*/
                   "http://JohnAlanThompson.com/Film",        /* 2.5*/
    		   				 "http://JohnAlanThompson.com/MusicVideo", 	/* 3*/
    		   				 "http://JohnAlanThompson.com/Commercial", 	/* 3.5*/
    		   				 "http://JohnAlanThompson.com/Film", 				/* 3.7*/
    		   				 "http://JohnAlanThompson.com/MusicVideo", 	/* 3.9*/
    		   				 "http://JohnAlanThompson.com/Commercial", 	/* 4*/
    		   				 "http://JohnAlanThompson.com/Commercial", 	/* 4.5*/
    		   				 "http://JohnAlanThompson.com/Commercial", 	/* 5*/
    		           "http://JohnAlanThompson.com/Film", 				/* 6*/
									 "http://JohnAlanThompson.com/Film", 				/* 6.5 */
    		           "http://JohnAlanThompson.com/Film",  			/* 7*/
    		           "http://JohnAlanThompson.com/MusicVideo", 	/* 8*/
    		           "http://JohnAlanThompson.com/Film", 				/* 9*/
    		           "http://JohnAlanThompson.com/MusicVideo", 	/*10*/
    		           "http://JohnAlanThompson.com/Film",  			/*10.5*/
    		           "http://JohnAlanThompson.com/MusicVideo", 	/*11*/
    		           "http://JohnAlanThompson.com/MusicVideo", 	/*11*.5/
    		           "http://JohnAlanThompson.com/Film", 				/*12*/
    		           "http://JohnAlanThompson.com/Film", 				/*13*/
    		           "http://JohnAlanThompson.com/MusicVideo", 	/*14*/
    		           "http://JohnAlanThompson.com/Commercial", 	/*15*/
    		           "http://JohnAlanThompson.com/MusicVideo", 	/*16*/
    		           "http://JohnAlanThompson.com/MusicVideo", 	/*17*/
    		           "http://JohnAlanThompson.com/MusicVideo", 	/*18*/
    		           "http://JohnAlanThompson.com/Commercial", 	/*19*/
    		           "http://JohnAlanThompson.com/MusicVideo", 	/*20*/
    		           "http://JohnAlanThompson.com/MusicVideo", 	/*20.5*/
    		           "http://JohnAlanThompson.com/MusicVideo", 	/*21*/
    		           "http://JohnAlanThompson.com/Film", 				/*22*/
    		           "http://JohnAlanThompson.com/MusicVideo", 	/*23*/
    		           "http://JohnAlanThompson.com/Film",  			/*24*/
    		           "http://JohnAlanThompson.com/MusicVideo",  /*25*/
    		           "http://JohnAlanThompson.com/Commercial",	/*26*/
    		           "http://JohnAlanThompson.com/Film")        /*28*/

    //configure the speed of the slideshow, in miliseconds
    var slideshowspeed=3000
    var whichlink=0
    var whichimage=0

    function slideit()
    {
        if (!document.images)
    	{
            return
        }
			
        document.images.mainRotatingImage.src=slideimages[whichimage].src
        whichlink=whichimage
        if (whichimage < slideimages.length-1)
        {
            whichimage++
        }
        else
        {
            whichimage=0
        }
        setTimeout("slideit()",slideshowspeed)
    }
