var photos=new Array()
var photoslink=new Array()
var which=0

//setup count of the slides
photos[1]="images/gallery/gallery_image_2.jpg"
photos[2]="images/gallery/gallery_image_3.jpg"
photos[3]="images/gallery/gallery_image_4.jpg"
photos[4]="images/gallery/gallery_image_5.jpg"
photos[5]="images/gallery/gallery_image_6.jpg"
photos[6]="images/gallery/gallery_image_7.jpg"
photos[7]="images/gallery/gallery_image_8.jpg"
photos[8]="images/gallery/gallery_image_10.jpg"
photos[9]="images/gallery/gallery_image_11.jpg"
photos[10]="images/gallery/gallery_image_12.jpg"
photos[11]="images/gallery/gallery_image_13.jpg"
photos[12]="images/gallery/gallery_image_14.jpg"
photos[13]="images/gallery/gallery_image_15.jpg"
photos[14]="images/gallery/gallery_image_16.jpg"
photos[15]="images/gallery/gallery_image_17.jpg"
photos[16]="images/gallery/gallery_image_9.jpg"
photos[0]="images/gallery/gallery_image_1.jpg"

//decide, have slides link ?  (1=linked)
var linkornot=0

//set the URL, if slides have link "1"
photoslink[0]=""
photoslink[1]=""
photoslink[2]=""
photoslink[3]=""
photoslink[4]=""
photoslink[5]=""
photoslink[6]=""
photoslink[7]=""
photoslink[8]=""
photoslink[9]=""
photoslink[10]=""
photoslink[11]=""
photoslink[12]=""
photoslink[13]=""
photoslink[14]=""
photoslink[15]=""
photoslink[16]=""


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()*25)
photoslider.filters.revealTrans.stop()
photoslider.filters.revealTrans.apply()
}
}



function playeffect(){
if (document.all)
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++
applyeffect()
document.images.photoslider.src=photos[which]
playeffect()
keeptrack()
}
if (which==photos.length-1)
{
  which=-1;
}
}

function transport(){
window.location=photoslink[which]
}

for (i=1; i < 1000; i++) {
	setTimeout("forward()", i*5000);		
	}