/* <--------------------------> */
/* 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				   */
/* <--------------------------> */

function fnSearchName() {

txtInput=encodeURI(document.getElementById('txtInput').value);

document.getElementById('divmsg').style.display = "block";
document.getElementById('divmsg').innerHTML = "Searching for <strong>" + txtInput+"</strong>";
// Set te random number to add to URL request
nocache = Math.random();
http.open('get', 'php_Search.php?name='+txtInput+'&nocache = '+nocache);

http.onreadystatechange = fnSearchNameReply;
http.send(null);
}
function fnSearchNameReply() {

	var response = http.responseText;
	document.getElementById('divResult').innerHTML=response;

}