function TNtrim160(strText) { while (strText.substring(0,1) == ' ') { strText = strText.substring(1, strText.length); } while (strText.substring(strText.length-1,strText.length) == ' ') { strText = strText.substring(0, strText.length-1); } return strText; }
function validTNsearch160(search){ search.what.value = TNtrim160(search.what.value); if(search.what.value.length==0){ alert("Please enter a search term\n(Example: Valves)"); search.what.select(); return false; }}

function TNsearchForm160(){
document.write('<style type="text/css">#tnet160 { width: 160px; border: 1px solid #bdbdbd; background: #fff url(\'http://www.thomasnet.com/');
document.write('searchforms/thomasnet_160_grey.jpg\') no-repeat; font: normal 11px arial; padding: 0; margin: 0; }#tnet160, #tnet160 a { color: ');
document.write('#fff; }#tnet160 #tnintro { font: normal 9px verdana; margin-bottom: 5px; }#tnet160 form { margin: 0; }#tnet160 #tnetform { width: ');
document.write('146px; margin: 25px 7px 5px 7px; }</style><div id="tnet160"><div id="tnetform"><div id="tnintro"><a href="http://www.thomasnet.com" ');
document.write('target="tnet">Search ThomasNet</a> the most comprehensive resource for industrial information.</div><form name="tnsearch" ');
document.write('id="tnsearch" target="tnet" method="get" action="http://www.thomasnet.com/results.html" onsubmit="return validTNsearch160(this);">');
document.write('<b>Search for:</b> <i>(e.g.: pumps)</i><br><input maxlength="100" name="what" onfocus ="this.select();" style="width: 145px; ');
document.write('margin-bottom: 5px;"><input type="hidden" name="which" value="prod"><input type="hidden" name="cov" value="NA"><div style="');
document.write('text-align: center;"><input type="submit" name="Submit" value="Search"></div></form></div></div>');
}

