var xmlHttp

function showCustomer(str)
{ 

xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
{
alert ("Browser does not support HTTP Request")
return
} 
var url="newsdisplay.php"
url=url+"?q="+str
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=stateChanged 
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}

function stateChanged() 
{ 

if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
{ 
document.getElementById('txtHint').style.visibility='visible';
document.getElementById("txtHint").innerHTML=xmlHttp.responseText 
//alert(xmlHttp.responseText);
} else {
document.getElementById('txtHint').style.display='';	
document.getElementById("txtHint").innerHTML='<img src="images/ajax-loader.gif" />' 
}
} 

function GetXmlHttpObject()
{ 
var objXMLHttp=null
if (window.XMLHttpRequest)
{
objXMLHttp=new XMLHttpRequest()
}
else if (window.ActiveXObject)
{
objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
}
return objXMLHttp
}