// JavaScript Document

function runClock() 
{
	today = new Date();
	
	date = today.getDate();
	month = today.getMonth();
	year = today.getFullYear();
	
	month = month + 1;
	
	hours = today.getHours();
	minutes = today.getMinutes();
	seconds = today.getSeconds();
	
	timeValue = hours;
	// Les deux prochaines conditions ne servent que pour l'affichage.
	// Si le nombre de minute est inférieur à 10, alors on rajoute un 0 devant...
	timeValue += ((minutes < 10) ? ":0" : ":") + minutes;
	timeValue += ((seconds < 10) ? ":0" : ":") + seconds;
	
	dateValue = date + "/" + month + "/" + year;
	
	window.document.getElementById("timer_value").innerHTML = timeValue;
	window.document.getElementById("date_value").innerHTML = dateValue;
	
	timerID = setTimeout("runClock()",1000);
	timerRunning = true;
}

window.onload = function()
{
	runClock();
}