theimage = new Array();
theimage[0]=["slideshow/1.gif"];
theimage[1]=["slideshow/2.gif"];
theimage[2]=["slideshow/3.gif"];
theimage[3]=["slideshow/4.gif"];
theimage[4]=["slideshow/5.gif"];
theimage[5]=["slideshow/6.gif"];
theimage[6]=["slideshow/7.gif"];
theimage[7]=["slideshow/8.gif"];
theimage[8]=["slideshow/9.gif"];
theimage[9]=["slideshow/10.gif"];
theimage[10]=["slideshow/11.gif"];
theimage[11]=["slideshow/12.gif"];
theimage[12]=["slideshow/13.gif"];
theimage[13]=["slideshow/14.gif"];
theimage[14]=["slideshow/15.gif"];
theimage[15]=["slideshow/16.gif"];
theimage[16]=["slideshow/17.gif"];
theimage[17]=["slideshow/18.gif"];
theimage[18]=["slideshow/19.gif"];
theimage[19]=["slideshow/20.gif"];
theimage[20]=["slideshow/21.gif"];
theimage[21]=["slideshow/22.gif"];
theimage[22]=["slideshow/23.gif"];
theimage[23]=["slideshow/24.gif"];
theimage[24]=["slideshow/25.gif"];

playspeed=6000;
i=0;


window.onload=function(){

	
	preloadSlide();

	SetSlide(0);

}


function SetSlide(num) {
	
	i=num%theimage.length;
	
	if(i<0)i=theimage.length-1;

	document.images.imgslide.src=theimage[i][0];

}

function PlaySlide() {
	if (!window.playing) {
		PlayingSlide(i+1);
		if(document.slideshow.play){
			document.slideshow.play.value="   Stop   ";
		}
	}
	else {
		playing=clearTimeout(playing);
		if(document.slideshow.play){
			document.slideshow.play.value="   Play   ";
		}
	}
	
	if(document.images.imgPlay){
		setTimeout('document.images.imgPlay.src="'+imgStop+'"',1);
		imgStop=document.images.imgPlay.src
	}
}

function PlayingSlide(num) {
	playing=setTimeout('PlayingSlide(i+1);SetSlide(i+1);', playspeed);
}

function preloadSlide() {
	for(k=0;k<theimage.length;k++) {
		theimage[k][0]=new Image().src=theimage[k][0];
	}
}