var timerID = null;
var timerRunning = false;
var giorniDellaSettimana = new Array("Domingo", "Lunes", "Martes", "Miercoles", "Jueves", "Viernes", "Sabado");
   

function showClock(){
	var timeValue;
	var d = new Date(); 
	//timeValue = d.toLocaleString();
	timeValue = giorniDellaSettimana[d.getDay()] + '  '  + addZero(d.getDate()) + '/' + addZero((d.getMonth() + 1)) + '/' +  d.getYear() + '    ' + addZero(d.getHours()) +':'+ addZero(d.getMinutes()) +':'+ addZero(d.getSeconds());
//	timeValue = d.toString();
//alert (timeValue + " " + document.myMenuTop.id );

	document.all("clock").innerHTML=" " + timeValue + " ";
	timerID = window.setTimeout ("showClock()",1000);
	timerRunning = true;
	d= null;
}

function stopClock (){
	if (timerRunning)
		window.clearTimeout (timerID);
	timerRunning = false;
}


function startClock () {
	//alert("startClock");
	stopClock();
	showClock();
}

//Aggiunge uno zero al numero
function addZero(n) {	
	if (n < 10) {
		return ("0" + n);
	}
	return("" + n);
}


