/* ---------------------------- */
/* XMLHTTPRequest Enable 		*/
/* ---------------------------- */
function createObject() {
	var request_type;
	var browser = navigator.appName;
	if(browser == "Microsoft Internet Explorer"){
	request_type = new ActiveXObject("Microsoft.XMLHTTP");
	}else{
		request_type = new XMLHttpRequest();
	}
		return request_type;
}

var http = createObject();

/* -------------------------- */
/* SEARCH scat					 */
/* -------------------------- */
function autosuggest1(x) {
q = x;
// Set te random number to add to URL request
nocache = Math.random();
http.open('get', 'lib/search.php?req=2&q='+q+'&nocache = '+nocache);
http.onreadystatechange = autosuggestReply;
http.send(null);

function autosuggestReply() {
if(http.readyState == 4){
	
	var response = http.responseText;
	e1 = document.getElementById('results1');
	e1.innerHTML=' ';
	if(response!=""){	
		e1.innerHTML=response;					
				
	} 
}
}

}


