var xmlHttp
var idvivod
function showCustomer(strq,strw)
{	strq = encodeURI(strq)
	strw = encodeURI(strw)

idvivod = strw
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
{
alert ("Браузер не поддерживает запросы HTTP")
return
}
var url="plugins/showCustomer/getcustomer.php"
url=url+"?q="+strq
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=stateChanged
xmlHttp.open("GET",url,true)
xmlHttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded, charset=utf-8')

xmlHttp.send(null)
}

function stateChanged()
{

if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
{document.getElementById("status_"+idvivod).style.display = "none"
document.getElementById("vivod_"+idvivod).style.display = "inline"
document.getElementById("vivod_"+idvivod).innerHTML=xmlHttp.responseText
}
else {document.getElementById("vivod_"+idvivod).style.display = "none"
document.getElementById("status_"+idvivod).style.display = "inline"
}
}

function GetXmlHttpObject()
{
var objXMLHttp=null
if (window.XMLHttpRequest)
{
objXMLHttp=new XMLHttpRequest()
}
else if (window.ActiveXObject)
{
objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
}
return objXMLHttp
}
