/*

DHTML slideshow script- 

© Dynamic Drive (www.dynamicdrive.com)

For full source code, usage terms, and 100's more DHTML scripts, visit http://dynamicdrive.com

*/



var baseImageDirx = "../images/";

var framepause = 4000;

var resumepause = 4000;



var photos=new Array()

var photoslink=new Array()

var which=0

var slideMotion = false;



//define images. You can have as many as you want. Images MUST be of the same dimensions (for NS's sake)

// see slide_data.js



//Specify whether images should be linked or not (1=linked)

var linkornot=1



//Set corresponding URLs for above images. Define ONLY if variable linkornot equals "1"

// see slide_data.js



//do NOT edit pass this line



//goForth();



function onError(){}



var preloadedimages=new Array()

	for (i=0;i<photos.length;i++){

	preloadedimages[i]=new Image()

	preloadedimages[i].src=photos[i]

}







function applyeffect(){

	if (document.all){

		photoslider.filters.revealTrans.Transition=Math.floor(Math.random()*23)

		photoslider.filters.revealTrans.stop()

		photoslider.filters.revealTrans.apply()

	}

}



function playeffect(){

	if (document.all)

	photoslider.filters.revealTrans.play()

}



function keeptrack(){

// stub this function

		return false;



	window.status="Image "+(which+1)+" of "+photos.length

}





function backward(byAction){

if (byAction == "click")	{

	stopItandTidyup()	

}



	if (which>0){

		which--

		applyeffect()

		document.images.photoslider.src=baseImageDirx + photos[which]

		playeffect()

		keeptrack()

	} else	{

		which = photos.length

		backward()

	}

}



function forward(byAction){

if (byAction == "click")	{

	stopItandTidyup()	

}

	if (which<photos.length-1){

		which++

		applyeffect()

		document.images.photoslider.src= baseImageDirx + photos[which]

		playeffect()

		keeptrack()

	} else	{

	which = -1;

	}

}



function goForth()	{

	if (slideMotion) forward()

	slideMotion = setTimeout('goForth()', framepause);

}



function stopItandTidyup()	{

	clearTimeout(slideMotion);

	slideMotion = setTimeout('goForth()', resumepause);

}



function transport(status){

	if (status == "alt") {

		window.status = photoslink[which];
		

	} else {
		
		URL = photoslink[which];

		if (URL != "") {
			
			window.document.location=URL;

		}

	}

} 
