var eventdate = new Date("Aug 24, 2010 10:00:00 AM");
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 ="00";
cl.hours.value="00";
cl.mins.value="00";
cl.secs.value="00";
alert("ФормулаСтудент Start"); // Message which appears when time is out
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=count; 
setTimeout("countdown()",500);
}