<!--
var secs
var timerID = null
var timerRunning = false
var delay = 3000

function InitializeTimer()
{
    
    timerlength = 5    // Set the length of the timer, in seconds
    secs = timerlength
    StopTheClock()
    StartTheTimer()
}

function StopTheClock()
{
    if(timerRunning)
        clearTimeout(timerID)
    timerRunning = false
}

function StartTheTimer()
{
    if (secs==0)
    {
	cycleforward();
        secs = timerlength
    }
    //self.status = secs  //enable if you want a count down
    secs = secs - 1
    timerRunning = true
    timerID = self.setTimeout("StartTheTimer()", delay)
}
//-->