function dateMod(src) {
	// writes to the document the last time this document was modified
	// src is the argument controlling where the date modified info should be gleaned from - 
	// "meta" - (the preferred), is pulled from the meta data
	// "file" - (not so good), is pulled from the files modification date on the server
	// Meta is preferred because the format of the file may change without necessarily changing
	// the information presented, or its date.
	var source = src ;
	if (source == null || source == "") { source = "meta" ; }
	if (source == "file") {
		document.write(getDateModFromFileSystem("Updated")) ;
	} else {
		document.write(getDateModFromMetaData("Updated")) ;
	}
} // end DateMod


function getDateModFromFileSystem(desc) {
// Returns the file last modified date from the file system
	var lm ;
	var lastmod = document.lastModified ;
	var lastmoddate = Date.parse(lastmod) ;
	if ( lastmoddate != 0 ) {
		d = new Date(lastmoddate) ;
		var months = new Array("January","February","March","April","May","June","July","August","September","October","November","December");
		var tm = "time ="+d.getUTCHours()+":"+d.getUTCMinutes();
		lm = d.getUTCDate() +"&nbsp;"+ months[d.getUTCMonth()] +"&nbsp;"+ d.getUTCFullYear() ;
		if (desc == null || desc == "" ) { desc = "Updated" ; }
		lm = desc+"&nbsp;"+lm+"&nbsp;&nbsp;&nbsp;" ;
		return lm ;
	} else {
		return "" ;
	}
} // end getDateModFromFileSystem



function getDateModFromMetaData(desc) {
// Returns the file last modified date from meta data entry DC.Last.Modified 
if (! document.getElementsByName("DC.Date.Modified")[0] ) {
  return getDateModFromFileSystem(desc) ;
}
  
var a = document.getElementsByName("DC.Date.Modified")[0].content.split('-') ;
var lm = "" ;
if (a[0] != null && a[0] != "" ) { // if metadata date is available
  lm = a[0] ; // year is the meta format minimum
  if (a[1] != null && a[1] != "" ) { // month
  var months = new Array("January","February","March","April","May","June","July","August","September","October","November","December");
    lm = months[a[1]-1] +" "+ lm ;
    if (a[2] != null && a[2] != "" ) {
      lm = a[2] +" "+ lm ;
    }
  }
  if (desc == null || desc == "" ) {
    desc = "Updated" ;
  }
  lm = desc+"&nbsp;"+lm+"&nbsp;&nbsp;&nbsp;" ;
} else { // if no meta data date available
  return getDateModFromFileSystem(desc) ;
}
 return lm ;
}





