function theDate()
{
   var days = new Array();
   days = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];

   var months = new Array();
   months  = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
   
   var today = new Date();
   var theday = today.getDay();
   var thedayname = days[theday];
   var themonth = today.getMonth();
   var themonthname = months[themonth];
   var theyear = today.getYear();
   var themonthday = today.getDate();
   
   if(theyear < 2000) { 
   theyear = theyear + 1900; 
   }
   
   var thedate = thedayname + ", " + themonthday + " " + themonthname  + " " + theyear;
   return thedate;
}

document.write(theDate());