function jumpAlert() { 
  msg = new String();
  msg = msg.concat("NOAA's National Weather Service provides a link to this external ");
  msg = msg.concat("web page because it may contain related information of interest to ");
  msg = msg.concat("you. This link does not constitute an endorsement by the NWS of any "); 
  msg = msg.concat("information, products or services on this external Web site. The ");
  msg = msg.concat("NWS does not own or operate these sites and is not responsible for ");
  msg = msg.concat("site maintenance or data accuracy. Use this data at your own risk.");
  window.alert(msg);
}//END: jumpAlert()

function getproduct( issuedby, pil, versions ) {
  ans = new String("http://forecast.weather.gov/product.php?site=NWS&issuedby=");
  ans = ans.concat(issuedby);
  ans = ans.concat("&product=");
  ans = ans.concat(pil);
  ans = ans.concat("&format=CI&version=1");
  ans = ans.concat("&glossary=0");
  if (pil == 'AFD')
    ans = ans.concat("&highlight=off");
	loc = ans;
	//
	// These products are not available from the forecast.weather.gov/product.php script
	// The gateway or some other site has to be used to pull these in
	//
	gatewayStart = "http://weather.noaa.gov/pub/data/raw/";
	gatewayEnd = ".txt";
	//
	// Offshore forecast
	//
  if ((issuedby == 'PHI') && (pil == 'OFF')){
    loc = 'http://weather.noaa.gov/cgi-bin/fmtbltn.pl?file=forecasts/marine/offshore/an/anz084.txt';
  }
	//
	// Allentown, PA TAF
	//
  if ((issuedby == 'ABE') && (pil == 'TAF')){
    loc = gatewayStart + 'ft/ftus41.kphi.taf.abe' + gatewayEnd;
  }
	//
	// RR8
	//
  if ((issuedby == 'PHI') && (pil == 'RR8')){
    loc = gatewayStart + 'sr/srus81.kphi.rr8.phi' + gatewayEnd;
  }
	//
	// MWW
	//
  if ((issuedby == 'PHI') && (pil == 'MWW')){
    loc = 'http://www.erh.noaa.gov/data/txtprods/PHI/MWWPHI';
  }
		
  if (loc != ''){
    window.location.href = loc;
  }  
}//END: getproduct()

function trim(stringToTrim) {
 return stringToTrim.replace(/^\s+|\s+$/g,"");
}//END: trim()

function changeCursor( objID, cursorVal ) {
  // possible values auto,pointer,crosshair,help,move,text,default,wait
  if (document.getElementById){
    document.getElementById( objID ).style.cursor = cursorVal;
  }
}// END: changeCursor()

function getLeftSidebar( level ) {
    // Generate the Left sidebar 
    var op = String('');
    var sp = '&nbsp;&nbsp;&nbsp;&nbsp;';
    var br = '<br />';
    var sA = '<a onclick="this.blur();" ';
    var omout1  = ' onmouseout="this.style.color='  + "'#ffffff'" + ';" ';
    var omover1 = ' onmouseover="this.style.color=' + "'#eee8aa'" + ';' + 'changeCursor(this.id,' + "'pointer'" + ');" ';
    var func1 = omout1 + omover1;
    //
    // Set the directory level (relative path) (0 no relative path, 1 == one up i.e. '../', 2 == two up i.e. '../../'
    //
    var lev = String('');
    if (level != undefined ){
      switch (level) {
        case 1:
          lev = '../';
          break;
        case 2:
          lev = '../../';
          break;
        case 3:
          lev = '../../../';
          break;
        case 4:
          lev = '../../../../';
          break;
        case 5:
          lev = '../../../../../';
          break;
      }//switch
    }//if
    op += '<table cellspacing="0" cellpadding="2" border="0" width="130">';
    op += '<tr>';
    op += '  <td class="yellow" align="center">Local forecast by<br />"City, St" or zip code</td>';
    op += '</tr>';
    op += '<tr align="center" valign="top">';
    op += '  <td class="searchinput" valign="top">';
    op += '  <form method="POST" action="http://www.srh.noaa.gov/zipcity.php">';
    op += '  <input type="text" name="inputstring" size="10" value="City, St" onFocus="this.value=' + "''" +';" />';
    op += '  <input type="submit" name="Go2" value="Go" />';
    op += '  </form>';
    op += '  </td>';
    op += '</tr>';
    op += '<tr>';
    op += '  <!-- Left sidebar -->';
    op += '<td class="white" id="menuitem">';
    op += '<span class="yellow">Current Hazards</span>';
    op += br;
    op += sp + sA + ' href="' + lev + 'hazardous.html" title="Watches, warnings, advisories, and statements">Local Hazards</a>';
    op += br;
    op += sp + '<span id="hwop" ' + func1 + 'onclick="getproduct(' + "'PHI','HWO',0);" + 'this.blur();">';
    op += 'Hazardous<br />' + sp + '&nbsp;&nbsp;Weather Outlook</span>';
    op += br;
    op += sp + sA + ' href="http://www.spc.noaa.gov/products/outlook/" title="Convective Outlooks from SPC">Convective<br />' + sp + '&nbsp;&nbsp;Outlooks</a>';
    op += br;
    op += sp + sA + ' href="' + lev + 'winter.html" title="Winter forecasts, and other data">Winter Weather</a>';
    op += br;
    op += sp + sA + ' href="' + lev + 'tropical.html" title="Tropical forecasts, advisories, statements and discussions">Tropical Weather</a>';
    op += br;
    op += br;
    op += '<span class="yellow">Current Conditions</span>';
    op += br;
    op += sp + sA + ' href="' + lev + 'current.html" title="Surface, upper air, & marine observations">Observations</a>';
    op += br;
    op += sp + sA + ' href="' + lev + 'satellite.php" title="Geostationary Satellite Server">Satellite Images</a>';
    op += br;
    op += sp + sA + ' href="http://newweb.erh.noaa.gov/ahps2/index.php?wfo=phi" title="Rivers and Lakes AHPS">Rivers &amp; Lakes<br />' + sp + '&nbsp;&nbsp;AHPS</a>';
    op += br;
    op += br;
    op += '<span class="yellow">Radar Imagery</span>';
    op += br;
    op += sp + sA + ' href="' + lev + 'radar.htm" title="Radar images from Mt. Holly and surrounding sites">Mt. Holly Radar</a>';
    op += br;
    op += sp + sA + ' href="http://www.erh.noaa.gov/radar/mosaic/DS.p19r0/ar.us.conus.shtml" title="Nationwide radar mosaic">Nationwide</a>';
    op += br;
    op += br;
    op += '<span class="yellow">Forecasts</span>';
    op += br;
    op += sp + sA + ' href="http://forecast.weather.gov/wxplanner.php?site=phi" title="Activity Planner">Activity Planner</a>';
    op += br;
    op += sp + sA + ' href="' + lev + 'forecast.html" title="Short/Long range forecasts & discussions">Local Forecasts</a>';
    op += br;
    op += sp + sA + ' href="' + lev + 'aviation.html" title="Aviation forecasts">Aviation</a>';
    op += br;
    op += sp + sA + ' href="' + lev + 'marine.html" title="Marine forecasts & observations, and tidal information">Marine</a>';
    op += br;
    op += sp + sA + ' href="' + lev + 'fire.html" title="Fire weather forecasts and observations">Fire Weather</a>';
    op += br;
    op += sp + sA + ' href="' + lev + 'air_quality.html" title="Air quality forecasts">Air Quality</a>';
    op += br;
    op += sp + sA + ' href="' + lev + 'models.html" title="Weather forecast models">Model Guidance</a>';
    op += br;
    op += br;
    op += '<span class="yellow">Hydrology</span>';
    op += br;
    op += sp + sA + ' href="' + lev + 'hydrology.html" title="River/Rainfall Data">River, Rainfall,<br />' + sp + '&nbsp;&nbsp;Snow and Ice</a>';
		op += br;
    op += sp + sA + ' href="' + lev + 'hydrology.html#river_ice_reports" title="Submit and View River Ice Reports">River Ice Reports</a>';
		op += br;
    op += sp + sA + ' href="' + lev + 'drought.html" title="Drought Status and Information">Drought<br />' + sp + '&nbsp;&nbsp;Information</a>';
    op += br;
    op += br;
    op += '<span class="yellow">Climate</span>';
    op += br;
    op += sp + sA + ' href="http://www.weather.gov/climate/index.php?wfo=phi" title="Local Climate Data">Local</a>';
    op += br;
    op += sp + sA + ' href="http://www.weather.gov/climate/" title="National Climate Data">National</a>';
    op += br;
    op += sp + sA + ' href="http://www.weather.gov/climate/local_data.php?wfo=phi" title="Additonal Climate Links">More ...</a>';
    op += br;
    op += br;
    op += '<span class="yellow">Weather Safety</span>';
    op += br;
    op += sp + sA + ' href="' + lev + 'wxradio.htm" title="NOAA All Hazards Weather Radio information">Weather Radio</a>';
    op += br;
    op += sp + sA + ' href="' + lev + 'stormready/" title="Learn about StormReady communities">Storm Ready</a>';
    op += br;
    op += sp + sA + ' href="' + lev + 'prepardness.html" title="How to prepare for various types of weather">Preparedness</a>';
    op += br;
    op += sp + sA + ' href="' + lev + 'skywarn/index.html" title=" Link to Skywarn spotter information" >Skywarn<sup>TM</sup></a>';
    op += br;
    op += sp + sA + ' href="' + lev + 'emerman.htm" title="Information for Emergency Managers">Emergency<br />' + sp + '&nbsp;&nbsp;Manager&#039;s Page</a>';
    op += br;
    op += br;
    op += '<span class="yellow">Office Programs</span>';
    op += br;
    op += sp + sA + ' href="' + lev + 'research_reports.html" title="Office research and reports">Research/Reports</a>';
    op += br;
    op += sp + sA + ' href="' + lev + 'education.html" title="Information for teachers & students">Education/Outreach</a>';
    op += br;
    op += sp + sA + ' href="' + lev + 'coop.html" title="Cooperative Weather Observers">Coop. Observers</a>';
    op += br;
    op += br;
    op += '<span class="yellow">Office Information</span>';
    op += br;
    op += sp + sA + ' href="' + lev + 'directions.html" title="tours/directions">Tours/Directions</a>';
    op += br;
    op += sp + sA + ' href="' + lev + 'staff.html" title="Mt. Holly staff listing">Staff</a>';
    op += br;
    op += sp + sA + ' href="' + lev + 'tour/" title="Tour NWS Mt. Holly">Virtual Tour</a>';
    op += br;
    op += br;
    op += '<span class="yellow">Other Information</span>';
    op += br;
    op += sp + sA + ' href="' + lev + 'spacewx">Space Weather</a>';
    op += br;
    op += sp + sA + ' href="http://www.srh.weather.gov/jetstream/append/glossary_a.htm">Glossary</a>';
    op += br;
    op += sp + sA + ' href="http://www.srh.weather.gov/jetstream/append/acronyms_a.htm">Acronyms</a>';
    op += br;
    op += sp + sA + ' href="http://www.srh.noaa.gov/tulsa/nws_contract.html">NWS Contractions</a>';
    op += br;
    op += sp + '<a onclick="jumpAlert();this.blur();" href="http://www.udel.edu/Geography/AMS_Chapter" title=" Link to AMS Delaware-Philadelphia Area Chapter">Local AMS Chapter</a>';
    op += br;
    op += sp + '<a onclick="jumpAlert();this.blur();" href="http://www.unidata.ucar.edu/content/community/participatinguniversities.html" title="University Weather Servers">University Weather<br />' + sp + '&nbsp;&nbsp;Servers</a>';
    op += br;
    op += sp + sA + ' href="http://www.nws.noaa.gov/im/more.htm" title="Commercial Weather Servers">Commercial<br />' + sp + '&nbsp;&nbsp;Weather Servers</a>';
    op += br;
    op += br;
    op += '<span class="yellow">Contact Us</span>';
    op += br;
    op += sp + sA + ' href="mailto:wfophi.webmaster@noaa.gov?subject=Question to the National Weather Service Office in Mount Holly, NJ" title="Contact the Webmaster via e-mail">E-mail Webmaster</a>';
    op += br;
    op += sp + sA + ' href="' + lev + 'wxreport.htm" title="Send us your storm report">Send Storm Report</a>';
    op += br;
    op += br;
    op += '  </td>';
    op += '</tr>';
    op += '<tr>';
    op += '  <td align="center">';
    op += '  <a href="http://www.usa.gov" onclick="this.blur();">';
    op += '  <img src="' + lev + 'images/usagov_logo_color_110w.gif" alt="www.usa.gov is the U.S. Government&acute;s official Web protal to all Federal, state and local government Web resources and services" border="0" />'
    op += '  </a>';
    op += '  </td>';
    op += '</tr>';
    op += '</table>';
    //
    // Finish up
    //
    document.write(op);
}//END: getLeftSidebar()
