function makeMonthArray() {

        this.length=12;
        this[1] = "Jan.", this[2] = "Feb."; this[3] = "March";
        this[4] = "April", this[5] = "May"; this[6] = "June";
        this[7] = "July", this[8] = "Aug."; this[9] = "Sept.";
        this[10] = "Oct.", this[11] = "Nov."; this[12] = "Dec.";
        return(this);

}

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 writeDate() {

        attdate = new Date();
        monthName = new makeMonthArray();
        dayName = new makeDayArray();
        day = attdate.getDay() + 1;
        date = attdate.getDate();
        month = attdate.getMonth() + 1;
        year = attdate.getUTCFullYear();

        dateStr  = dayName[day];
        dateStr += " ";
        dateStr += monthName[month];
        dateStr += " ";
        dateStr += date;
        dateStr += ", ";
        dateStr += year;

        document.write(dateStr);
}