// please keep these lines on when you copy the source
// made by: Nicolas - http://www.javascript-page.com
// made to not look stupid by: Aaron - http://www.marinosoftware.com

var clockID = 0;

function UpdateClock() {
   if(clockID) {
      clearTimeout(clockID);
      clockID  = 0;
   }

   var tDate = new Date();

	var hour = tDate.getHours()
	var minute = tDate.getMinutes()
	var second = tDate.getSeconds()
	var time = " " + ((hour < 10) ? "0" : "") + hour
	time += ((minute < 10) ? ":0" : ":") + minute
	time += ((second < 10) ? ":0" : ":") + second
	if(document.forms[0] != null && document.forms[0].theTime != null)
	{
		document.forms[0].theTime.value = time;
	}
                                   
   
   clockID = setTimeout("UpdateClock()", 1000);
}
function StartClock() {
  clockID = setTimeout("UpdateClock()", 500);
 
}

function KillClock() {
   if(clockID) {
      clearTimeout(clockID);
      clockID  = 0;
   }
}
