var xmlHttp

function stateChanged() 
{ 
if (xmlHttp.readyState==4){ 
    if (xmlHttp.status == 200) {
    document.getElementById("locationlistresultsframe").innerHTML=xmlHttp.responseText;
    } else {
    document.getElementById("locationlistresultsframe").innerHTML='';
    }
}
}

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 showLocationlist(pagefile,qid)
{ 
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  }
  
var getvalues=pagefile;
getvalues=getvalues+"?q="+qid;
getvalues=getvalues+"&sid="+Math.random();

xmlHttp.onreadystatechange=stateChanged;

xmlHttp.open("GET",getvalues,true);
xmlHttp.send(null);
}

function selectedloc(loctext)
{
document.getElementById('searchTextWhereb').value=loctext
document.getElementById('locationlistresultsframe').innerHTML=''
}