function createFooter() {
    	
   	// arrays as JavaScript has lacking date handling
   	var day_of_week = [ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" ];
	var month_array = ["January ", "Febuary ", "March ", "April ", "May ", "June ", "July ", "August ", "September ", "October ", "November ", "December "];

	// last modified date
	lastmoddate = Date.parse(document.lastModified); 

	var build_footer = '<ul>'; 
	if ((lastmoddate != undefined) && (lastmoddate != 0)) {
		// the document.lastModified returns time in EST 
		// this will convert the time to PST as that is where I live
		var moddate = new Date(lastmoddate-3600);

		// find out if that was AM or PM as we want 12 hour clock not 24
		var ampm = (moddate.getHours() > 12) ? " PM PST" : " AM PST"; 

		// this is the string that displays the month
		var monthstring = day_of_week[moddate.getDay()] + ", " +  month_array[moddate.getMonth()] + " " + moddate.getDate() + ", " + moddate.getFullYear(); 
			// + " at " +  moddate.getHours() + ":" + moddate.getMinutes() + ":" + moddate.getSeconds(); 

		// display the date
		build_footer = build_footer + "<li>";
		build_footer = build_footer + "Last modified on " +  monthstring + ".";
		build_footer = build_footer + "</li>";
	}
	today = new Date(); 
   	var daynow = day_of_week[today.getDay()] + ", " +  month_array[today.getMonth()] + " " + today.getDate() + ", " + today.getFullYear(); 

	build_footer = build_footer + "<li>";
	build_footer = build_footer + "Today is " + daynow ;
	build_footer = build_footer + "</li>";

	build_footer = build_footer + "<li>";
	build_footer = build_footer + "Copyright " + today.getFullYear();
	build_footer = build_footer + "</li>";
	build_footer = build_footer + "</ul>";

	return build_footer;
}

document.write(createFooter());



