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]=["scans/o.gif", "contactla.htm",];
theimage[1]=["scans/new3.gif", "contactla.htm",];
theimage[2]=["scans/new1.gif", "contactla.htmm",];
theimage[3]=["scans/rec1.gif", "contactla.htmm",];
theimage[4]=["scans/rec2.gif", "contactla.htmm",];
theimage[5]=["scans/rec3.gif", "contactla.htmm",];
theimage[6]=["scans/rec4.gif", "contactla.htmm",];
theimage[7]=["scans/rec5.gif", "contactla.htmm",];
theimage[8]=["scans/rec6.gif", "contactla.htmm",];
theimage[9]=["scans/1.jpg", "contactla.htm",];
theimage[10]=["scans/2.jpg", "contactla.htm",];
theimage[11]=["scans/3.jpg", "contactla.htm",];
theimage[12]=["scans/4.jpg", "contactla.htmm",];
theimage[13]=["scans/5.jpg", "contactla.htm",];
theimage[14]=["scans/bil1.gif", "contactla.htm",];
theimage[15]=["scans/bil2.gif", "contactla.htm",];
theimage[16]=["scans/rand.gif", "contactla.htm",];
theimage[17]=["scans/7.jpg", "contactla.htm",];
theimage[18]=["scans/9.jpg", "contactla.htm",];
theimage[19]=["scans/10.jpg", "contactla.htm",];
theimage[20]=["scans/13.jpg", "contactla.htm",];
theimage[21]=["scans/15.jpg", "contactla.htm",];
theimage[22]=["scans/16.jpg", "contactla.htm",];
theimage[23]=["scans/17.jpg", "contactla.htm",];
theimage[24]=["scans/18.jpg", "contactla.htm",];
theimage[25]=["scans/19a.jpg", "contactla.htm",];
theimage[26]=["scans/20.jpg", "contactla.htm",];
theimage[27]=["scans/21.jpg", "contactla.htm",];
theimage[28]=["scans/23.jpg", "contactla.htm",];
theimage[29]=["scans/25.jpg", "contactla.htm",];
theimage[30]=["scans/30.jpg", "contactla.htm",];
theimage[31]=["scans/a.gif", "contactla.htm",];
theimage[32]=["scans/b.gif", "contactla.htm",];
theimage[33]=["scans/c.JPG", "contactla.htm",];
theimage[34]=["scans/d.gif", "contactla.htm",];
theimage[35]=["scans/f.gif", "contactla.htm",];
theimage[36]=["scans/g.gif", "contactla.htm",];
theimage[37]=["scans/h.gif", "contactla.htm",];
theimage[38]=["scans/i.gif", "contactla.htm",];
theimage[39]=["scans/j.gif", "contactla.htm",];
theimage[40]=["scans/k.gif", "contactla.htm",];
theimage[41]=["scans/l.gif", "contactla.htm",];
theimage[42]=["scans/m.gif", "contactla.htm",];
theimage[43]=["scans/n.gif", "contactla.htm",];
theimage[44]=["scans/new2.gif", "contactla.htm",];
theimage[45]=["scans/p.gif", "contactla.htm",];
theimage[46]=["scans/q.gif", "contactla.htm",];
theimage[47]=["scans/r.gif", "contactla.htm",];

///// Plugin variables

playspeed=4000;// 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()')

}


//###########################################
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];
	}
}


