function callback(item) {
	document.forms['searchform'].prodsearch.value = item.text;
	//alert(document.forms['searchform'].prodsearch.value);
	document.forms['searchform'].submit();
	//alert('You selected \'' + item.text + '\'\n\nHere is the full selected JSON object;\n' + JSON.stringify(item));
}

jQuery(function() {
	$.getJSON(jsRootFolder+"searchList.php?jsLangCde="+jsLangCde,
      		function(data){
      			$('input#suggestBox').jsonSuggest(data, {maxResults:20, onSelect:callback});
      		}
      	);

	
	
});

function sendEmail() {
	jPrompt(pwFTxt, '', pwFAlert, function(r) {
    if( r ) { 
		//alert('You entered ' + r);
		var xmlHttpReq = false;
		var self = this;
		strURL = jsRootFolder + "forgotpw.php?pw="+r+"&jsLangCde="+jsLangCde;
		
		// Mozilla/Safari
		if (window.XMLHttpRequest) {
			self.xmlHttpReq = new XMLHttpRequest();
		}
		// IE
		else if (window.ActiveXObject) {
			self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
		}
		self.xmlHttpReq.open('POST', strURL, true);
		self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
		self.xmlHttpReq.onreadystatechange = function() {
			if (self.xmlHttpReq.readyState == 4) {
				//updatepage(self.xmlHttpReq.responseText);
			}
		}
    self.xmlHttpReq.send();
	
	}
	});

		
}

