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; 

// Version 2.7 release 
// 1. using default Domain, like "orientalmotor.thomasnet.com" in our sample 
// 2. using root category shortName, like "all-categories" in our sample 
url = "http://carsonsnutbolttoolcoinc.thomasnet.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; 
} 
//alert (url); 
} 

URL = window.location.href; 
indexhtml = (URL.indexOf('index.') > -1); 
suppliershtml = (URL.indexOf('suppliers.') > -1); 
newshtml = (URL.indexOf('news.') > -1); 
literaturehtml = (URL.indexOf('literature.') > -1); 
abouthtml = (URL.indexOf('about.') > -1); 
contacthtml = (URL.indexOf('contact.') > -1); 
requestinformationhtml = (URL.indexOf('request') > -1); 
pneumatichtml = (URL.indexOf('category/pneumatic-air-tools-and-accessories') > -1); 
powertoolshtml = (URL.indexOf('category/power-tools') > -1); 
handtoolshtml = (URL.indexOf('category/hand-tools') > -1); 
jobsitehtml = (URL.indexOf('category/job-site-equipment-and-accessories') > -1); 
safetyequipmenthtml = (URL.indexOf('category/safety-equipment') > -1); 
flangepackshtml = (URL.indexOf('category/flange-packs') > -1); 
powergenerationhtml = (URL.indexOf('category/power-generation') > -1); 
anchorshtml = (URL.indexOf('category/anchors') > -1); 
boltshtml = (URL.indexOf('category/bolts') > -1); 
fastenershtml = (URL.indexOf('category/fasteners') > -1); 




window.onload = function navigations(){ 
if (indexhtml) { 
var x=document.getElementById("home"); 
x.className = 'highlight_class'; 
} 

else if (suppliershtml){ 
var x=document.getElementById("supplier"); 
x.className = 'highlight_class'; 
} 

else if (newshtml){ 
var x=document.getElementById("news"); 
x.className = 'highlight_class'; 
} 

else if (literaturehtml){ 
var x=document.getElementById("literature"); 
x.className = 'highlight_class'; 
} 

else if (abouthtml){ 
var x=document.getElementById("about"); 
x.className = 'highlight_class'; 
} 

else if (contacthtml){ 
var x=document.getElementById("contact"); 
x.className = 'highlight_class'; 
} 
else if (requestinformationhtml){ 
var x=document.getElementById("request"); 
x.className = 'highlight_class'; 
} 

else if (pneumatichtml){ 
var x=document.getElementById("pneumatic"); 
x.className = 'highlight_leftnav'; 
} 

else if (powertoolshtml){ 
var x=document.getElementById("powertools"); 
x.className = 'highlight_leftnav'; 
} 

else if (handtoolshtml){ 
var x=document.getElementById("handtools"); 
x.className = 'highlight_leftnav'; 
} 

else if (jobsitehtml){ 
var x=document.getElementById("jobsite"); 
x.className = 'highlight_leftnav'; 
} 

else if (safetyequipmenthtml){ 
var x=document.getElementById("safetyequipment"); 
x.className = 'highlight_leftnav'; 
} 

else if (flangepackshtml){ 
var x=document.getElementById("flangepacks"); 
x.className = 'highlight_leftnav'; 
} 

else if (powergenerationhtml){ 
var x=document.getElementById("powergeneration"); 
x.className = 'highlight_leftnav'; 
} 

else if (anchorshtml){ 
var x=document.getElementById("anchor"); 
x.className = 'highlight_leftnav'; 
} 

else if (boltshtml){ 
var x=document.getElementById("bolts"); 
x.className = 'highlight_leftnav'; 
} 

else if (fastenershtml){ 
var x=document.getElementById("fasteners"); 
x.className = 'highlight_leftnav'; 
} 

} 
