function clock() {
if (!document.layers && !document.all) return;
var digital = new Date();
var hours = digital.getHours();
var minutes = digital.getMinutes();
var seconds = digital.getSeconds();
/*var amOrPm = "am";
if (hours > 11) amOrPm = "pm";
if (hours > 12) hours = hours - 12; */
if (hours <= 9) zerohour = "0"
if (hours >= 10) zerohour = ""
/*if (hours == 0) hours = 12; */
if (minutes <= 9) minutes = "0" + minutes;
if (seconds <= 9) seconds = "0" + seconds;
dispTime = zerohour + hours + ":" + minutes + ":" + seconds;// + " ";// + amOrPm;
if (document.layers) {
document.layers.pendule.document.write(dispTime);
document.layers.pendule.document.close();
}
else
if (document.all)
pendule.innerHTML = dispTime;
setTimeout("clock()", 1000);
}
function startclock()
	{
		var curTime=new Date();
		var nhours=curTime.getHours();
		var nmins=curTime.getMinutes();
		var nsecn=curTime.getSeconds();
		var nday=curTime.getDay();
		var nmonth=curTime.getMonth();
		var ntoday=curTime.getDate();
		var nyear=curTime.getYear();
		var AMorPM=" ";

		if (nhours>=12)
			AMorPM="P.M";
		else
			AMorPM="A.M";

		if (nhours>=13)
			nhours-=12;

		if (nhours==0)
			nhours=12;

		if (nsecn<10)
			nsecn="0"+nsecn;

		if (nmins<10)
			nmins="0"+nmins;

		if (nday==0)
			nday="Sunday";
		if (nday==1)
			nday="Monday"; 
		if (nday==2)
			nday="Tuesday"; 
		if (nday==3)
			nday="Wednesday";
		if (nday==4)
			nday="Thursday";
		if (nday==5)
			nday="Friday";
		if (nday==6)
			nday="Saturday";

		nmonth+=1;

		if (nyear<=99)
			nyear= "19"+nyear;

		if ((nyear>99) && (nyear<2000))
			nyear+=1900;
		var d;
		d= document.getElementById("theClock");
		
		d.innerHTML=nday+", " + ntoday +"/" + nmonth +"/"+nyear + " " + nhours+":"+nmins+":"+nsecn + " " + AMorPM;
		setTimeout('startclock()',1000);

	} 
