﻿theimage = new Array();

// The dimensions of ALL the images should be the same or some of them may look stretched or reduced in Netscape 4.
// Format: theimage[...]=[image URL, link URL, name/description]

theimage[0]=["slidepics/Image01.jpg", "", ""];
theimage[1]=["slidepics/Image02.jpg", "", ""];
theimage[2]=["slidepics/Image03.jpg", "", ""];
theimage[3]=["slidepics/Image04.jpg", "", ""];
theimage[4]=["slidepics/Image05.jpg", "", ""];
theimage[5]=["slidepics/Image06.jpg", "", ""];
theimage[6]=["slidepics/Image07.jpg", "", ""];
theimage[7]=["slidepics/Image08.jpg", "", ""];
theimage[8]=["slidepics/Image09.jpg", "", ""];
theimage[9]=["slidepics/Image10.jpg", "", ""];
theimage[10]=["slidepics/Image11.jpg", "", ""]
theimage[11]=["slidepics/Image12.jpg", "", ""];
theimage[12]=["slidepics/Image13.jpg", "", ""]
theimage[13]=["slidepics/Image14.jpg", "", ""];
theimage[14]=["slidepics/Image15.jpg", "", ""];
theimage[15]=["slidepics/Image16.jpg", "", ""];
theimage[16]=["slidepics/Image17.jpg", "", ""];
theimage[17]=["slidepics/Image18.jpg", "", ""];
theimage[18]=["slidepics/Image19.jpg", "", ""];
theimage[19]=["slidepics/Image20.jpg", "", ""];
theimage[20]=["slidepics/Image21.jpg", "", ""];
theimage[21]=["slidepics/Image22.jpg", "", ""];
theimage[22]=["slidepics/Image23.jpg", "", ""];
theimage[23]=["slidepics/Image24.jpg", "", ""];
theimage[24]=["slidepics/Image25.jpg", "", ""];
theimage[25]=["slidepics/Image26.jpg", "", ""];
theimage[26]=["slidepics/Image27.jpg", "", ""];
theimage[27]=["slidepics/Image28.jpg", "", ""];
theimage[28]=["slidepics/Image29.jpg", "", ""];
theimage[29]=["slidepics/Image30.jpg", "", ""];
theimage[30]=["slidepics/Image31.jpg", "", ""];
theimage[31]=["slidepics/Image32.jpg", "", ""];
theimage[32]=["slidepics/Image33.jpg", "", ""]
theimage[33]=["slidepics/Image34.jpg", "", ""];
theimage[34]=["slidepics/Image35.jpg", "", ""]
theimage[35]=["slidepics/Image36.jpg", "", ""];
theimage[36]=["slidepics/Image37.jpg", "", ""];
theimage[37]=["slidepics/Image38.jpg", "", ""];
theimage[38]=["slidepics/Image39.jpg", "", ""];
theimage[39]=["slidepics/Image40.jpg", "", ""];
//theimage[40]=["slidepics/Image41.jpg", "", ""];
//theimage[41]=["slidepics/Image42.jpg", "", ""];
//theimage[42]=["slidepics/Image43.jpg", "", ""];
//theimage[43]=["slidepics/Image44.jpg", "", ""];
//theimage[44]=["slidepics/Image45.jpg", "", ""];
//theimage[45]=["slidepics/Image46.jpg", "", ""];
//theimage[46]=["slidepics/Image47.jpg", "", ""];
//theimage[47]=["slidepics/Image48.jpg", "", ""];
//theimage[48]=["slidepics/Image49.jpg", "", ""];
//theimage[49]=["slidepics/Image50.jpg", "", ""];


///// Plugin variables

playspeed=3000;// The playspeed determines the delay for the "Play" button in ms
dotrans=1; // if value = 1 then there are transitions played in IE
transtype='blendTrans';// 'blendTrans' or 'revealtrans'
transattributes='23';// duration=seconds,transition=#<24
//#####
//key that holds where in the array currently are
i=0;


//###########################################
window.onload=function(){

	//preload images into browser
	preloadSlide();

	//set transitions
	GetTrans();

	//set the first slide
	SetSlide(0);

	//autoplay
	PlaySlide();
}

//###########################################
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&&dotrans==1)eval('document.images.imgslide.filters.'+transtype+'.Apply()')
	document.images.imgslide.src=theimage[i][0];
	if(document.all&&!window.opera&&dotrans==1)eval('document.images.imgslide.filters.'+transtype+'.Play()')

	//if they want name of current slide
	//document.getElementById('slidebox').innerHTML=theimage[i][2];
	
	document.images.imgslide.alt=theimage[i][2];

}


//###########################################
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 you have to change the image for the "playing" slide
	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);
}


//###########################################
//desc: picks the transition to apply to the images
function GetTrans() {
	//si=document.slideshow.trans.selectedIndex;

		if((document.slideshow.trans && document.slideshow.trans.selectedIndex == 0) || (!document.slideshow.trans && dotrans==0)){
		dotrans=0;
	}
	else if ((document.slideshow.trans && document.slideshow.trans.selectedIndex == 1) || (!document.slideshow.trans && transtype == 'blendTrans')){
		dotrans=1;
		transtype='blendTrans';
		document.imgslide.style.filter = "blendTrans(duration=1,transition=1)";
	}else{
		dotrans=1;
		transtype='revealtrans';
		if(document.slideshow.trans) transattributes=document.slideshow.trans[document.slideshow.trans.selectedIndex].value;
		document.imgslide.style.filter = "revealTrans(duration=1,transition=" +transattributes+ ")";
	}

}
//###########################################
function preloadSlide() {
	for(k=0;k<theimage.length;k++) {
		theimage[k][0]=new Image().src=theimage[k][0];
	}
}