now = new Date;
thisYr = now.getYear();
if (thisYr < 1900) {
	thisYr = thisYr+1900
}
nextYr = thisYr + 1;

xmas = new Date(thisYr,11,24);
if (xmas.getTime() < now.getTime()) {
	xmas.setYear(nextYr);
}

function dayToDays(inTime) {
	return (inTime.getTime() / (1000 * 60 * 60 * 24));
}

function daysTill(inDate) {
	return (Math.ceil(dayToDays(inDate) - dayToDays(now)));
}