function showNav()
{
  d = document.location.href.toLowerCase();
  isOffline = false;
  if(d.indexOf("")<0 && d.indexOf("")<0) isOffline=true;
  if(d.indexOf("index.html")>=0 || d=="" || d=="")
    theLine = "<font class=\"currentlink\">Home</font> &nbsp;|&nbsp; ";
  else
    theLine = "<a href=\"index.html\" class=\"navlink\">Home</a> &nbsp;|&nbsp; ";
  if(d.indexOf("profile.html")>=0)
    theLine += "<font class=\"currentlink\">Profile</font> &nbsp;|&nbsp; ";
  else
    theLine += "<a href=\"profile.html\" class=\"navlink\">Profile</a> &nbsp;|&nbsp; ";
  if(d.indexOf("detection.html")>=0 || d.indexOf("rapidattack.html")>=0 || d.indexOf("protection.html")>=0)
    theLine += "<font class=\"currentlink\">Products</font> &nbsp;|&nbsp; ";
  else
    theLine += "<a href=\"detection.html\" class=\"navlink\">Products</a> &nbsp;|&nbsp; ";
  if(d.indexOf("media")>=0)
    theLine += "<font class=\"currentlink\">Media</font> &nbsp;|&nbsp; ";
  else
    theLine += "<a href=\"media.html\" class=\"navlink\">Media</a> &nbsp;|&nbsp; ";
  if(isOffline==true)
  {
    if(d.indexOf("contact.html")>=0)
      theLine += "<font class=\"currentlink\">Contact Us</font> &nbsp;|&nbsp; ";
    else
      theLine += "<a href=\"contact2.html\" class=\"navlink\">Contact Us</a> &nbsp;|&nbsp; ";
  }
  else
  {
    if(d.indexOf("contact2.html")>=0)
      theLine += "<font class=\"currentlink\">Contact Us</font> &nbsp;|&nbsp; ";
    else
      theLine += "<a href=\"contact2.html\" class=\"navlink\">Contact Us</a> &nbsp;|&nbsp; ";
  }
  if(d.indexOf("news.html")>=0)
    theLine += "<font class=\"currentlink\">News</font> &nbsp;|&nbsp; ";
  else
    theLine += "<a href=\"news.html\" class=\"navlink\">News</a> &nbsp;|&nbsp; ";
  if(isOffline==false)
  {
    if(d.indexOf("contactform.html")>=0)
      theLine += "<font class=\"currentlink\">Quotes</font> &nbsp;|&nbsp; ";
    else
      theLine += "<a href=\"contactform.html\" class=\"navlink\">Quotes</a> &nbsp;|&nbsp; ";
  }
  if(d.indexOf("links.html")>=0)
    theLine += "<font class=\"currentlink\">Links</font> &nbsp;&nbsp; ";
  else
    theLine += "<a href=\"links.html\" class=\"navlink\">Links</a> &nbsp;&nbsp; ";
  //if(isOffline==false)
  //{
    //if(d.indexOf("special.html")>=0)
      //theLine += "<font class=\"currentlink\">Special</font>";
    //else
      //theLine += "<a href=\"news/High_Country_News_Special_Ad.PDF\" class=\"navspeciallink\">Special</a>";
  //}
  return theLine;
}

function validateForm(f)
{
  if(!validate(f.first_name, "Please provide your first name.")) return false;
  if(!validate(f.last_name, "Please provide your last name.")) return false;
  if(!validate(f.email, "Please provide your email address.")) return false;
  if(!validate(f.message, "You must provide a message for the email.")) return false;
  return true;
}

function validate(element, caption)
{
  if(element.value==null || element.value=="" || element.value==void(0))
  {
    if(caption!=null) alert(caption);
    element.focus();
    return false;
  }
  return true;
}

function showRapidAttackNav()
{
  d = document.location.href.toLowerCase();
  theLine = "<a href=\"mobile_units.html\" style=\"padding-top:5px;padding-bottom:5px;\" onMouseOver=\"showHideRapid('show');\" onMouseOut=\"showHideRapid('hide');\" class=\"navlink\">Mobile Units</a><br>\n";
  theLine += "<a href=\"drop_in_units.html\" style=\"padding-top:5px;padding-bottom:5px;\" onMouseOver=\"showHideRapid('show');\" onMouseOut=\"showHideRapid('hide');\" class=\"navlink\">Drop In Units</a><br>\n";
  theLine += "<a href=\"cafs.html\" style=\"padding-top:5px;padding-bottom:5px;\" onMouseOver=\"showHideRapid('show');\" onMouseOut=\"showHideRapid('hide');\" class=\"navlink\">CAFS</a><br>\n";
  theLine += "<a href=\"foam_equipment.html\" style=\"padding-top:5px;padding-bottom:5px;\" onMouseOver=\"showHideRapid('show');\" onMouseOut=\"showHideRapid('hide');\" class=\"navlink\">Foam Equipment</a><br>\n";
  theLine += "<a href=\"fire_hose.html\" style=\"padding-top:5px;padding-bottom:5px;\" onMouseOver=\"showHideRapid('show');\" onMouseOut=\"showHideRapid('hide');\" class=\"navlink\">Fire Hose</a><br>\n";
  theLine += "<a href=\"adapters_and_fittings.html\" style=\"padding-top:5px;padding-bottom:5px;\" onMouseOver=\"showHideRapid('show');\" onMouseOut=\"showHideRapid('hide');\" class=\"navlink\">Adapters & Fittings</a><br>\n";
  theLine += "<a href=\"nozzles_and_valves.html\" style=\"padding-top:5px;padding-bottom:5px;\" onMouseOver=\"showHideRapid('show');\" onMouseOut=\"showHideRapid('hide');\" class=\"navlink\">Nozzles & Valves </a><br>\n";
  theLine += "<a href=\"pumps.html\" style=\"padding-top:5px;padding-bottom:5px;\" onMouseOver=\"showHideRapid('show');\" onMouseOut=\"showHideRapid('hide');\" class=\"navlink\">Pumps</a><br>\n";
  theLine += "<a href=\"retardants_foam_and_gel.html\" style=\"padding-top:5px;padding-bottom:5px;\" onMouseOver=\"showHideRapid('show');\" onMouseOut=\"showHideRapid('hide');\" class=\"navlink\">Retardants, Foam & Gel</a><br>\n";
  return theLine;
}

keepalive = 0;
function showHideRapid(choice)
{
  var which = document.getElementById("rapidNav");
  if(choice=="show")
  {
    which.style.visibility = "visible";
    if(which.style.left=="")
    {
      leftAdjust = document.body.offsetWidth/2;
      topAdjust = -which.offsetTop;
      which.style.left=leftAdjust-183;
      which.style.top=topAdjust+72;
    }
    keepalive = 1;
  }
  if(choice=="hide")
  {
    keepalive=0;
    window.setTimeout("showHideRapid('kill')", 300);
  }
  if(choice=="kill")
  {
    if(keepalive==0)
      which.style.visibility="hidden";
  }
}