<!-- BEGIN histamine_lib.js// functions for histamine website (DJ and others)function open_window(file,width,height) {  // note: toolbar = yes to allow printing of pop-up window  var winopt = "toolbar=no,location=no,directories=no,";  winopt += "menubar=no,resizable=no,scrollbars=yes";  if (width && height) {     winopt += ",width=" + width + ",height=" + height;   }  newWin=window.open(file,"dummy",winopt);}function define_fig(gif,width,height,alt,legend) {  var winopt, html;  html = "<HTML>\n<HEAD>\n<TITLE>";  html += "Environmental Science Education Program";  html += "</TITLE>\n";  html += "<LINK REL=\"STYLESHEET\" TYPE=\"text/css\" ";  html += "HREF=\"http://www.mdsg.umces.edu/~jacobs/histamine/histamine.css\">\n";  html += "</HEAD>\n";  html += "<BODY BGCOLOR=\"#FFFFFF\" ";  html += "onblur=window.close()>\n";  html += "<CENTER>\n";  html += "<IMG SRC=\"" + gif + "\" ALT=\"" + alt + "\" ";  html += "height=" + height + " width=" + width + ">\n";  html += "<H3>\n" + legend + "\n<H3>\n";  html += "<FORM>\n";  html += "<INPUT TYPE=\"Button\" value=\"Close Window\" ";  html += "onClick=\"window.close();\"><BR>\n";  html += "</FORM>\n";  html += "</CENTER>\n";  html += "</BODY>\n";  html += "</HTML>\n";  height = height + 120; // orig + 80  width = width + 40;  // note: toolbar = yes to allow printing of pop-up window  winopt = "toolbar=no,location=no,directories=no,";   winopt += "menubar=no,resizable=no,scrollbars=yes,";  winopt += "width=" + width + ",height=" + height;  newWin=window.open("","dummy",winopt);  newWin.document.write(html);  newWin.document.close();  return}okMouse = false;function reloadIt() { document.location = document.location;}function dhtml_check() {  // set browser specific items for javascript using layers  if (document.getElementById) {     // netscape 6 (gecko) or greater - DOM specific object variables    dhtml_flag = "gecko";    layerRef = "document.getElementById('";    layerStyle = "').style";    visible = '.visibility = "visible"';    hidden = '.visibility = "hidden"';    zlevel = '.zindex';    pxunits = 'px';    okMouse = true;  }  if (document.layers) { // netscape 4 or greater - DOM specific object variables    window.onResize = reloadIt;// patch for netscape window resizing problem    dhtml_flag = "n4";    layerRef = "document.layers['";    layerStyle = "']";    visible = '.visibility = "show"';    hidden = '.visibility = "hide"';    zlevel = '.zIndex';    pxunits = '';     okMouse = true;    }  else if (document.all) { // msie 4 or greater - DOM specific object variables    dhtml_flag = "mise";    layerRef = "document.all['";    layerStyle = "'].style";    visible = '.visibility = "visible"';    hidden = '.visibility = "hidden"';    zlevel = '.zindex';    pxunits = 'px';     okMouse = true;  }}function preload_img(image_array,flag) { // preload images  // image file names stored in image_array (defined above)  // called below (or can use with BODY onLoad  if (okMouse) {    for (var loop in image_array) {      var t = eval('preload_' + flag);      t[loop] = new Image();      t[loop].src = image_array[loop];    }  }}function msover(img,ref) { // mouse rollover function  // img - name of the IMG statement  // ref - new_imgs array name   if (!ref) { ref = img; }   if (okMouse) {    document.images[img].src = preload_on[ref].src;  }}function msout(img,ref) { // mouse rollout function  // img - name of the IMG statement  // ref - new_imgs array name   if (!ref) { ref = img; }  if (okMouse) { document.images[img].src = preload_off[ref].src;}}function layer_on(layerID) {  eval(layerRef + layerID + layerStyle + visible);}function layer_off(layerID) {  eval(layerRef + layerID + layerStyle + hidden);}function status_line(string) { // status line message with mouseover  if (okMouse) {     if (leader) { window.status = leader + string; }     else { window.status = string; }  }}dhtml_check();// cookie function from// http://www.webreference.com/js/column8/functions.htmlfunction setCookie(name, value, expires, path, domain, secure) {  // name - name of the cookie  // value - value of the cookie  // [expires] - expiration date of the cookie   //   (defaults to end of current session)  // [path] - path for which the cookie is valid   //  (defaults to path of calling document)  // [domain] - domain for which the cookie is valid   //  (defaults to domain of calling document)  // [secure] - Boolean value indicating if the cookie transmission  // requires a secure transmission  // * an argument defaults when it is assigned null as a placeholder  // * a null placeholder is not required for trailing omitted arguments    var curCookie = name + "=" + escape(value) +      ((expires) ? "; expires=" + expires.toGMTString() : "") +      ((path) ? "; path=" + path : "") +      ((domain) ? "; domain=" + domain : "") +      ((secure) ? "; secure" : "");  document.cookie = curCookie;alert ('curCookie = ' + curCookie);} function getCookie(name) {  // name - name of the desired cookie  // * return string containing value of specified cookie or   //   null if cookie does not exist   var dc = document.cookie;  var prefix = name + "=";  var begin = dc.indexOf("; " + prefix);  if (begin == -1) {    begin = dc.indexOf(prefix);    if (begin != 0) return null;  } else    begin += 2;  var end = document.cookie.indexOf(";", begin);  if (end == -1)    end = dc.length;  return unescape(dc.substring(begin + prefix.length, end));} function deleteCookie(name, path, domain) {  // name - name of the cookie  // [path] - path of the cookie   //   (must be same as path used to create cookie)  // [domain] - domain of the cookie   //   (must be same as domain used to create cookie)  // * path and domain default if assigned null or   //   omitted if no explicit argument proceeds   if (getCookie(name)) {    document.cookie = name + "=" +     ((path) ? "; path=" + path : "") +    ((domain) ? "; domain=" + domain : "") +    "; expires=Thu, 01-Jan-70 00:00:01 GMT";  }} function fixDate(date) {  // date - any instance of the Date object  // * hand all instances of the Date object   //   to this function for "repairs"   var base = new Date(0);  var skew = base.getTime();  if (skew > 0)    date.setTime(date.getTime() - skew);}//END histamine_lib.js -->