﻿i=0;  //key that holds where in the array currently are
			
			//###########################################
			function CreateSlideshow()
			{

				//preload images into browser
				preloadSlide();

				//set transitions
				document.imgslide.style.filter = "blendTrans(duration=1,transition=1)";

				//set the first slide
				SetSlide(0);

				//autoplay
				PlayingSlide();

			}

			//###########################################
			function SetSlide(num) {
				//too big
				i=num%theimage.length;
				//too small
				if(i<0)i=theimage.length-1;

				//switch the image
				if(document.all&&!window.opera)eval('document.images.imgslide.filters.blendTrans.Apply()')
				document.images.imgslide.src=theimage[i][0];
				if(document.all&&!window.opera)eval('document.images.imgslide.filters.blendTrans.Play()')
				
			}



			//###########################################
			function PlayingSlide() {
				playing=setTimeout('PlayingSlide();SetSlide(i+1);', playspeed);
			}


			//###########################################
			function preloadSlide() {
				for(k=0;k<theimage.length;k++) {
					theimage[k][0]=new Image().src=theimage[k][0];
				}
			}

			//###########################################
			function jumpTo(x)
			{

				clearTimeout(playing);
				SetSlide(x);
				PlayingSlide(x);
			}