 
/*
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 photos=new Array()
var photostxt=new Array()
var photoslink=new Array()
var which=0

//define images. You can have as many as you want. Images MUST be of the same dimensions (for NS's sake)
photos[0]="images/rotator/d-day1.jpg"
photos[1]="images/rotator/d-day2.jpg"
photos[2]="images/rotator/d-day3.jpg"
photos[3]="images/rotator/d-day4.jpg"
photos[4]="images/rotator/d-day5.jpg"
photos[5]="images/rotator/d-day6.jpg"
photos[6]="images/rotator/d-day7.jpg"


//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]=""
photoslink[5]=""
photoslink[6]=""


//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 backward(){
if (which>0){
which--
applyeffect()
document.images.photoslider.src=photos[which]
playeffect()
keeptrack()
}
else {
which=photos.length-1
applyeffect()
document.images.photoslider.src=photos[which]
playeffect()
keeptrack()
}
}

/*
function forward(){
if (which<photos.length-1){
//which++
which1=which
while (which1==which){
which=randnumb(photos.length)
}
applyeffect()
document.images.photoslider.src=photos[which]
playeffect()
keeptrack()
}
else {
//which=0
which1=which
while (which1==which){
which=randnumb(photos.length)
}
applyeffect()
document.images.photoslider.src=photos[which]
playeffect()
keeptrack()
}
setTimeout('forward()',8000);  
}
*/

function forward(){
	if (which<photos.length-1){
			    which++
			    applyeffect()
			    document.images.photoslider.src=photos[which]
			    playeffect()
			    keeptrack()
			    }
		     else {
			     which=0
		  	     applyeffect()
			     document.images.photoslider.src=photos[which]
			     playeffect()
			     keeptrack()
	  }
setTimeout('forward()',8000);  
}




function transport(){
window.location=photoslink[which]
}




function randnumb(rn) {
    var lo = 0
    var hi = rn
    var now = new Date()
    var rnd = 98726471 * (now.getTime() / ((now.getMinutes() + 41) * 1000))
    rnd = lo + Math.floor(rnd % (hi - lo))
    return rnd;
}
// end of functions.

setTimeout('forward()',8000);  
which = randnumb(photos.length);
//-->

<!--
if (linkornot==1)
document.write("<a href='javascript:transport()'>")
document.write('<img src="'+photos[which]+'" name="photoslider" style="filter:revealTrans(duration=2,transition=23)" border=2>')
if (linkornot==1)
document.write('</a>')
 
//-->
