// JavaScript Document

//the slide show for the pictures
var preloadedimages=new Array()
var photos=new Array()
var photoslink = new Array()
var which=0
var linkornot=0

for (i=0; i<photonumber;i++)
{
	photos[i]=photopath+i+".jpg"
	photoslink[i]=""
}

//Do Not edit here


for (i=0;i<photos.length;i++){
	preloadedimages[i]=new Image()
	preloadedimages[i].src=photos[i]
}


function applyeffect(){
	if (document.all && photoslider.filters){
		photoslider.filters.revealTrans.Transition=12 /*Math.floor(Math.random()*23)*/
		photoslider.filters.revealTrans.stop()
		photoslider.filters.revealTrans.apply()
	}
}


function playeffect(){
	if (document.all && photoslider.filters)
		photoslider.filters.revealTrans.play()
}

function keeptrack(){
	window.status="Image "+(which+1)+" of "+photos.length
}

function backward(){
	if (which>0){
		which--
		applyeffect()
		document.images.photoslider.src=photos[which]
		playeffect()
		keeptrack()
	}
}

function forward(){
//if (which<photos.length-1){
	which++
	which=which%photos.length
	applyeffect()
	document.images.photoslider.src=photos[which]
	playeffect()
	keeptrack()
//}
}

function transport(){
	window.location=photoslink[which]
}

function run(){
	forward()
	setTimeout("run()",4000)
}


  
