/*====================================================================*/
/* NAV_MENU.JS - Standard Menu Generator                              */
/*====================================================================*/
/* Created by Jonathan Fisher                            28 June 2001 */
/* For USGS-Water Resources Division                     Last Update: */
/*     MD-DE-DC Water Science Center, Watershed Studies Section   18 October 2002 */
/*====================================================================*/

var nav = '';  // ID of page that called the function
var loc = '';  // Location of index.html relative to calling page in directory tree
var arc = '';  // Directory name of archival documents that call the function

function slideshow() {
}
function slideinfo() {
}

slideshow = new slideshow();
slideinfo = new slideinfo();
nslides = 0;

slideinfo[nslides] = 'Potomac River near Harpers Ferry';
slideshow[nslides++] = "http://md.water.usgs.gov/images/slideshow/harpers1.gif";

slideinfo[nslides] = 'Potomac River near Harpers Ferry';
slideshow[nslides++] = "http://md.water.usgs.gov/images/slideshow/hfa.jpg";

slideinfo[nslides] = 'Conowingo Hydroelectric Plant on the Susquehanna River';
slideshow[nslides++] = "http://md.water.usgs.gov/images/slideshow/conowingo1.gif";

slideinfo[nslides] = 'Loch Raven Reservoir';
slideshow[nslides++] = "http://md.water.usgs.gov/images/slideshow/dam01.gif";

slideinfo[nslides] = 'Near Stream Gaging Station 0148550';
slideshow[nslides++] = "http://md.water.usgs.gov/images/slideshow/01485500_area1.jpg";

slideinfo[nslides] = 'Dam at Loch Raven Reservoir';
slideshow[nslides++] = "http://md.water.usgs.gov/images/slideshow/lochraven_side.gif";

slideinfo[nslides] = 'Great Falls of the Potomac River';
slideshow[nslides++] = "http://md.water.usgs.gov/images/slideshow/falls.gif";

//slideinfo[nslides] = 'White Clay Creek gage during flooding';
//slideshow[nslides++] = "http://md.water.usgs.gov/images/white_clay_creek_during_flooding.gif";

slideinfo[nslides] = 'Historic flooding';
slideshow[nslides++] = "http://md.water.usgs.gov/images/slideshow/floodcrest36.jpg";

slideinfo[nslides] = 'Field work at Harpers Ferry';
slideshow[nslides++] = "http://md.water.usgs.gov/images/fieldwork1.gif";

slideinfo[nslides] = 'Southern Delaware coastline';
slideshow[nslides++] = "http://md.water.usgs.gov/images/delbeaches.gif";

slideinfo[nslides] = 'Hurricane off the Atlantic coast';
slideshow[nslides++] = "http://md.water.usgs.gov/images/perfectstorm.gif";

slideinfo[nslides] = 'Washington, D.C.';
slideshow[nslides++] = "http://md.water.usgs.gov/images/dc_image.jpg";

var outofprint_navbg = '';

function nav_menu() {

  var text = '';
  var ar = arguments;
  nav = ar[0];
  loc = ar[1];
  arc = ar[2];

  headerCellEx.innerHTML = '<map name="m_usgs_menu">\n' +
  '  <area shape="rect" coords="657,20,685,38" href="#" onMouseOut="FW_startTimeout();"  onMouseOver="window.FW_showMenu(window.fw_menu_0,650,114);">\n' +
  '  <area shape="rect" coords="535,20,587,38" href="#" onMouseOut="FW_startTimeout();"  onMouseOver="window.FW_showMenu(window.fw_menu_1,537,114);">\n' +
  '  <area shape="rect" coords="396,20,455,38" href="#" onMouseOut="FW_startTimeout();"  onMouseOver="window.FW_showMenu(window.fw_menu_2,395,114);">\n' +
  '  <area shape="rect" coords="261,20,322,38" href="#" onMouseOut="FW_startTimeout();"  onMouseOver="window.FW_showMenu(window.fw_menu_3,263,114);">\n' +
  '  <area shape="rect" coords="136,20,176,38" href="#" onMouseOut="FW_startTimeout();"  onMouseOver="window.FW_showMenu(window.fw_menu_4,138,114);">\n' +
  '  <area shape="rect" coords="1,20,54,38" href="#" onMouseOut="FW_startTimeout();"  onMouseOver="window.FW_showMenu(window.fw_menu_5,4,114);">\n' +
  '</map>\n' +
  '<table cellpadding=0 cellspacing=0 border=0 width=760><tr><td background="' + loc + 'menubar_bg.gif"><img src="' + loc + 'menubar.gif" border="0" usemap="#m_usgs_menu" height=41 width=739></td></tr></table>';

  text += '<div style="background: url(\'' + loc + 'graphics/bg_navbar_t.gif\') no-repeat top left; padding-top: 1px;"><table id=navitems cellpadding=0 cellspacing=8 border=0 style="margin: 0px, 6px, 0px, 1px;">';

  // The next block appears on the internal pages only.
  if (getServer() !== "http://md.water.usgs.gov") {
    text += '<tr><td align=center style="background: #AA0000; padding: 3px; border: 1px inset;"><b style="font-family: verdana, sans-serif; font-size: 10px;">' +
      '<a style="color: #FFFFFF;" href="http://md.water.usgs.gov/' + document.URL.substr(document.URL.indexOf("watershed/")) + '" ' +
      navtip('you&nbsp;are&nbsp;currently&nbsp;on&nbsp;the MD-DE-DC&nbsp;Intranet<br><i>click&nbsp;for&nbsp;Internet&nbsp;version</i>') + '>Internal&nbsp;Access&nbsp;Only</a></b></td></tr>';
  }

  // load sub-page links
  if (ar[3] && ar[4]) {
    text += '<tr><td valign=top class="nav" nowrap style="padding-top:8px; background: transparent;">';
    for (i = 3; i < ar.length; i=i+2) {
      j=1+i;
      text += '<p style="margin:0px,0px,5pt,10pt; text-indent:-10pt; font-size:9pt;"><a class="' + highlightif(ar[i],arc) + 'nav" ';
      if (ar[j].search('./')) { text += 'target="_blank" '; }
      text += 'href="' + ar[j] + '">' + ar[i] + '</a></p>\n';
    }
    text += '  <br></font></td></tr>\n' +
      '<tr><td class=navsep width="100%"><b>Section Information</b></td></tr>';
  }
  // with borders...  text += '<tr><td nowrap valign=top style="padding: 4pt; border-left: solid #006F41 1pt; border-right: solid #006F41 1pt; border-top: double #006F41 2pt; border-bottom: double #006F41 2pt;">';

  // begin standardized links<img src="' + loc + 'pholder.gif" width=130 height=1>
  text += '<tr><td nowrap valign=top>';

  text += '<dl class=nav>\n';
  text += '<dt class=nav><a class="' + (('home'==nav)?'c':'') + 'nav" href="' + loc + 'index.html">Section Home</a>\n';
  text += '<dt class=nav><a class="' + (('projects'==nav)?'c':'') + 'nav" href="' + loc + 'projects.html">Projects</a>\n';
  // Selection list...
    text += '  <dd class=nav><a style="font-weight: normal;" class="' + (('9B209'==nav)?'c':'') + 'nav" href="' + loc + '9B209/index.html"' + navdescription('<b>2427B4K00</b><br> Anacostia River Water Quality Monitoring Project<br> Project Chief: Brenda Feit Majedi') + 'Anacostia River</a>\n';
    text += '  <dd class=nav><a style="font-weight: normal;" class="' + (('9B504'==nav)?'c':'') + 'nav" href="' + loc + '9B504/index.html"' + navdescription('<b>24279B504</b><br> Assateague Island Surface Water Monitoring Project<br> Project Chief: Jonathan J.A. Dillow') + 'Assateague Island</a>\n';
    text += '  <dd class=nav><a style="font-weight: normal;" class="' + (('MD118'==nav)?'c':'') + 'nav" href="' + loc + 'MD118/index.html"' + navdescription('<b>24279B201</b><br> Chesapeake Bay River Inputs<br> Project Chief: Michael P. Senus') + 'Bay River Inputs</a>\n';
    text += '  <dd class=nav><a style="font-weight: normal;" class="' + (('MD172'==nav)?'c':'') + 'nav" href="' + loc + 'MD172/index.html"' + navdescription('<b>24279B601</b> (FED)<br> <b>24279B602</b> (EPA)<br> Chesapeake Bay Sediment Sources<br> Project Chief: Allen Gellis') + 'Bay Sediment Sources</a>\n';
    text += '  <dd class=nav><a style="font-weight: normal;" class="' + (('MD130'==nav)?'c':'') + 'nav" href="' + loc + 'MD130/index.html"' + navdescription('Chesapeake Bay Ecosystem Project<br> Project Chief: Scott W. Phillips') + 'Bay Ecosystem Project</a>\n';
    text += '  <dd class=nav><a style="font-weight: normal;" class="' + (('MD126'==nav)?'c':'') + 'nav" href="' + loc + 'MD126/index.html"' + navdescription('<b>24279B001</b><br> Baltimore Ecosystem Study<br> Project Chief: Gary T. Fisher') + 'Baltimore Urban LTER</a>\n';
    text += '  <dd class=nav><a style="font-weight: normal;" class="' + (('MD149'==nav)?'c':'') + 'nav" href="' + loc + 'MD149/index.html"' + navdescription('<b>24279B204</b><br> Delaware Inland Bays Watershed Model<br> Project Chief: Angelica Gutierrez-Magness') + 'Delaware Bays Model</a>\n';
    text += '  <dd class=nav><a style="font-weight: normal;" class="' + (('9B211'==nav)?'c':'') + 'nav" href="' + loc + '9B211/index.html"' + navdescription('<b>24279B211</b><br> Mattawoman Creek Water Quality Monitoring Project<br> Project Chief: Brenda Feit Majedi') + 'Mattawoman Creek</a>\n';
    text += '  <dd class=nav><a style="font-weight: normal;" class="' + (('MD200'==nav)?'c':'') + 'nav" href="' + loc + 'MD200/index.html"' + navdescription('<b>24279BI30</b><br> PODL NAWQA<br> Project Chief: Judy Denver') + 'PODL NAWQA</a>\n';
    text += '  <dd class=nav><a style="font-weight: normal;" class="' + (('MD151'==nav)?'c':'') + 'nav" href="' + loc + 'MD151/index.html"' + navdescription('<b>24279B205</b><br> Potomac Water Quality Monitoring Project<br> Project Chief: Brenda Feit Majedi') + 'Potomac Water Quality</a>\n';
    text += '  <dd class=nav><a style="font-weight: normal;" class="' + (('MD163'==nav)?'c':'') + 'nav" href="' + loc + 'MD163/index.html"' + navdescription('<b>24279B206</b><br> Potomac Watershed Model<br> Project Chief: Angelica Gutierrez-Magness') + 'Potomac Model</a>\n';
    text += '  <dd class=nav><a style="font-weight: normal;" class="' + (('MD169'==nav)?'c':'') + 'nav" href="' + loc + 'MD169/index.html"' + navdescription('<b>24279B005</b><br> Effects of Stream Restoration<br> Project Chief: Ed Doheny') + 'Stream Restoration</a>\n';
  if (nav == 'archives' && arc == undefined) {
    text += '<dt class=nav><a class="cnav" href="' + loc + 'archives.html">Archives</a>\n';
  } else {
    text += '<dt class=nav><a class="nav" href="' + loc + 'archives.html">Archives</a>\n';
  }
  if (nav == 'archives' && arc != undefined) {
    tbeg = document.URL.indexOf('archives/')+9;
    tend = document.URL.indexOf('/index.html');
    arc2 = document.URL.substring(tbeg,tend);
    switch (arc2) {
      case 'MD080' :
        ttip = 'Maryland Nonpoint-Source Study';
        break;
      case 'MD102' :
        ttip = 'Potomac NAWQA';
        break;
      case 'MD144' :
        ttip = 'Mid-Atlantic Aquatic Systems';
        break;
      case 'MD147' :
        ttip = 'Birch Branch Non-Point Sources';
        break;
      case 'MD167' :
        ttip = 'Upper Pocomoke Ground-Water Quality';
        break;
      default : ttip = '<center><i>- archival document -</i></center>'; arc2 = arc;
    }
    text += '  <dd class=nav><a style="font-weight: normal;" class="cnav" href="' + loc + arc2 + '/index.html" onMouseOver="return' + " overlib('<pre class=popup> " + ttip + "</pre>', BORDER, '2', WIDTH, '20', FIXX, '80', OFFSETY, '12', STATUS, '" + arc2 + '/index.html\')" onMouseOut="nd(0);">' + arc2 + '</a>\n';
  }

  text += '<dt class=nav><a class="' + (('tools'==nav)?'c':'') + 'nav" href="' + loc + 'tools.html">Resources</a>\n';
  // Selection list...
    text += '  <dd class=nav><a style="font-weight: normal;" class="' + highlightif('weather',nav) + 'nav" href="' + loc + 'tools/weather.html"' + navtip('online&nbsp;weather information&nbsp;sources') + '>Weather</a> <img src="'+loc+'bullet_realtime.gif" border=0 align=absmiddle>\n';
    text += '  <dd class=nav><a style="font-weight: normal;" class="' + highlightif('software',nav) + 'nav" href="' + loc + 'tools/software_web.html"' + navtip('portable&nbsp;programs&nbsp;for district&nbsp;web&nbsp;pages') + '>Web Software</a>\n';
    text += '  <dd class=nav><a style="font-weight: normal;" class="' + highlightif('rescontacts',nav) + 'nav" href="' + loc + 'contacts.html"' + navtip('general&nbsp;research contacts&nbsp;list') + '>Research Contacts</a>\n';
    text += '  <dd class=nav><a style="font-weight: normal;" class="' + highlightif('datahelp',nav) + 'nav" href="' + loc + 'tools/manuals.html"' + navtip('data&nbsp;retrieval program&nbsp;documentations') + '>Data Help</a>\n';

  //if (nav == 'tools' && arc != 'tools') {
  //  text += '  <dd class=nav><a class="cnav" href="' + loc + arc.toLowerCase() + '.html">' + arc + '</a>\n';
  //}

  if (nav == 'usearc' && arc) {
    text += '<dt class=nav>&nbsp;\n';
    text += '<dt class=nav><a class="cnav" href="' + loc + 'help.html">' + arc + '</a>\n';
  }
  text += '</dl>\n';
  text += '</td>\n</tr>';

      
    increment = Math.floor(Math.random() * nslides);

    text += '<tr><td>&nbsp;</td></tr>\n' +
      '<tr><td style="background: url('+slideshow[increment]+') transparent top center;">' +
      '<img src='+loc+'pholder.gif width=146 height=322 alt="'+slideinfo[increment]+'"></td></tr>\n';

  text += '<tr><td class=navsep width="100%"><b>District Information</b></td></tr>\n';
  text += '<tr><td nowrap>\n';
  text += '<dl class=nav>\n';
  text += '<dt class=nav><a class="nav" href="' + loc + '../">District Home</a><br>\n';
  //text += '<table cellpadding=0 cellspacing=0 border=0 width="100%"><tr><td align=right><a style="font: 8pt, courier new;" class="nav" href="http://vs03dmdtws.er.usgs.gov/usgs/calendar">[more links...]</a></td></tr></table>\n';
  text += '<dt class=nav><a class="nav" href="http://md.water.usgs.gov/profiles/index.htm" target="_blank">Staff Directory</a>\n';
  text += '</dl>\n';
  text += '<br>\n';
  text += '</td>\n';
  
  // The following block creates a button that removes the navigation
  // links to make a page that is more suitable for printing and also
  // places a button in the footer that will show the links again.
  

  text += '<tr><td class=navsep ' + (nav=='help'?'style="background: #FFFFFF;':'') + ' width="100%"><a class=2 href="' + loc + 'help.html" ' +
      navtip('general&nbsp;help&nbsp;pages and&nbsp;site&nbsp;map') + '>\n' +
      '<b>Site Help</b></a></td></tr>\n';

    //text += '<tr><td nowrap align=center style="border: solid 1pt #006F41;';
    //if (nav == 'help') {
    //  text += ' background: #FFEFD4;">\n';
    //} else {
    //  text += '">\n';
    //}
    //text += '<a class=2 href="' + loc + 'help.html" ' +
    //  navtip('general&nbsp;help&nbsp;pages and&nbsp;site&nbsp;map') + '>\n' +
    //  '<pre style="color: #006F41;">Site Help</pre></a></td></tr>\n';

  //text += '<tr><td class=navsep width="100%"><a class=2 href="javascript:void(0);" ' +
  //    navtip('hides&nbsp;the&nbsp;navigation&nbsp;bar&nbsp;for better&nbsp;printing&nbsp;results') + '\n' +
  //    'onclick="javascript:nd(0); navs.innerHTML=\'\'; headerCellEx.innerHTML=\'\'; var outofprint_navbg=navs.style.background; navs.style.background=\'\'; outofprint.innerHTML=showbarbutton('; // navs.style.background=\'#FFFFFF\';
  //  for ( i = 0; i < ar.length; i++ ) {
  //    text += "'" + ar[i] + "'";
  //    j=1+i;
  //    if (ar[j]) { text += ',' }
  //  }
  //  text += ');"><b>Printable Page</b></a></td></tr>\n';

  // The next block appears on the internal pages only.
  if (getServer() !== "http://md.water.usgs.gov") {
    text += '<tr><td class=navsep width="100%"><a id=colorblind href="javascript:void(0);" onclick="grayscale();" ' +
      navtip('simulates colorblindness') + ' style="font-weight: bold;">\n' +
      'Grayscale</a></td></tr>\n';
  }


    // The next block appears on the internal pages only.
    if (getServer() !== "http://md.water.usgs.gov") {
      text += '<tr><td><br><br></td></tr>';
      text += '<tr><td align=center style="background: #AA0000; padding: 3px; border: 1px inset;"><b style="font-family: verdana, sans-serif; font-size: 10px;">' +
        '<a style="color: #FFFFFF;" href="http://md.water.usgs.gov/' + document.URL.substr(document.URL.indexOf("watershed/")) + '" ' +
        navtip('you&nbsp;are&nbsp;currently&nbsp;on&nbsp;the MD-DE-DC&nbsp;Intranet<br><i>click&nbsp;for&nbsp;Internet&nbsp;version</i>') + '>Internal&nbsp;Access&nbsp;Only</a></b></td></tr>';
    }

  text += '</table></div>\n';

  // END OF BLOCK ///////////////////////////////////////////////////
  
  // Finally, the text is sent back to the html.
  return text;
}

function highlightif(id,current) {
  // This function will decide which links to highlight as the
  // current page. The highlight style is controled in the
  // stylesheets with the ".cnav" section.
  if (id == current) {
    return 'c';
  } else {
    return '';
  }
}

var timerID = null;
function navdescription(desc) {
  return ' onMouseOver="clearTimeout(timerID); var winstat=this.href; return' +
    " overlib('<pre class=popup> " + desc + "</pre>', BORDER, '2', FGCOLOR, '#E8E8DB', BGCOLOR, '#CDCDB4', WIDTH, '20', FIXX, '170', OFFSETY, '12', STATUS, winstat)" +
    '" onMouseOut="timerID=setTimeout(\'nd(0)\',100);">\n';
}
function navtip(desc) {
  return ' onMouseOver="var winstat=this.href; return' +
    " overlib('<center>" + desc + "</center>', DELAY, 700, BORDER, '1', WIDTH, '100', FGCOLOR, '#FFFFFF', BGCOLOR, '#006F41', OFFSETY, '-20', STATUS, winstat)" +
    '" onMouseOut="nd(0);" ';
}

function showbarbutton() {
  var ar = arguments;
  binfo = '<a href="javascript:void(0);" onclick="javascript:navs.innerHTML=nav_menu(';
  for ( i = 0; i < ar.length; i++ ) {
    binfo += "'" + ar[i] + "'";
    j=1+i;
    if (ar[j]) { binfo += ',' }
  }
  binfo += "); navs.style.background='url(graphics/bg_navbar_m.gif) repeat-y'; " +
    "outofprint.innerHTML='';" + '">' + 'show navbar' + '</a>';
  return binfo;  //
}

function fwLoadMenus() {
  if (window.fw_menu_0) return;
  window.fw_menu_0 = new Menu("root",112,16,"Verdana, Arial, Helvetica, sans-serif",9,"#660000","#ffffff","#ffffff","#660000");
  fw_menu_0.addMenuItem("Public Home Page","location='http://md.water.usgs.gov'");
  if (getServer() !== "http://md.water.usgs.gov") fw_menu_0.addMenuItem("Internal Home Page","location='http://vs03dmdtws.er.usgs.gov/usgs'");
   fw_menu_0.hideOnMouseOut=true;
  window.fw_menu_1 = new Menu("root",148,17,"Verdana, Arial, Helvetica, sans-serif",10,"#660000","#ffffff","#ffffff","#660000");
  fw_menu_1.addMenuItem("Phone and e.mail info","location='http://md.water.usgs.gov/district/directory.html'");
   fw_menu_1.hideOnMouseOut=true;
  window.fw_menu_2 = new Menu("root",139,16,"Verdana, Arial, Helvetica, sans-serif",9,"#660000","#ffffff","#ffffff","#660000");
  fw_menu_2.addMenuItem("About the District","location='http://md.water.usgs.gov/district'");
  fw_menu_2.addMenuItem("Who are we?","location='http://md.water.usgs.gov/profiles/index.htm'");
  fw_menu_2.addMenuItem("Where are we?","location='http://md.water.usgs.gov/directions/'");
  fw_menu_2.addMenuItem("District Brochure (PDF)","location='http://md.water.usgs.gov/brochure.pdf'");
   fw_menu_2.hideOnMouseOut=true;
  window.fw_menu_3 = new Menu("root",207,16,"Verdana, Arial, Helvetica, sans-serif",9,"#660000","#ffffff","#ffffff","#660000");
  fw_menu_3.addMenuItem("Online Reports","location='http://md.water.usgs.gov/publications/online.html'");
  fw_menu_3.addMenuItem("Abstracts","location='http://md.water.usgs.gov/publications/abstracts.html'");
  fw_menu_3.addMenuItem("Bibliography","location='http://md.water.usgs.gov/publications/bibliography.html'");
  fw_menu_3.addMenuItem("Press Releases and News Advisories","location='http://md.water.usgs.gov/publications/press_release/'");
  fw_menu_3.addMenuItem("Presentations","location='http://md.water.usgs.gov/publications/presentations.html'");
  fw_menu_3.addMenuItem("Search Online Publications","location='http://md.water.usgs.gov/publications/search_pubs.html'");
  fw_menu_3.addMenuItem("Reports from 2000","location='http://md.water.usgs.gov/publications/2000_pubs/'");
   fw_menu_3.hideOnMouseOut=true;
  window.fw_menu_4 = new Menu("root",265,16,"Verdana, Arial, Helvetica, sans-serif",9,"#660000","#ffffff","#ffffff","#660000");
  fw_menu_4.addMenuItem("Project Lists","location='http://md.water.usgs.gov/projects/list.html'");
  fw_menu_4.addMenuItem("Keyword Search","location='http://md.water.usgs.gov/projects/search_projects.html'");
  fw_menu_4.addMenuItem("Baltimore Ecosystem Study","location='http://md.water.usgs.gov/BES/'");
  fw_menu_4.addMenuItem("Chesapeake Bay River Input Monitoring Program","location='http://va.water.usgs.gov/chesbay/RIMP/'");
  fw_menu_4.addMenuItem("Chesapeake Bay Ecosystem Project","location='http://chesapeake.usgs.gov/'");
   fw_menu_4.hideOnMouseOut=true;
  window.fw_menu_5 = new Menu("root",152,16,"Verdana, Arial, Helvetica, sans-serif",9,"#660000","#ffffff","#ffffff","#660000");
  fw_menu_5.addMenuItem("Real-Time Water Data","location='http://md.water.usgs.gov/realtime/'");
  fw_menu_5.addMenuItem("Ground-Water Information","location='http://md.water.usgs.gov/groundwater/'");
  fw_menu_5.addMenuItem("Monthly Water Conditions","location='http://md.water.usgs.gov/monthly/'");
  fw_menu_5.addMenuItem("Monthly Reports","location='http://md.water.usgs.gov/monthly_rpts.htm'");
  fw_menu_5.addMenuItem("Historical Water Data","location='http://md.water.usgs.gov/historical.html'");
  fw_menu_5.addMenuItem("Other Water Information","location='http://md.water.usgs.gov/waterdata.html'");
  fw_menu_5.addMenuItem("Weather &amp; Climate","location='http://md.water.usgs.gov/weather.html'");
  fw_menu_5.addMenuItem("Chesapeake Bay","location='http://chesapeake.usgs.gov/'");
   fw_menu_5.hideOnMouseOut=true;

  fw_menu_5.writeMenus();
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}