
/*==============================================================================

Routine to write date document modified

   Note that if the server has failed to load up the HTTP header field with a
   parsable date, nothing is written.

andy J.S. Decepida

N.B.:  Requires formatDate.js to precede this

*/

function writeDateModified () {

  // Assign date variables with document.lastModified
  var modDate = new Date(document.lastModified);

  // If we have a valid date reformat it.
  if (modDate != 0) {

    // Get current year
    var cdate = new Date();
    var cyr = cdate.getYear();
    if (cyr < 1000) cyr = cyr + 1900;

    strg = "<span title=\"andy J.S. Decepida (&copy;1993-" + cyr + ") &mdash; " +
            "&#8220;" + document.title +
            "&#8221;\">" + "Last updated " + formatDate(modDate) + "</span>";

    // Display date and time document was last updated as well as the document title.
    document.write(strg);
  }
}