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

   var tDate = new Date();

   if (tDate.getHours()<10) zero1='0'; else zero1='';
   if (tDate.getMinutes()<10) zero2='0'; else zero2='';
   document.getElementById('time').innerHTML = "" 
                                   + zero1 + tDate.getHours() + ":" 
                                   + zero2 + tDate.getMinutes();
   
   clockID = setTimeout("UpdateClock()", 1000);
}
function StartClock() {
   clockID = setTimeout("UpdateClock()", 500);
}

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