var xmlHttp
var boxID
var textID

function showResult(str,boxid,textid,pageno)
{
 boxID=boxid;
 textID=textid;
if (str.length==0)
 { 
 document.getElementById(boxID).
 innerHTML="";
 document.getElementById(boxID).
 style.border="0px";
 return
 }

xmlHttp=GetXmlHttpObject()

if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 } 
var postParam="name="+str+"&textid="+textID+"&boxid="+boxID+"&page="+pageno
var url="streetsearch.php"
//url=url+"?name="+str+"&textid="+textID
//url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=stateChanged 
//xmlHttp.open("GET",url,true)
xmlHttp.open("POST",url,true)
xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded")
xmlHttp.send(postParam)
//$(document.body).startWaiting('bigWaiting');
} 

function stateChanged() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
//$(document.body).stopWaiting();
 document.getElementById(boxID).
 innerHTML=xmlHttp.responseText;
 document.getElementById(boxID).
 style.border="1px solid #A5ACB2";

 } 
}

function GetXmlHttpObject()
{
var xmlHttp=null;
try
 {
 // Firefox, Opera 8.0+, Safari
 xmlHttp=new XMLHttpRequest();
 }
catch (e)
 {
 // Internet Explorer
 try
  {
  xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttp;
}

function clickResults()
{
 document.getElementById(boxID).
 innerHTML="";
 document.getElementById(boxID).
 style.border="0px";
 return
}