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://ctemp.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);  
abouthtml = (URL.indexOf('about.') > -1);  
literaturehtml = (URL.indexOf('literature.') > -1);  
rfqhtml = (URL.indexOf('request/all-categories') > -1);  
contacthtml = (URL.indexOf('contact.') > -1);  
labelinghtml = (URL.indexOf('labeling.') > -1);  
designhtml = (URL.indexOf('design.') > -1);  
packaginghtml = (URL.indexOf('packaging.') > -1);  

  

window.onload = function navigations(){  
if (indexhtml) {  
var x=document.getElementById("home");  
x.className = 'highlight_class';  
}  

else if (abouthtml){  
var x=document.getElementById("about");  
x.className = 'highlight_class';  
}  

else if (literaturehtml){  
var x=document.getElementById("literature");  
x.className = 'highlight_class';  
}  
else if (contacthtml){  
var x=document.getElementById("contact");  
x.className = 'highlight_class';  
}  

else if (rfqhtml){  
var x=document.getElementById("rfq");  
x.className = 'highlight_class';  
}  



else if (labelinghtml){  
var x=document.getElementById("labeling");  
x.className = 'highlight_topnav labeling';  
}  

else if (designhtml){  
var x=document.getElementById("design");  
x.className = 'highlight_topnav';  
}  

else if (packaginghtml){  
var x=document.getElementById("packaging");  
x.className = 'highlight_topnav';  
}  





}  