// JavaScript Document
var secs
var timerID = null
var timerRunning = false
var delay = 1000

function InitializeTimer(s)
{
	secs = s
    StopTheClock()
    StartTheTimer()
}

function StopTheClock()
{
    if(timerRunning)
    clearTimeout(timerID)
    timerRunning = false
}

function StartTheTimer()
{
    if (secs==0)
    {       
		InitializeTimer(10);
	    }
  	else
    {		
	        if(secs==6)
			{
			
			ndalej();
			//nwstecz();
			}		
				
			else if(secs==1)
			{
			dalej();
			//ndalej();
			}		
		secs = secs - 1
        timerRunning = true
        timerID = self.setTimeout("StartTheTimer()", delay)
    }	
//	window.status = secs;
}
