/*
DHTML slideshow script- 
© Dynamic Drive (www.dynamicdrive.com)
For full source code, usage terms, and 100's more DHTML scripts, visit http://dynamicdrive.com

Modified by Jun Ng with option to go to first and last slide
*/

//source and vars of images moved to page using this script since 
//they will change. also move photoslink[0], etc if linked images are needed.

//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]=""

//do NOT edit pass this line

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(){
window.status="Image "+(which+1)+" of "+photos.length
}

function firstslide(){
// applyeffect()
document.images.photoslider.src=photos[0]
// playeffect()
keeptrack()
}

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()
}
}

function lastslide(){
// applyeffect()
//change number to last slide on list
document.images.photoslider.src=photos[2]
// playeffect()
keeptrack()
}


function transport(){
window.location=photoslink[which]
}