var clockID = 0;
var longMonths = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];

function UpdateClock() {
   if(clockID) {
      clearTimeout(clockID);
      clockID  = 0;
   }

   var tDate = new Date();
   $('clock').innerHTML = 
   tDate.getFullYear()+' '+longMonths[tDate.getMonth()]+' '+tDate.getDate()+', '+
   (tDate.getHours() < 10 ? '0':'')+tDate.getHours()+":"+
   (tDate.getMinutes() < 10 ? '0':'')+tDate.getMinutes()+":"+
   (tDate.getSeconds() < 10 ?  '0':'')+tDate.getSeconds();
   
   clockID = setTimeout("UpdateClock()", 1000);
}
function StartClock() {       
	if($('clock'))
   		clockID = setTimeout("UpdateClock()", 500);
}

function KillClock() {
   if(clockID) {
      clearTimeout(clockID);
      clockID  = 0;
   }
}