 var todaysDate  = new Date;

 var msPerDay    =  1000 // milliseconds per second
                  * 60   // seconds per minute
                  * 60   // minutes per hour
                  * 24;  // hours per day

 function howLongSince (modificationDate) {

    var howLongAgo = Math.round((todaysDate.getTime() - modificationDate) / msPerDay);
    var yearsAgo   = Math.floor(howLongAgo / 365);
    var monthsAgo  = Math.floor((howLongAgo - (yearsAgo * 365)) / 30);
    var daysAgo    = (howLongAgo - (yearsAgo * 365) - (monthsAgo * 30));

    var showYears  = (yearsAgo > 0) ? true : false;
    var showMonths = ((monthsAgo > 0) || (showYears)) ? true : false;

    if (showYears)
       yearsAgo    = (yearsAgo == 1) ? yearsAgo + " year " : yearsAgo + " years ";
    else
       yearsAgo    = "";

    if (showMonths)
       monthsAgo    = (monthsAgo == 1) ? monthsAgo + " month " : monthsAgo + " months ";
    else
       monthsAgo    = "";

    if ((!showMonths) && (daysAgo <= 1))
       daysAgo =  (daysAgo == 0) ? "Today" : "Yesterday";

      else {

       daysAgo  = (daysAgo == 1) ? daysAgo + " day " : daysAgo + " days ";
       daysAgo += " ago";

      }

    return ("<Font Color=Maroon>(" + yearsAgo + monthsAgo + daysAgo + ")</Font>");

  }

  function writeCopyright () {

   var bullet       = "&#183";
   var currentYear = (navigator.appName == "Netscape") ? todaysDate.getYear() + 1900 : todaysDate.getYear();

   document.writeln ('<I> Content Copyright &copy; ' + currentYear + ' Highway Tabernacle Assembly of God');

    if (writeCopyright.arguments.length > 0) {     // show how long since the last modification

      var lastmod = document.lastModified;
      var lastmoddate = Date.parse(lastmod);
      var dateToPrint = (lastmoddate == 0) ? "Unknown" : lastmod;

      document.writeln ('<Font Color="Red"><B><BR> Last Modified: </B></Font>' + dateToPrint);
      if (dateToPrint != "Unkown") document.writeln (howLongSince (lastmoddate));

    }

    window.onerror = showTheBackLink;
    if (!topLevelPage) document.writeln ('<BR><A Href="../index.html">Highway\'s Main Page</A>');
    window.onerror = null;

    document.writeln ('<BR>Questions ' + bullet + ' Corrections ' + bullet + 'Suggestions: ');
    document.writeln ('<A Href="mailto:Webmaster@HighwayTabernacle.org">Webmaster</A>@HighwayTabernacle.org');
  }

function showTheBackLink (msg, url, lno) {

  document.writeln ('<BR><A Href="../index.html">Highway\'s Main Page</A>');
  return (true);

}
