<!--
var photos=new Array()
var photoslink=new Array()
var images = new Array()
var which=0
var totalPhotos, i
var secs
var timerID = null
var timerRunning = false
var delay = 1000

function InitializeTimer()
{
    // Set the length of the timer, in seconds
    
    secs = 10
    StopTheClock()
    StartTheTimer()
}

function StopTheClock()
{
    if(timerRunning)
        clearTimeout(timerID)
    timerRunning = false
}

function StartTheTimer()
{
    if (secs==0)
    {
        StopTheClock()
        forward();
    }
    else
    {
        //self.status = secs
        secs = secs - 1
        timerRunning = true
        timerID = self.setTimeout("StartTheTimer()", delay)
    }
}

//The total No of Photos 
totalPhotos = 7

//put images inside an array
images[0]= "himages/pic1.jpg" 
images[1]= "himages/pic2.jpg" 
images[2] = "himages/pic3.jpg" 
images[3] = "himages/pic4.jpg" 
images[4] = "himages/pic5.jpg" 
images[5] = "himages/pic6.jpg" 
images[6] = "himages/pic7.jpg" 

var linkornot=0

//define images.  
for (i=0; i < totalPhotos; i++)	{ 
	photos[i]= images[i]
}
		
//set no link 
for (i=0; i < totalPhotos; i++)	{ 	
	photoslink[i]=""
	}
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){
var photoslider = document.getElementById("ctl00_ContentPlaceHolder1_FormView1_photoslider")
photoslider.filters.revealTrans.Transition=Math.floor(Math.random()*23)
photoslider.filters.revealTrans.stop()
photoslider.filters.revealTrans.apply()
}
}

function playeffect(){
if (document.all)
var photoslider = document.getElementById("ctl00_ContentPlaceHolder1_FormView1_photoslider")
photoslider.filters.revealTrans.play()
}

function keeptrack(){
  //window.status="Viewing Image "+(which+1)+" of "+photos.length
  window.status="[ LANCE BUTLER REAL ESTATE Image "+(which+1)+" ] "
}

function backward(){
var photoslider = document.getElementById("ctl00_ContentPlaceHolder1_FormView1_photoslider")
	if (which>0){
		which--
	}
	else	{
		which = photos.length - 1
	}
	applyeffect()
	document.images.photoslider.src=photos[which]
	playeffect()
	keeptrack()
}

function forward(){
var photoslider = document.getElementById("ctl00_ContentPlaceHolder1_FormView1_photoslider")
	if (which<photos.length-1){
		which++
	}
	else	{
		which = 0
	}
	applyeffect()
	document.images.photoslider.src=photos[which]
	playeffect()
	keeptrack()
	InitializeTimer()
}

function transport(){
window.location=photoslink[which]
}
//-->

