Here's the code:
|
<DIV ALIGN="center">
<SCRIPT LANGUAGE="JavaScript"> function local_timezone() {var temp = (new Date()).getTimezoneOffset();temp = temp / 60;temp = 3 - temp;temp = temp * 60 * 60 * 1000;return temp;} function byebyeBush() { var noBush = new Date("January 20, 2009 12:00:00"); var fdatems = Date.parse(noBush); var stillBush = new Date(); var ndatems = Date.parse(stillBush); var ms_until_noBush = (fdatems - ndatems) + local_timezone(); var seconds_until_noBush = ms_until_noBush / 1000; var seconds = (ms_until_noBush / 1000) % 60; var minutes = Math.floor(Math.floor(seconds_until_noBush / 60) % 60); var hours = Math.floor(Math.floor(Math.floor(seconds_until_noBush / 60) / 60) % 24) ; var days = Math.floor(Math.floor(Math.floor(Math.floor(ms_until_noBush / 1000) / 60) / 60) / 24); var string = days + " days, " + hours + " hours, " + minutes + " minutes, " + seconds + " seconds"; document.form.days.value = string; setTimeout("keepsayingbyebyeBush()", 100); } function keepsayingbyebyeBush() {byebyeBush();} function startsayingbyebyeBush() {byebyeBush();} </SCRIPT> <FORM NAME="form"> <FONT COLOR="#3333CC" SIZE="4">Countdown to a <B>Bush-free</B> White House: <BR><BR> <FONT SIZE="2" FACE="sans-serif"> <INPUT TYPE="TEXT" SIZE="38" NAME="days" STYLE="border:none;font-size:14px;" VALUE=""> </FONT> </FONT> </FORM> <FONT SIZE="2" FACE="sans-serif"> (Courtesy of <A HREF="http://www.thismodernworld.com/">This Modern World</A> and <A HREF="http://www.13idol.com">Kristian Idol</A>) </FONT> </DIV> |