function dateTime(){
// Make an array to hold the name abbreviations of the days of the week.
dayName = new Array(7);
dayName[0] = "Sun. "; dayName[1] = "Mon. ";
dayName[2] = "Tues. "; dayName[3] = "Wed. ";
dayName[4] = "Thur. "; dayName[5] = "Fri. ";
dayName[6] = "Sat. ";

// Make an array to hold the name abbreviations of the months.
moName = new Array(12);
moName[0] = "Jan. "; moName[1] = "Feb. ";
moName[2] = "Mar. "; moName[3] = "Apr. ";
moName[4] = "May "; moName[5] = "Jun. ";
moName[6] = "Jul. "; moName[7] = "Aug. ";
moName[8] = "Sep. "; moName[9] = "Oct. ";
moName[10] = "Nov. "; moName[11] = "Dec. ";

// Make a new date object called "today"
today=new Date();

// Extract the day, month, and date from the "today" date object.
dayNum = today.getDay();
moNum = today.getMonth();
dateNum = String(today.getDate());

// Get the hours from the "today" date object, set amPm variable,
// convert to 12 hour system and replace hour "0" with "12"
hrsNum = today.getHours()
amPm = (hrsNum >= 12)? "pm":"am";
if (hrsNum > 12){hrsNum -= 12;}
if (hrsNum == 0){hrsNum = 12;}

// Get the minutes from the "today" date object,
// if it is a single digit add a "0" prefix.
minNumNum = today.getMinutes();
preFix = (minNumNum < 10)? "0":"";
minNum = (preFix + String(minNumNum));

// Get the seconds from the "today" date object,
// if it is a single digit add a "0" prefix.
secNumNum = today.getSeconds();
preFix = (secNumNum < 10)? "0":"";
secNum = (preFix + String(secNumNum));

// Put together hours, mins and secs separated by colons with amPm indication.
theTime = (String(hrsNum) + ":" + minNum + amPm);

// Write in the combined info replacing the numbers
// that getDay and getMonth return with the day and month
// abbreviations from the dayName and moName arrays
dateTime = (dayName[dayNum] + moName[moNum] + dateNum + ", " + theTime);
return dateTime;
}

