// clock.js - ByZA.it
// 27/03/2009 10.44.52
				
var clockTime=0;

function lz(x) {
	return (x >= 10 || x < 0 ? "" : "0") + x;
}

function showtime() {
	cl=document.getElementById('clock');
	if(cl && !clockTime) clockTime=parseInt(cl.firstChild.nodeValue)*1000;
	date=new Date();
	date.setTime(clockTime);
	cl.firstChild.nodeValue=
			 lz(date.getDate()) + '/' +
			 lz(date.getMonth()+1) + '/' +
			 lz(date.getYear()%100) + ' ' +
			 date.toLocaleTimeString();				
	clockTime+=1000;		

	setTimeout("showtime();",1000);
}

window.addEventListener?window.addEventListener('load',showtime,false):window.attachEvent('onload',showtime);
