function getFullYear(d) { // d is a date object
 yr = d.getYear();
 if (yr < 1000)
  yr+=1900;
 return yr;
}
function getRemaining() {
 today = new Date();
 targetdate = new Date("Dec 25, "+getFullYear(today)); 
 milliseconds = (24 * 60 * 60 * 1000);
 remaining = ((targetdate.getTime() - today.getTime()) / milliseconds); 
 return Math.round(remaining);
}
document.write("<TABLE BORDER=0 cellpadding=0><TR><TD ALIGN=CENTER><BR>"
 + "<FONT SIZE='1' COLOR='green'><B> . .<!br>"
 + "<B> Only ",getRemaining()," Shopping Days<!P>Remaining "
 + "Until Xmas day!</B></FONT><P></TD></TR></TABLE><!P>");
