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);
}
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() {
        mydate = new Date();
        monthName = new makeMonthArray();
        dayName = new makeDayArray();
        day = mydate.getDay() + 1;
        date = mydate.getDate();
        month = mydate.getMonth() + 1;
        year = mydate.getFullYear();
                sec = mydate.getSeconds()
        dateStr  = dayName[day];
        dateStr += ", ";
        dateStr += monthName[month];
        dateStr += " ";
        dateStr += date;
        dateStr += ", ";
        dateStr += year;
        document.write(dateStr);
}

