// JavaScript Document
	<!--
	function validatesearchbar(url){
		document.productsearchbar.txtsearch.value=trimstrbar(document.productsearchbar.txtsearch.value)
		if (document.productsearchbar.txtsearch.value.length==0) {
			alert('Please enter search criteria...')
			return false
		}	
		if (document.productsearchbar.txtsearch.value.length<=2) {	
			alert('Please enter atleast 3 characters...')
			return false
		}

		document.productsearchbar.action = '/xp/xp5_ProductSearch.asp?txtsearch='+document.productsearchbar.txtsearch.value
		if (url) {
			if (url.length > 0) {
				document.productsearchbar.action = url+'/xp/xp5_ProductSearch.asp?txtsearch='+document.productsearchbar.txtsearch.value
			}
		}
		return true
		//alert(document.productsearchbar.action)
	}

	function trimstrbar(ystr) {
		var xfound = false
		if (ystr.length == 0) return ""
		for (var k=0; k<ystr.length;k++) {
			if (!xfound) {
				if (ystr.charAt(k) == " ") {
				}
				else {
					ystr = ystr.substring(k, ystr.length)
					xfound = true
					break
				}
			}
		}
		if (!xfound) ystr = ""
		
		xfound = false
		if (ystr.length == 0) return ""
		for (k=ystr.length-1; k>=0;k--) {
			if (!xfound) {
				if (ystr.charAt(k) == " ") {
				}
				else {
					ystr = ystr.substring(0, k+1)
					xfound = true
					break
				}
			}
		}
		if (!xfound) ystr = ""
		return ystr
	}
	
	function ApplySearchHelpBar(ytext) {
		if (document.productsearchbar.txtsearch) {
			document.productsearchbar.txtsearch.value = ytext
		}
		//nd();
		if (validatesearchbar()) {
			document.productsearchbar.submit()
		}
	}	
	function PopulateSearchHelpBar(a_words, ytext) {
		var xstr = ""   //'<table width=270>'   //border="0" cellspacing="0" cellpadding="0"
		var xclass = ""
		var xctr = 0;
		for (var k=0; k<a_words.length; k++) {
			if (a_words[k].length > 0) {
				if (a_words[k].toLowerCase().indexOf(ytext.toLowerCase()) == 0) {
					xctr++;
					if (xctr > 8) {
						break;
					}
					xclass = "atr0_bar"
					if (xctr % 2 == 1) {
						xclass = "atr1_bar"
					}
					//alert(a_words[k])
					//xstr = xstr + '<tr><td class=' + xclass + '><a href=javascript:ApplySearchHelpBar("' + a_words[k].split("'").join("\'") + '")>' + a_words[k] + '</a></td></tr>'
					xstr = xstr + '<span style="width:270;" class=' + xclass + '><a href="javascript:ApplySearchHelpBar(\'' + a_words[k].split("'").join("\'") + '\')">' + a_words[k] + '</a></span><br>'
				}
			}
		}
		//xstr = xstr + '</table>'
		//alert(xstr)
		//document.write(xstr)
		document.getElementById("divsearchhelpbar").innerHTML = xstr;
		if (xctr > 0) {
			document.getElementById("divsearchhelpbar").style.display = "block";
		}
		else {
			document.getElementById("divsearchhelpbar").style.display = "none";
		}
		//alert(document.getElementById("tabletxtsearch").offsetLeft)
		//alert(document.getElementById("tabletxtsearch").offsetTop)
	}
	//-->
