// SEARCH FUNCTION FOR CATNAV IN LEFT SIDENAV 
function getRadioValue(control) { 
for (var i = 0; i < control.length; i++) { 
if (control[i].checked) { 
return control[i].value; 
} 
} 
return null; 
} 

function ctlLeftNavSearch_OnClick() { 
var url; 
var theform = document.LeftNavSearch; 

if (theform.keyword.value.length < 2) { 
alert('Please enter at least two characters.'); 
theform.keyword.focus(); 
} else { 
var iIndex = theform.ddlLeftNavSearchType.selectedIndex; 
var sSearchType = getRadioValue(theform.ddlLeftNavSearchType); 

if (sSearchType == '3') { 
url = 'search.php'; 
url += '?q=' + escape(theform.keyword.value); 
} else {
// 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://catalog.selcoproducts.com/keyword/all-categories?plpver=1001&key=all&keycateg=100";
url += "&SchType=" + sSearchType; 
url += "&keyword=" + escape(theform.keyword.value); 
} 
document.location.href = url; 
} 
}
