function toSt(n) {
  s=""
  if(n<10) s+="0"
  return s+n.toString();
}
 
function countdown() {
  cl=document.clock;
  d=new Date();
  count=Math.floor((eventdate.getTime()-d.getTime())/1000);
  if(count<=0)
    {
     cl.days.value="----";
     cl.hours.value="--";
     cl.mins.value="--";
     cl.secs.value="--";
     return;
   }
  cl.secs.value=toSt(count%60);
  count=Math.floor(count/60);
  cl.mins.value=toSt(count%60);
  count=Math.floor(count/60);
  cl.hours.value=toSt(count%24);
  count=Math.floor(count/24);
  cl.days.value=toSt(count%1095);
  count=Math.floor(count/365);
    
  
  setTimeout("countdown()",500);
}
