// Javascript code to add a greeting to the home page based on the time of day.
// Script written by William Green.

// define variables to retrieve current time of day.
var d = new Date();
var hour = d.getHours();

// return an appropriate greeting based on the time of day.
if (hour <12)
    {
	    //if the hour is before 12:00pm, return Good Morning!
		document.write('<h1>Good Morning</h1>')
    }
else if (hour <= 17 && hour >12)
    {
    	// if the hour is before 5pm and after 12pm return Good Afternoon!
		document.write('<h1>Good Afternoon</h1>')
    }
else if (hour >17)
    {
	    //if hour is after 5pm, return Good Evening!
		document.write('<h1>Good Evening</h1>')
    }
