<!-- Hide from browsers that do not support JavaScript
// create a function called showGreeting
function showGreeting() {
// Get the current date
today = new Date();

// Get the current month
month = today.getMonth();

// Attach a display name to each of the 12 possible month numbers
switch (month) {
    case 0 :
        displayMonth = "January"
        break
    case 1 :
        displayMonth = "February"
        break
    case 2 :
        displayMonth = "March"
        break
    case 3 :
        displayMonth = "April"
        break
    case 4 :
        displayMonth = "May"
        break
    case 5 :
        displayMonth = "June"
        break
    case 6 :
        displayMonth = "July"
        break
    case 7 :
        displayMonth = "August"
        break
    case 8 :
        displayMonth = "September"
        break
    case 9 :
        displayMonth = "October"
        break
    case 10 :
        displayMonth = "November"
        break
    case 11 :
        displayMonth = "December"
        break

    default: displayMonth = "INVALID"
}


// Set some variables to make the JavaScript code
// easier to read

    var hours = today.getHours()
    var minutes = today.getMinutes()
    var greeting
    var ampm

    // We consider anything up until 1 p.m."morning"

    if (hours <= 13) {
        greeting = "Good morning!"
        ampm="a.m."

        // JavaScript reports midnight as 0, which is just plain
        // crazy; so we want to change 0 to 12.

        if (hours == 0) {
            hours = 12
        }
    }

    // We consider anything after 1:00 p.m. and before 6 p.m. (in
    // military time, 6 p.m. is 18) to be "afternoon"

    else if (hours > 13 && hours < 18) {
        greeting = "Good afternoon!"
        ampm="p.m."

        // We don't want to see military time, so subtract 12
        if (hours > 12) {
            hours-=12
        }
    }

    // We consider anything after six p.m. (18 military) until midnight "evening"
    else if (hours >= 18 ) {
        greeting = "Good evening!"
        ampm="p.m."
        hours-=12
    }

    // We want the minutes to display with "0" in front of them if
    // they're single-digit.  (For example, rather than 1:4 p.m.,
    // we want to see 1:04 p.m.

    if (minutes < 10) {
        minutes = "0" + minutes
    }


var displayGreeting = greeting + " It's " + displayMonth + " " + today.getDate() + ", " + today.getYear()
                        + " - " + hours + ":" + minutes + " " + ampm
	
	document.writeln(displayGreeting)

}

