var secs
var transition=0;
var timerID = null
var timerRunning = false
var delay = 60;

function InitializeTimer()
{
    // Set the length of the timer, in half seconds
    secs = 12;

    StopTheClock()
    StartTheTimer()
}

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

function StartTheTimer()
{
    if (secs==0)
    {
	transition=0;
        StopTheClock()
        // Here's where you put something useful that's
        // supposed to happen after the allotted time.
        // For example, you could display a message:
        //incrementstory();
	//Effect.Appear('newsimage');
	hide_menu();
	//scrollBG();
	InitializeTimer();
    }
    else
    {
        //self.status = secs;
	//if (secs==2) {
		//Effect.Fade('newsimage');
	//}
        secs = secs - 0.5;
        timerRunning = true;
        timerID = self.setTimeout("StartTheTimer()", delay)
    }
}

