/*
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 photoslink=new Array();
var which=0;

var AJ_imHeight = 200;
var AJ_imWidth = 300;


//define images. You can have as many as you want. Images MUST be of the same dimensions (for NS's sake)
//(code deleted here: to replace simply make assignment: photos[X1 .. Xn] = ../<path name>/<image name>;

//Specify whether images should be linked or not (1=linked)
var linkornot=0;

//Set corresponding URLs for above images. Define ONLY if variable linkornot equals "1"
photoslink[0]="";
photoslink[1]="";
photoslink[2]="";
photoslink[3]="";
photoslink[4]="";

//do NOT edit pass this line

var preloadedimages=new Array();
var i = 0;
for (i=0;i < photos.length;i++){
	preloadedimages[i]=new Image();
	preloadedimages[i].src=photos[i];
}


function keeptrack(){
	window.status="Image "+(which+1)+" of "+photos.length;
}


function backward(){
	if (which>0){
		which--;
		document.images.photoslider.src=photos[which];
		changeTitle(which);
		keeptrack();
	}
}

function changeTitle(index) {
	var oBeg = (document.all) ? "document.all[\"" : "document.getElementById(\"";
	var oEnd = (document.all) ? "\"]" : "\")";	
	var obj = eval(oBeg + "title" + oEnd);
	obj.innerHTML = titles[index];
}

function forward(){
	if (which<photos.length-1){
		which++;
		document.images.photoslider.src=photos[which];
		changeTitle(which);
		keeptrack();
	}
}

function goto(slide){
	if (slide >= 0 && slide < photos.length){
		which = slide;
		document.images.photoslider.src=photos[which];
		changeTitle(which);
		keeptrack();
	}
}

function transport(){
	window.location=photoslink[which];
}
