var secs
var timerID = null
var timerRunning = false
var delay = 1000

function InitializeTimer()
{
    // Set the length of the timer, in seconds
    secs = 17
    StopTheClock()
    StartTheTimer()
}

function StopTheClock()
{
    if(timerRunning)
        clearTimeout(timerID)
    timerRunning = false
}

function StartTheTimer()
{
    if (secs==0)
    {
        StopTheClock()
        OpenWindowThisWay()
    }
    else
    {
        self.status = secs
        secs = secs - 1
        timerRunning = true
        timerID = self.setTimeout("StartTheTimer()", delay)
    }
}

function OpenWindowThisWay()
{
window.open("http://store.yahoo.com/cgi-bin/clink?yhst-48730301578230+QB3gNW+http://www.touchalpaca.com/The_Original_Paka_Bear/index.html",
"new","top=0,left=0,width=1080,height=800,fullscreen=no,scrollbars=yes,toolbar=no,menubar=no,resizable=yes,location=no,directories=no,status=no")
}