// JavaScript Document

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);  
galleryhtml = (URL.indexOf('gallery.') > -1);  
aboutjethtml = (URL.indexOf('about-jet.') > -1);  
abouthtml = (URL.indexOf('about.') > -1);  
literaturehtml = (URL.indexOf('literature.') > -1);  
greenhtml = (URL.indexOf('green.') > -1);  
contacthtml = (URL.indexOf('contact.') > -1);  
productshtml1 = (URL.indexOf('pumping-liquid-eductors.') > -1);
productshtml2 = (URL.indexOf('pumping-gases-eductors.') > -1);
productshtml3 = (URL.indexOf('pumping-solids-eductors.') > -1);
productshtml4 = (URL.indexOf('tank-mixing-heating-ejectors.') > -1);

  

function navigations(){  
if (indexhtml) {  
var x=document.getElementById("home");  
x.className = 'highlight_class';  
}  

else if (galleryhtml){  
var x=document.getElementById("gallery");  
x.className = 'highlight_class';  
}  

else if (aboutjethtml){  
var x=document.getElementById("aboutjet");  
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 (greenhtml){  
var x=document.getElementById("green");  
x.className = 'highlight_class';  
}  

else if (contacthtml){  
var x=document.getElementById("contact");  
x.className = 'highlight_class';  
}  

else if (productshtml1){  
var x=document.getElementById("products");  
x.className = 'highlight_class';  
} 
else if (productshtml2){  
var x=document.getElementById("products");  
x.className = 'highlight_class';  
} 
else if (productshtml3){  
var x=document.getElementById("products");  
x.className = 'highlight_class';  
} 
else if (productshtml4){  
var x=document.getElementById("products");  
x.className = 'highlight_class';  
} 





}  
