var MS=navigator.appVersion.indexOf("MSIE")
 window.isIE4 = (MS>0) && (parseInt(navigator.appVersion) >= 4)

 function lead0(val) {
  return val<10 ? "0"+val.toString() : val
 }

 function buildTime() {
  var time = new Date()
  var h=time.getHours()
  if (h > 24) {h = h - 24;}
   return h+":"+lead0(time.getMinutes())+":"+ lead0(time.getSeconds())
 }
  
 function buildDate(){
  //if(document.readyState != 'complete') return;
  var time = new Date()
  return  time.getDate() + "/" + lead0(time.getMonth()+1) + "/" + time.getFullYear()
 }

 function tick() {
  document.all.clock.innerText = buildTime()
 }    