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

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

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

function showImg(img){
	which = img;
	document.images.photoslider.src=photos[which];
	document.getElementById('bTitle').innerHTML = title[which];
	document.getElementById('bBy').innerHTML = by[which];
	document.getElementById('bText').innerHTML = text[which];
	stopCount();
}

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

function roll(img_name, img_src){
	document[img_name].src = img_src;
}
