// ** monthstring
function monthstring (intMonth) {
var months = new Array(13);
months[1] = "Jan.";
months[2] = "Feb.";
months[3] = "Mar.";
months[4] = "Apr.";
months[5] = "May";
months[6] = "Jun.";
months[7] = "Jul.";
months[8] = "Aug.";
months[9] = "Sep.";
months[10] = "Oct.";
months[11] = "Nov.";
months[12] = "Dec.";
return (months[intMonth]);}
// ** onload event handler
function onloadhandler () {
document.getElementById("citation").innerHTML = citationtext ();
document.getElementById("lastupdated").innerHTML = lastupdatedtext (); }
// ** build citation function
function citationtext () {
var myTime= new Date();
citationString = "";
accessDate = myTime.toLocaleString();
adindex = accessDate.indexOf(":");
accessDate = accessDate.substring(0,adindex-3);
while (accessDate.indexOf(" ") > -1)
accessDate = accessDate.replace(" ","&nbsp;");
nbsString ="&nbsp;"
citationString = "Citation: Kirby, Robert I. &ldquo;" + "The Sermon on the Mount Site: ";
citationString = citationString + document.getElementById("pagehead").innerHTML + ".&rdquo;";
citationString = citationString + " No pages. Cited:" + nbsString + accessDate + ". Online:" + nbsString +window.location.href + "." ;
return (citationString); }
// ** build citation function
function lastupdatedtext () {
var days = new Array(8);
days[1] = "Sunday";
days[2] = "Monday";
days[3] = "Tuesday";
days[4] = "Wednesday";
days[5] = "Thursday";
days[6] = "Friday";
days[7] = "Saturday";
var months = new Array(13);
months[1] = "Jan.";
months[2] = "Feb.";
months[3] = "Mar.";
months[4] = "Apr.";
months[5] = "May";
months[6] = "Jun.";
months[7] = "Jul.";
months[8] = "Aug.";
months[9] = "Sep.";
months[10] = "Oct.";
months[11] = "Nov.";
months[12] = "Dec.";
var dateObj = new Date(document.lastModified);
var wday = days[dateObj.getDay() + 1];
var smonth = monthstring(dateObj.getMonth() + 1);
var date = dateObj.getDate();
var fyear = dateObj.getYear();
if (fyear < 2000) fyear = fyear + 1900;
return ("Page last updated: " + wday + ", " + date + " " + smonth + " " + fyear + ". ");
}

