var xmlHttp
var layername
function GetRecordSet(query)
{
xmlHttp=GetXmlHttpObject()
layername = "Layer3"
if(xmlHttp==null)
{
alert("Your browser is not supported?")
}
var url="get_records.php"
url=url+"cmd=GetRecordSet&query="+query;
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange = FetchComplete(layername);
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}
function GetAuctionData(pk)
{
xmlHttp=GetXmlHttpObject()
layername = "Layer2"
if(xmlHttp==null)
{
alert("Your browser is not supported?")
}
var url="get_auction.php?"
url=url+"cmd=GetAuctionData&pk="+pk;
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange = FetchComplete(layername);
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}
function FetchComplete(layer)
{
if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
{
document.getElementById(layer).innerHTML=xmlHttp.responseText
}
if(xmlHttp.readyState==1 || xmlHttp.readyState=="loading")
{
document.getElementById(layer).innerHTML="loading"
}
}
function GetXmlHttpObject()
{
var xmlHttp=null;
try
{
xmlHttp=new XMLHttpRequest();
}catch (e)
{
try
{
xmlHttp =new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e) {}
}
return xmlHttp;
}