<script language="JavaScript">
StartCountUp("clockup","05/01/2008 00:00 GM +0200")
function StartCountUp(myDiv,myTargetDate)
{
var dthen = new Date(myTargetDate);
var dnow = new Date();
ddiff = new Date(dnow-dthen);
gsecs = Math.floor(ddiff.valueOf()/1000);
CountFront(myDiv,gsecs);
}
function Calc(secs, num1, num2)
{
s = ((Math.floor(secs/num1))%num2).toString();
if (s.length < 2)
{
s = "0" + s;
}
return (s);
}
function CountFront(myDiv, secs)
{
var DisplayStr;
var DisplayFormat = "<center><b><font color='#009900'>Server Uptime: %%D%% Days %%H%% hours %%M%% minutes %%S%% seconds</font></b></center>";
DisplayStr = DisplayFormat.replace(/%%D%%/g,Calc(secs,86400,100000));
DisplayStr = DisplayStr.replace(/%%H%%/g,Calc(secs,3600,24));
DisplayStr = DisplayStr.replace(/%%M%%/g,Calc(secs,60,60));
DisplayStr = DisplayStr.replace(/%%S%%/g,Calc(secs,1,60));
if(secs > 0)
{
document.getElementById(myDiv).innerHTML = DisplayStr;
setTimeout("CountFront('" + myDiv + "'," + (secs+1) + ");", 990);
}
}
</script>