
writeDate();
function shortMonthArray() {
	this[0] = "Jan";	this[1] = "Feb";	this[2] = "Mar";
	this[3] = "Apr";	this[4] = "May";	this[5] = "Jun";
	this[6] = "Jul";	this[7] = "Aug";	this[8] = "Sep";
	this[9] = "Oct";	this[10] = "Nov";	this[11] = "Dec";
        return (this);
                             }

function shortDayArray() {
	this[0] = "Sun"; this[1] = "Mon"; this[2] = "Tue"; this[3] = "Wed";
	this[4] = "Thu"; this[5] = "Fri"; this[6] = "Sat";
        return (this);
                         }

function getLongYear(year)
{
  if (year > 1900) return year
  return year+1900;
}

function writeDateLong(format)
{
   shortDays = new shortDayArray();
   shortMonths = new shortMonthArray();
   d = new Date();
   day = d.getDate();
   month = d.getMonth();
	year = d.getYear();
   if (format == 0)
     str = shortDays[d.getDay()] + ". " + shortMonths[month] +". " + day + ", "+getLongYear(year);
    document.write(str);
}

function writeDate()
{
   writeDateLong(0);
}












