// JavaScript Document


function OpenLand()  {
	$("#kiesland").show();
	InitializeTimer();
	StartTheTimer();
}

function SluitLand () {
	$("#kiesland").hide();	
}

var secs
var timerID = null
var timerRunning = false
var delay = 100

function InitializeTimer()
{
    // Set the length of the timer, in seconds
    secs = 100
    StopTheClock()
    StartTheTimer()
}

function StopTheClock()
{
    if(timerRunning)
        clearTimeout(timerID)
    timerRunning = false
}

function StartTheTimer()
{
    if (secs==0)
    {
        StopTheClock()
		
		// haal lagen weg
		SluitLand ();
    }
    else
    {
        self.status = secs
        secs = secs - 1
        timerRunning = true
        timerID = self.setTimeout("StartTheTimer()", delay)
    }
}

