/* Days to Christmas for SantaLetter.com by Thomas Forrester */

document.write('<link rel="stylesheet" href="http://www.santaletter.com/christmascountdown/sl.css" type="text/css" media="screen, projection" />');
document.write('<div class="dw" id="dtc">');
document.write('<div id="ds"><h3 id="dn">');


var today="0";
var montharray=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");

function countdown(m,d){
var today=new Date();
var todayy=today.getYear();
if (todayy < 1000)
todayy+=1900;
var todaym=today.getMonth();
var todayd=today.getDate();
var todaystring=montharray[todaym]+" "+todayd+", "+todayy;
var yr = todayy;
if (todaym==11){
	if (todayd > 25){
		yr++;
	}
}
var futurestring=montharray[m-1]+" "+d+", "+yr;
var difference=(Math.round((Date.parse(futurestring)-Date.parse(todaystring))/(24*60*60*1000))*1);
document.write(""+difference+"");
}
//enter the count down date using the format year/month/day

countdown(12,25);
document.write('</h3></div><div id="dl">');
document.write('<a href="http://www.SantaLetter.com/" target="new"><img border="0" src="http://www.santaletter.com/christmascountdown/bottom.jpg" /></a></div></div>');