	// ticking clock function
	// called in body onload	
	function startclock() {
		var thetime = new Date();
		
		var dayName = new Array ("Sun", "Mon", "Tues", "Wed", "Thurs", "Fri", "Sat");
		var monName = new Array ("Jan", "Feb", "March", "April", "May", "June", "July", "Aug", "Sept", "Oct", "Nov", "Dec");
		
		var nhours = thetime.getHours();
		var nmins = thetime.getMinutes();
		var nsecn = thetime.getSeconds();
		var AorP = " ";
		
		if(nhours >= 12)
		    AorP = "PM";
		else
		    AorP = "AM";
		
		if(nhours >= 13)
		    nhours -= 12;
		
		if(nhours == 0)
		 nhours = 12;
		
		if(nsecn < 10)
		 nsecn = "0" + nsecn;
		
		if(nmins < 10)
		 nmins = "0"+nmins;
		
		document.getElementById('clockfield').innerHTML = nhours + ":" + nmins + ":" + nsecn + AorP + " " + dayName[thetime.getDay()] + " " + thetime.getDate() + " " + monName[thetime.getMonth()] + " " + thetime.getFullYear();  
		setTimeout('startclock()', 1000);
	} 
