
var gizmo;
 
function stopClock(){
  clearTimeout(gizmo);
}
 
function yourClock(){
  var nd = new Date();
  var h, m;
  var s;
  var time = " ";
  h = nd.getHours();
  m = nd.getMinutes();
  s = nd.getSeconds();
  if (h <= 9) h = "0" + h;
  if (m <= 9) m = "0" + m;
  if (s <= 9) s = "0" + s;
  time += h + ":" + m + ":" + s;
  document.the_clock.the_time.value = time;
  gizmo = setTimeout("yourClock()", 1000);
}
