countdown to christmas
Page 1 of 1
countdown to christmas
- Code:
<html>
<head>
<script language="javascript" type="text/javascript"><!--
//<![CDATA[
var startPosition=0;
function Xmascountdown()
{
var XmasDay = "December 25,"
var today = new Date()
var thisYear = today.getFullYear()
var XmasDate = new Date(XmasDay + thisYear)
var diff = XmasDate.getTime() - today.getTime();
var days = Math.floor(diff / (1000 * 60 * 60 * 24));
if ((days < 0) && (days >= -1)) {
var mainMessage =" M E R R Y C H R I S T M A S F R O M T H E E L V E S A T E M A I L S A N T A . C O M !!! ... ";
var speed=175;
var scrollingRegion=100;
var tempLoc=(scrollingRegion*3/mainMessage.length)+1;
if (tempLoc<1) {tempLoc=1}
var aut="emsanta"
var counter;
for(counter=0;counter<=tempLoc;counter++);
mainMessage+=mainMessage;
document.clock.Xmascountdown.value =mainMessage.substring(startPosition,startPosition+scrollingRegion);
startPosition++;
if(startPosition>scrollingRegion) startPosition=0;
setTimeout("Xmascountdown()",speed);
}
else {
if (days >= 0) {
var theDay = XmasDate;
} else {
var theDay = new Date(XmasDate.getYear()+1,XmasDate.getMonth(),XmasDate.getDate());
}
var second = Math.floor((theDay.getTime() - today.getTime())/1000);
var minute = Math.floor(second/60);
var hour = Math.floor(minute/60);
var day = Math.floor(hour/24);
CDay= day;
CHour= hour % 24;
CMinute= minute % 60;
CSecond= second % 60;
var DayTill = CDay + " days, " + CHour + " hours, " + CMinute + " minutes and " + CSecond + " seconds";
document.clock.Xmascountdown.value = DayTill;
var counter = setTimeout("Xmascountdown()", 1000);
}
}
//]]>
//-->
</script>
</head>
<body onload="Xmascountdown();">
<form name="clock">
<p><input name="Xmascountdown" size="45"></p>
</form>
<p><a href="http://www.emailsanta.com/">EmailSanta:</a> Send your Christmas Wish to Santa Claus!</p>
</body>
</html>
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
Thu Dec 19, 2013 11:03 am by
» De Sacra Poesi Hebraeorum
Thu Dec 19, 2013 9:25 am by
» signup on this site free stuff including cards
Mon Dec 05, 2011 5:33 pm by Admin
» countdown to christmas
Tue Nov 29, 2011 5:55 pm by Admin
» Cards I made
Sun Nov 13, 2011 5:11 pm by Admin
» maintenence hours
Sat Nov 12, 2011 9:57 pm by Admin
» Legendary Collection 2
Sat Nov 12, 2011 9:31 pm by Admin
» Free trading cards any type or other stuff
Thu Nov 10, 2011 11:30 am by Admin
» Important reminders non yugioh related
Sat Nov 05, 2011 7:38 pm by Admin