UndeadLie,
странные строки 28 29
тайм зону можно неуказывать ...
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>Untitled</title>
</head>
<body>
<style>
#clock1{
font-size: 25px;
font-family:"Arial Black", Gadget, sans-serif;
text-align:center;}
</style>
<div id="clock1">[clock1]</div>
<script language="JavaScript">
StartCountDown("clock1","03/17/2013 11:00 PM")
/*
Author: Robert Hashemian ([url]http://www.hashemian.com/[/url])
Modified by: Munsifali Rashid ([url]http://www.munit.co.uk/[/url])
Modified by: Tilesh Khatri
*/
function StartCountDown(myDiv,myTargetDate)
{
var dthen = new Date(myTargetDate);
var dnow = new Date();
ddiff = dthen.getTime()-dnow.getTime();
gsecs = Math.floor(ddiff/1000);
CountBack(myDiv,gsecs);
}
function Calcage(secs, num1, num2)
{
s = ((Math.floor(secs/num1))%num2).toString();
if (s.length < 2)
{
s = "0" + s;
}
return (s);
}
function CountBack(myDiv, secs)
{
var DisplayStr;
var DisplayFormat = "%%D%% : %%H%% : %%M%% : %%S%%";
DisplayStr = DisplayFormat.replace(/%%D%%/g, Calcage(secs,86400,100000));
DisplayStr = DisplayStr.replace(/%%H%%/g, Calcage(secs,3600,24));
DisplayStr = DisplayStr.replace(/%%M%%/g, Calcage(secs,60,60));
DisplayStr = DisplayStr.replace(/%%S%%/g, Calcage(secs,1,60));
if(secs > 0)
{
document.getElementById(myDiv).innerHTML = DisplayStr;
setTimeout("CountBack('" + myDiv + "'," + (secs-1) + ");", 990);
}
else
{
document.getElementById(myDiv).innerHTML = "Акция завершена";
}
}
</script>
</body>
</html>