<!------- hide the script from old browsers

function char_sub(text_string,split_at,sub_with)  {
   // split string at char 
   // input:
   // split_at - character that delimits each word
 
   if (!split_at) { split_at = " "; }
   if (!sub_with) { sub_with = "&nbsp;"; }

   while (text_string.indexOf(split_at) >= 0) {
     var c = text_string.substring(0,text_string.indexOf(split_at));
     var temp = 
     text_string.substring(text_string.indexOf(split_at) + 1,text_string.length);
     text_string = c + sub_with + temp;
   }
 
   return text_string;
 } 


function key_footer(page) {

  update(page); // get the_date (last modified date)
 
  var msg = "<TABLE BORDER=\"0\" CELLSPACING=\"0\" CELLPADDING=\"0\" WIDTH=\"100%\">\n";
  msg += "<TR>\n";
  msg += "<TD ROWSPAN=2 ALIGN=\"LEFT\" VALIGN=\"TOP\" WIDTH=200>\n";

  msg += "<TABLE BORDER=\"0\" CELLSPACING=\"0\" CELLPADDING=\"0\" WIDTH=\"200\">\n";
  msg += "<TR>\n";
  msg += "<TD ALIGN=\"LEFT\" VALIGN=\"TOP\" WIDTH=\"97\">\n";
  msg += "<A HREF=\"http://www.mdsg.umd.edu/index.html\" \n";
  msg += "ALT=\"[Maryland Sea Grant]\" \n";
  msg += "onMouseOver=\"on_msover('Maryland Sea Grant');return true\" ";
  msg += "onMouseOut=\"on_msout();return true\">\n";
  msg += "<IMG SRC=\"../mdsg.gif\" ALT=\"[Maryland Sea Grant]\" ";
  msg += "WIDTH=\"97\" HEIGHT=\"70\" BORDER=\"0\"></A><BR>\n";
  msg += "<BR>\n";
  msg += "</TD>\n";
  msg += "<TD ALIGN=\"LEFT\" VALIGN=\"TOP\" WIDTH=\"83>\"\n";
  msg += "<A HREF=\"http://www.noaa.gov/\" ";
  msg += "onMouseOver=\"on_msover('National Oceanic and Atmospheric ";
  msg += "Administration (NOAA)');return true\" ";
  msg += "onMouseOut=\"on_msout();return true\">\n";
  msg += "<IMG SRC=\"../noaa.gif\" ALT=\"[NOAA]\" ";
  msg += "WIDTH=\"83\" HEIGHT=\"70\" BORDER=\"0\"></A><BR>\n";
  msg += "<BR>\n";
  msg += "</TD>\n";
  msg += "</TR>\n";
  msg += "<TR>\n";
  msg += "<TD COLSPAN=2 ALIGN=\"LEFT\" VALIGN=\"TOP\" WIDTH=\"180\" NOWRAP CLASS=\"FOOTER\">\n";
  msg += "&nbsp; Maryland Sea Grant<BR>\n";
  msg += "&nbsp; 4321 Hartwick Road, Suite 300<BR>\n";
  msg += "&nbsp; College Park, MD  20740<BR>\n";
  msg += "&nbsp; <A HREF=\"http://www.mdsg.umd.edu\">www.mdsg.umd.edu</A><BR>\n";
  msg += "&nbsp; Phone:  (301) 405-7500<BR>\n";
  msg += "&nbsp; Email:  <A HREF=\"mailto:mdsg\@mdsg.umd.edu\">\n";
  msg += "mdsg\@mdsg.umd.edu</A><BR>\n";
  msg += "</TD>\n";
  msg += "</TR>\n";
  msg += "</TABLE>\n";
  
  msg += "</TD>\n";
  msg += "<TD ALIGN=\"LEFT\" VALIGN=\"TOP\" CLASS=\"FOOTER\">\n";

  msg += "<A HREF=\"../edmatter.htm\" ";
  msg += "onMouseOver=\"on_msover('Maryland Sea Grant Education');return true\" ";
  msg += "onMouseOut=\"on_msout();return true\">";
  msg += "Maryland&nbsp;Sea&nbsp;Grant&nbsp;Education</A>\n";
  msg += "<BR>\n";
  msg += "<BR>\n";
  msg += "</TD>\n";
  msg += "</TR>\n";
  
  msg += "<TR>\n";
  msg += "<TD ALIGN=\"LEFT\" VALIGN=\"TOP\" CLASS=\"FOOTER\">\n";
  msg += "Note: This page uses one or more JavaScripts and work best with ";  
  msg += "Netscape and Microsoft Internet Explorer version 4.0 or later.";
  msg += "<BR><BR>\n";
  msg += "This page was last modified on " + the_date + "\n";
  msg += "<BR>\n<BR>\n";
  //msg += document.location + "\n<BR><BR>\n";
  msg += "</TD>\n";
  msg += "</TR>\n";
  msg += "</TABLE>\n";

  document.write(msg);

}

function update(page) {
  // date last modified - need to fix
  var montharray = new  Array("January", "February", "March", "April", "May", 
   "June", "July", "August", "September", "October", "November"," December");
 
  var dateobj = new Date(document.lastModified);

  var yy = dateobj.getYear(); 
  if ((navigator.appName == "Microsoft Internet Explorer") 
    && (yy < 2000)) { yy = "19" + yy; }
  if (navigator.appName == "Netscape") { yy = 1900 + yy; }
  var mm = dateobj.getMonth();
  var dd = dateobj.getDate();
  the_date = montharray[mm] + " " + dd + ", " + yy;

  if (yy < 2006) { 
    the_date = "August 3, 2006"; // temporary hard code date
  }

  return the_date;

}

function movie_link(movie_name,width,height) { // quicktime link
  // qt hxw 224 x 336
  if (!width) { width = '340'; }
  if (!height) { height = '240'; }
  var toolbar_flag = 'no';
  this_link = "<A HREF=\"javascript:open_window('";
  this_link += movie_name + "','" + width + "','" + height + "','";
  this_link += toolbar_flag + "');\">";
  return this_link;
}

// hide this script from old browsers----------->

