function ctlSearch_OnClick ()
{
 var url;
 var theform = document.frmSearchBox;
 
 if (theform.keyword.value.length < 2)
 {
  alert('Please enter at least two characters.');
  theform.keyword.focus();
 }
 else
 {
 var iIndex = theform.ddlSearchType.selectedIndex;
 var sSearchType = theform.ddlSearchType.options[iIndex].value;

  url = "http://equipment.metrohydraulic.com/keyword/?&plpver=10&key=all&keycateg=100"
  url = url + "&SchType=" + sSearchType;
  url = url + "&keyword=" + encodeURI(theform.keyword.value);
  url = url + "&refer=" + encodeURI("http://" + document.location.hostname);
   
  document.location.href = url;
 }  
}  

URL = window.location.href; 
indexhtml = (URL.indexOf('index.') > -1); 
online_cataloghtml = (URL.indexOf('equipment.metrohydraulic.com/?') > -1); 
serviceshtml = (URL.indexOf('services.') > -1);
manufacturerhtml = (URL.indexOf('manufacturer.') > -1);
abouthtml = (URL.indexOf('about.') > -1); 
rfqhtml = (URL.indexOf('request/all-categories?') > -1);  
contacthtml = (URL.indexOf('contact.') > -1);

cylindershtml = (URL.indexOf('/cylinders?') > -1); 
pumpshtml = (URL.indexOf('/pumps?') > -1); 
valveshtml = (URL.indexOf('/valves?') > -1); 
toolshtml = (URL.indexOf('/tools?') > -1); 
hydrualic_air_jackshtml = (URL.indexOf('/hydrualic-air-jacks?') > -1); 
accessories_componentshtml = (URL.indexOf('/accessories-components?') > -1); 
presses_shop_equipmenthtml = (URL.indexOf('/presses-shop-equipment?') > -1); 
pullershtml = (URL.indexOf('/pullers?') > -1); 
mechanical_jackshtml = (URL.indexOf('/mechanical-jacks?') > -1); 
puncheshtml = (URL.indexOf('/punches?') > -1); 
torque_wrencheshtml = (URL.indexOf('/torque-wrenches-torque-wrench-pumps-accessories?') > -1); 



material_handlinghtml = (URL.indexOf('material-handling.') > -1);
lubrication_equiphtml = (URL.indexOf('lubrication-equipment.') > -1);
automotive_jackshtml = (URL.indexOf('automotive-jacks.') > -1);
nfpahtml = (URL.indexOf('pneumatic-cylinder.') > -1);
industrial_planthtml = (URL.indexOf('industrial-plant.') > -1);
hydraulic_valves_accessorieshtml = (URL.indexOf('hydraulic-valves-accessories.') > -1);


window.onload = function navigations(){ 
if (indexhtml) { 
var x=document.getElementById("home"); 
x.className = 'highlight_class'; 
} 

else if (online_cataloghtml){ 
var x=document.getElementById("online_catalog"); 
x.className = 'highlight_class'; 
} 

else if (serviceshtml){ 
var x=document.getElementById("services"); 
x.className = 'highlight_class'; 
} 

else if (manufacturerhtml){ 
var x=document.getElementById("manufacturer"); 
x.className = 'highlight_class'; 
} 

else if (abouthtml){ 
var x=document.getElementById("about"); 
x.className = 'highlight_class'; 
} 

else if (rfqhtml){ 
var x=document.getElementById("rfq"); 
x.className = 'highlight_class'; 
} 

else if (contacthtml){ 
var x=document.getElementById("contact"); 
x.className = 'highlight_class'; 
} 

else if (cylindershtml){ 
var x=document.getElementById("cylinders"); 
x.className = 'highlight_class1'; 
} 

else if (pumpshtml){ 
var x=document.getElementById("pumps"); 
x.className = 'highlight_class1'; 
} 

else if (valveshtml){ 
var x=document.getElementById("valves"); 
x.className = 'highlight_class1'; 
} 

else if (toolshtml){ 
var x=document.getElementById("tools"); 
x.className = 'highlight_class1'; 
} 

else if (hydrualic_air_jackshtml){ 
var x=document.getElementById("hydrualic_air_jacks"); 
x.className = 'highlight_class1'; 
} 

else if (accessories_componentshtml){ 
var x=document.getElementById("accessories_components"); 
x.className = 'highlight_class1'; 
} 

else if (presses_shop_equipmenthtml){ 
var x=document.getElementById("presses_shop_equipment"); 
x.className = 'highlight_class1'; 
} 

else if (pullershtml){ 
var x=document.getElementById("pullers"); 
x.className = 'highlight_class1'; 
} 

else if (mechanical_jackshtml){ 
var x=document.getElementById("mechanical_jacks"); 
x.className = 'highlight_class1'; 
} 

else if (puncheshtml){ 
var x=document.getElementById("punches"); 
x.className = 'highlight_class1'; 
} 

else if (torque_wrencheshtml){ 
var x=document.getElementById("torque_wrenches"); 
x.className = 'highlight_class1'; 
} 





else if (material_handlinghtml){ 
var x=document.getElementById("material_handling"); 
x.className = 'highlight_class1'; 
} 

else if (lubrication_equiphtml){ 
var x=document.getElementById("lubrication_equip"); 
x.className = 'highlight_class1'; 
} 

else if (automotive_jackshtml){ 
var x=document.getElementById("automotive_jacks"); 
x.className = 'highlight_class1'; 
} 

else if (nfpahtml){ 
var x=document.getElementById("nfpa"); 
x.className = 'highlight_class1'; 
} 

else if (industrial_planthtml){ 
var x=document.getElementById("industrial_plant"); 
x.className = 'highlight_class1'; 
} 

else if (hydraulic_valves_accessorieshtml){ 
var x=document.getElementById("hydraulic_valves_accessories"); 
x.className = 'highlight_class1'; 
} 

} 
