// ------------------clock - inizio----------------------
var clockID = 0;

var nomeGiorno = new Array ("Domenica", "Luned&igrave;", "Marted&igrave;", "Mercoled&igrave;", "Gioved&igrave;", "Venerd&igrave;", "Sabato");
var nomeMese = new Array("gennaio","febbraio","marzo","aprile","maggio","giugno","luglio","agosto","settembre","ottobre","novembre","dicembre");

function UpdateClock() {
	
	var orologio = document.getElementById('theClock');
	orologio.style.color="white";
	if(clockID) {
	  clearTimeout(clockID);
	  clockID  = 0;
	}
	
	var tDate = new Date();
	
	var nameDay = tDate.getDay();
	var day = tDate.getDate();
	var month = tDate.getMonth();
	var year = tDate.getFullYear();
	var hours = tDate.getHours();
	var minutes = tDate.getMinutes();
	var seconds = tDate.getSeconds();
	
	if (hours < 10)
	{
	hours = "0" + tDate.getHours();
	}
	if (tDate.getMinutes() < 10)
	{
	minutes = "0" + tDate.getMinutes();
	}
	if (tDate.getSeconds() < 10)
	{
	seconds = "0" + tDate.getSeconds();
	}
	
	orologio.innerHTML = nomeGiorno[nameDay] + ", " + day + " "+ nomeMese[month] + " " + year + " ore " + hours + ":" + minutes + ":" + seconds;
	
	clockID = setTimeout("UpdateClock()", 1000);
	}

function StartClock() {
   clockID = setTimeout("UpdateClock()", 500);
}

StartClock();
// ------------------clock - fine----------------------