today=new Date();

function createDateString()
{
  var dayofWeeknum=today.getDay();
  var dateofMonth=today.getDate();
  var theMonthnum=today.getMonth();
  var theYear=2000+today.getYear()%100; 
  var dayofWeek;
  var theMonth;
  var TheCompleteDate;

  if (dayofWeeknum==0)
    dayofWeek="Sunday";
  else if (dayofWeeknum==1)
    dayofWeek="Monday";
  else if (dayofWeeknum==2)
    dayofWeek="Tuesday";
  else if (dayofWeeknum==3) 
    dayofWeek="Wednesday";
  else if (dayofWeeknum==4) 
    dayofWeek="Thursday";
  else if(dayofWeeknum==5)
    dayofWeek="Friday";
  else if(dayofWeeknum==6)
    dayofWeek="Saturday";
  else
    dayofWeek="Error!";
  
  if (theMonthnum==0)
    theMonth="Jan";
  else if (theMonthnum==1)
    theMonth="Feb";
  else if (theMonthnum==2)
    theMonth="Mar";
  else if (theMonthnum==3)
    theMonth="Apr";
  else if (theMonthnum==4)
    theMonth="May";
  else if(theMonthnum==5)
    theMonth="Jun";
  else if(theMonthnum==6)
    theMonth="Jul";
  else if (theMonthnum==7)
    theMonth="Aug";
  else if (theMonthnum==8)
    theMonth="Sep";
  else if (theMonthnum==9)
    theMonth="Oct";
  else if (theMonthnum==10)
    theMonth="Nov";
  else if(theMonthnum==11)
    theMonth="Dec";
  else
    theMonth="Error!"; 

  TheCompleteDate=dayofWeek + "&nbsp;&middot;&nbsp;" + dateofMonth + "&nbsp;" + theMonth + "&nbsp;" + theYear;
  return TheCompleteDate;  
}

function writeDate()
{
  document.writeln("<p>");
  document.writeln(createDateString());
  document.writeln("</p>");
}

