/***********************************************
* DHTML slideshow script-  © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice must stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

var preloadedimages=new Array();
var preloadedimages2=new Array();

for (i = 0; i < photos.length; i++) {
	preloadedimages[i] = new Image();
	preloadedimages[i].src = photos[i];
}

for (i = 0; i < photos2.length; i++) {
	preloadedimages2[i] = new Image();
	preloadedimages2[i].src = photos2[i];
}

function keeptrack(){
	window.status="Image " + (which + 1) + " of " + photos.length;
}

function move() {
	if (document.all && mainimage.filters) {
		document.getElementById("mainimage").style.filter="blendTrans(duration=1)";
	    document.getElementById("mainimage").filters.blendTrans(duration=1).Apply();
	    document.getElementById("mainimage").filters.blendTrans.Play();
	}
	document.getElementById("mainimage").src = photos[which];
	//document.getElementById("secondimage").src = photos2[which];
	document.getElementById("rollovertext").innerHTML = photostext[which];
	keeptrack();
}

function backward(){
	if (which > 0){
		which--;
		move();
	}
	else {
		which = photos.length - 1;
		move();
	}
}

function forward(){
	if (which < photos.length - 1){
		which++;
		move();
	}
	else {
		which = 0;
		move();
	}
}

