//Set the two dates
today=new Date()
var christmas=new Date(today.getFullYear(), 11, 25) //Month is 0-11 in JavaScript
if (today.getMonth()==11 && today.getDate()>25) //if Christmas has passed already
christmas.setFullYear(christmas.getFullYear()+1) //calculate next year's Christmas
//Set 1 day in milliseconds
var one_day=1000*60*60*24

//Calculate difference btw the two dates, and convert to days
var amount_days = Math.ceil((christmas.getTime()-today.getTime())/(one_day))

if (amount_days == 1)
	document.write('<p>Nog <b>1</b> dag en dan is het kerst!</p>');
else if (amount_days == 0)
	document.write('<p>Prettige kerst!</p>');
else if (amount_days < 100)
	document.write('<p>Nog <b>' + amount_days + '</b> dagen en dan is het kerst!</p>');
else
	document.write('<p>Nog <b>' + amount_days + '</b> dagen en dan is het opnieuw kerst!</p>');