<!--

// This array holds the "friendly" day names
var day_names = new Array(7)
day_names[0] = "<strong>Sunday</strong>"
day_names[1] = "<strong>Monday</strong>"
day_names[2] = "<strong>Tuesday</strong>"
day_names[3] = "<strong>Wednesday</strong>"
day_names[4] = "<strong>Thursday</strong>"
day_names[5] = "<strong>Friday</strong>"
day_names[6] = "<strong>Saturday</strong>"

// This array holds the "friendly" month names
var month_names = new Array(12)
month_names[0] = "<em>January</em>"
month_names[1] = "<em>February</em>"
month_names[2] = "<em>March</em>"
month_names[3] = "<em>April</em>"
month_names[4] = "<em>May</em>"
month_names[5] = "<em>June</em>"
month_names[6] = "<em>July</em>"
month_names[7] = "<em>August</em>"
month_names[8] = "<em>September</em>"
month_names[9] = "<em>October</em>"
month_names[10] = "<em>November</em>"
month_names[11] = "<em>December</em>"

// Get the current date
date_now = new Date()

// Figure out the friendly day name
day_value = date_now.getDay()
date_text = day_names[day_value]

// Figure out the friendly month name
month_value = date_now.getMonth()
date_text += " " + month_names[month_value]

// Add the day of the month
date_text += " " + date_now.getDate()

// Add the year
date_text += ", " + date_now.getFullYear()

// Get the minutes in the hour
minute_value = date_now.getMinutes()
if (minute_value < 10) {
    minute_value = "0" + minute_value
}

// Get the hour value and use it to customize the greeting
hour_value = date_now.getHours()
if (hour_value == 0) {
   greeting = "Good morning, "
   time_text = " at " + (hour_value + 12) + ":" + minute_value + " AM"
}
else if (hour_value < 12) {
    greeting = "Good morning!"
    time_text = " at " + hour_value + ":" + minute_value + " AM"
}
else if (hour_value == 12) {
    greeting = "Good afternoon!"
    time_text = " at " + hour_value + ":" + minute_value + " PM"
}
else if (hour_value < 17) {
    greeting = "Good afternoon!"
    time_text = " at " + (hour_value - 12) + ":" + minute_value + " PM"
}
else {
    greeting = "Good evening!"
    time_text = " at " + (hour_value - 12) + ":" + minute_value + " PM"
}

document.write(greeting + " It's " + date_text + time_text)

//-->