<!--
var secs
var timerID = null
var timerRunning = false
var delay = 1000

function InitializeTimer()
{
    // Set the length of the timer, in seconds
    secs = 25
    StopTheClock()
    respuesta = form1.respuesta.value
    if(respuesta.indexOf("SESION CONCLUIDA")==-1) {StartTheTimer()}
}

function StopTheClock()
{
    if(timerRunning)
        clearTimeout(timerID)
    timerRunning = false
}

function StartTheTimer()
{
    if (secs==0)
    {
        StopTheClock()
        saludo = "hola"
        var suert = Math.floor(Math.random() * 3)
        if (suert == 0) {saludo = "bueno"}
        if (suert == 1) {saludo = "diga"}

        form1.respuesta.value = form1.respuesta.value + "\n- " + saludo +"\n"
        beep()
        InitializeTimer()
    }
    else
    {
        secs = secs - 1
        timerRunning = true
        timerID = self.setTimeout("StartTheTimer()", delay)
    }
}
//-->
