<script type="text/javascript" language="javascript">
<!--
function iCounter() {
var nxtXmas=(new Date().getMonth()>=11 && new Date().getDate()>25)? (new Date().getFullYear()) 1 : new Date().getFullYear();
var cDateTime=new Date();
var tDateTime=new Date("December 25, " nxtXmas " 0:0:00");
//var tDateTime=new Date("June 11, " nxtXmas " 0:0:00");
var timeDiff=(tDateTime-cDateTime)/1000; //difference btw target date and current date, in seconds
var oneMin=60; //1 minute in seconds
var oneHour=60*60; //1 hour in seconds
var oneDay=60*60*24; //1 day in seconds
var totalDay=Math.floor(timeDiff/oneDay);
var totalHour=Math.floor((timeDiff-totalDay*oneDay)/oneHour);
var totalMin=Math.floor((timeDiff-totalDay*oneDay-totalHour*oneHour)/oneMin);
var totalSec=Math.floor((timeDiff-totalDay*oneDay-totalHour*oneHour-totalMin*oneMin));
//Disply Christmas Countdown to Web Browser
document.getElementById("nxtXmas").innerHTML = totalDay ' <span>Days,</span> ' totalHour ' <span>Hours,</span> ' totalMin ' <span>Minute,</span> ' totalSec ' <span>Seconds,</span><br /> Remain till the Christmas';
setTimeout("iCounter()",1000);
}
iCounter();
-->
</script>
<!--
function iCounter() {
var nxtXmas=(new Date().getMonth()>=11 && new Date().getDate()>25)? (new Date().getFullYear()) 1 : new Date().getFullYear();
var cDateTime=new Date();
var tDateTime=new Date("December 25, " nxtXmas " 0:0:00");
//var tDateTime=new Date("June 11, " nxtXmas " 0:0:00");
var timeDiff=(tDateTime-cDateTime)/1000; //difference btw target date and current date, in seconds
var oneMin=60; //1 minute in seconds
var oneHour=60*60; //1 hour in seconds
var oneDay=60*60*24; //1 day in seconds
var totalDay=Math.floor(timeDiff/oneDay);
var totalHour=Math.floor((timeDiff-totalDay*oneDay)/oneHour);
var totalMin=Math.floor((timeDiff-totalDay*oneDay-totalHour*oneHour)/oneMin);
var totalSec=Math.floor((timeDiff-totalDay*oneDay-totalHour*oneHour-totalMin*oneMin));
//Disply Christmas Countdown to Web Browser
document.getElementById("nxtXmas").innerHTML = totalDay ' <span>Days,</span> ' totalHour ' <span>Hours,</span> ' totalMin ' <span>Minute,</span> ' totalSec ' <span>Seconds,</span><br /> Remain till the Christmas';
setTimeout("iCounter()",1000);
}
iCounter();
-->
</script>
Comment