var millisecs_per_day=86400000
// set countdown time in milliseconds
// put desired day as arguments to Date.UTC 
// in the order:
// year, month (remember January is 0), day of month, offset from GMT
// NOTE: we are using the offset because that represents midnight 
// (beginning of the day) in a specific timezone
var countdown_time=Date.UTC(2010,3,19,-5);
// get the current time and convert to milliseconds
var now=new Date();
var now_millisecs=now.valueOf();

var day_cnt= Math.ceil(( countdown_time - now_millisecs)/86400000 )

// display the number of days left (or since)
if ( day_cnt > 1 )
{
// multiple days to go
document.write( "There are only " + day_cnt + " days to go!")
}
else if ( day_cnt == 1 )
{
// one day to go
document.write( "There is only " + day_cnt + " day to go!")
}
else if ( day_cnt == 0 )
{
// it's today
document.write( "Today!")
}
else if ( day_cnt == -1 )
{
// one day ago
document.write( "The event was " + day_cnt + " day ago!")
}
else
{
// multiple days ago
document.write( "The event was " + day_cnt + " days ago!")
}
