// ****************************************
// *** Function to display current date ***
// *** in Month Day, Year format        ***
// ****************************************
function showDate() {
var theDate = new Date(); // instantiate
var theDay = theDate.getDate(); // assign the day
var theMonth = theDate.getMonth(); // assign the month
var theYear = theDate.getFullYear(); // assign the year


// test for the month and assign the name
// to the corresponding number
if (theMonth == "0")
theMonth = "January";
if (theMonth == "1")
theMonth = "February";
if (theMonth == "2")
theMonth = "March";
if (theMonth == "3")
theMonth = "April";
if (theMonth == "4")
theMonth = "May";
if (theMonth == "5")
theMonth = "June";
if (theMonth == "6")
theMonth = "July";
if (theMonth == "7")
theMonth = "August";
if (theMonth == "8")
theMonth = "September";
if (theMonth == "9")
theMonth = "October";
if (theMonth == "10")
theMonth = "November";
if (theMonth == "11")
theMonth = "December";

// display output
document.write(theMonth + " " + theDay + ", " + theYear);

}