var dateobj = new Date();
var dayofweek;
var month = dateobj.getMonth();
var day = dateobj.getDay();
var date = dateobj.getDate();
var year = dateobj.getYear();
var textmonth = new Array(11);
textmonth[0] = "JANUARY";
textmonth[1] = "FEBRUARY";
textmonth[2] = "MARCH";
textmonth[3] = "APRIL";
textmonth[4] = "MAY";
textmonth[5] = "JUNE";
textmonth[6] = "JULY";
textmonth[7] = "AUGUST";
textmonth[8] = "SEPTEMBER";
textmonth[9] = "OCTOBER";
textmonth[10] = "NOVEMBER";
textmonth[11] = "DECEMBER";
		  
var textday = new Array(6);
textday[0] = "SUNDAY";
textday[1] = "MONDAY";
textday[2] = "TUESDAY";
textday[3] = "WEDNESDAY";
textday[4] = "THURSDAY";
textday[5] = "FRIDAY";
textday[6] = "SATURDAY";
		  
month = textmonth[month];
dayofweek = textday[day];
		  
if (year < 1999)
{
	year = year + 1900;
}
		  
document.write(dayofweek + ", " + month + " " + date + ", " + year);
