datetoday = new Date();
timenow=datetoday.getTime();
datetoday.setTime(timenow);
thehour = datetoday.getHours();
if (thehour > 18) display = "Evening";
else if (thehour >12) display = "Afternoon";
else if (thehour >5) display = "Morning"
else display = "Morning ... You're Up Late ";
var greeting = ("Good " + display + " ...");
document.write(greeting);
document.write("You've visited DW's Joke of the Day <b>" + amt() + "</b> times")

//SPECIAL DATE DESCRIPTIONS

//var day_description = "New Year's Day";
//var day_before = "New Year's Eve";

//var day_description = "Valentine's Day";
//var day_before = "The Day Before Valentine's Day";

//var day_description = "St. Patrick's Day";
//var day_before = "The Day Before St. Patrick's Day";

//var day_description = "Spring";
//var day_before = "The Day Before Spring";

//var day_description = "Mother's Day";
//var day_before = "The Day Before Mother's Day";

//var day_description = "Father's Day";
//var day_before = "The Day Before Father's Day";

//var day_description = "American Independence Day";
//var day_before = "The Day Before American Independence Day";

//var day_description = "Labor Day";
//var day_before = "The Day Before Labor Day";

var day_description = "International Talk Like A Pirate Day";
var day_before = "The Day Before International Talk Like A Pirate Day";

//var day_description = "Halloween";
//var day_before = "The Day Before Halloween";

//var day_description = "Thanksgiving";
//var day_before = "The Day Before Thanksgiving";

//var day_description = "Christmas";
//var day_before = "Christmas Eve";

var today = new Date();
var year = today.getYear();
if ((navigator.appName == "Microsoft Internet Explorer") && (year < 2000))		
year="19" + year;
if (navigator.appName == "Netscape")
year=2000 + year;

//SPECIAL DATES

//var date = new Date("January 1, 2012");
//var date = new Date("February 14, " + year);
//var date = new Date("March 17, " + year);
//var date = new Date("March 20, " + year);
//var date = new Date("May 11, " + year);
//var date = new Date("June 15, " + year);
//var date = new Date("July 4, " + year);
//var date = new Date("September 3, 2011");
var date = new Date("September 19, " + year);
//var date = new Date("October 31, " + year);
//var date = new Date("November 222, 2011");
//var date = new Date("December 25, " + year);

var diff = date.getTime() - today.getTime();
var days = Math.floor(diff / (1000 * 60 * 60 * 24));

document.write("<center><h3>")

if (days > 1)
document.write("There are " + (days+1) + " days until " + day_description + "!");
else if (days == 1)
document.write("Tomorrow is " + day_before  + "!");
else if (days == 0)
document.write("Today is " + day_before + "!");
else if (days == -1)
document.write("It's " + day_description + "!");
else if (days < -1)
document.write(day_description + " was " + ((days+1)*-1) + (days < -2 ? " days" : " day") + " ago this year!");
document.write("</h3></center>");

