<!--

//
// The writeDate function endeavors to work with as many interpretations
// of the JavaScript/ECMAScript standard as possible. So there.
//
// Within <HEAD> tag, place the following:
//
// <script language="JavaScript" type="text/javascript"
//    src="showdate.js"></script>
//
// Within <BODY> tag, place the following, making sure to
// place comment tags around the actual script:
//
// <script language="JavaScript" type="text/javascript">
// if (writeDate) writeDate();
// </script>
//

// Get around possible lack of Array() operator
function makeMonthArray() {
    this.length=12;
    this[1]  = "January";  this[2]  = "February"; this[3]  = "March";
    this[4]  = "April"; this[5]  = "May";  this[6]  = "June";
    this[7]  = "July";  this[8]  = "August"; this[9]  = "September";
    this[10] = "October";  this[11] = "November"; this[12] = "December";
    return this;
}

// Get around possible lack of Array() operator
function makeDayArray() {
    this.length=7;
    this[1] = "Sunday"; this[2] = "Monday";   this[3] = "Tuesday";
    this[4] = "Wednesday"; this[5] = "Thursday"; this[6] = "Friday";
    this[7] = "Saturday";
    return this;
}

// Function to be used in case getFullYear is not available
// Thanks to David Flanagan ("JavaScript, The Definitive Guide")
// Works with dates after the year 1000 and in various forms
//  (e.g., 99 for 1999, 100 for 2000, 2010, etc.).
function _getFullYear() {
    var y = this.getYear();
    if (y < 1000) y += 1900;
    return y;
}

// Write a date of the form "Day., Month DD, YYYY"
function writeDate() {
    now = new Date();
    if (!now.getFullYear) now.getFullYear = _getFullYear;
    monthName = new makeMonthArray(); dayName = new makeDayArray();

    document.write (monthName[now.getMonth() + 1] + " " + now.getDate() + ", " + now.getFullYear());
}

//-->

