var searching = false;
var xmlHttp;

	function getXMLHTTP()
	{
		var A = null;
		
		try
		{
			A = new ActiveXObject("Mxsml2.XMLHTTP");
		}
		catch(e)
		{
			try
			{
				A = new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch(oc)
			{
				A = null;
			}
		}
		
		if (!A && typeof XMLHttpRequest != "undefined")
		{
			A = new XMLHttpRequest();
		}
		
		return A;
	}
	
	function doRemoteQuery(lookupURL, queryString)
	{
		
		searching = true;

		if (xmlHttp && xmlHttp.readyState != 0)
		{
			xmlHttp.abort();
		}
		
		xmlHttp = getXMLHTTP();
		
		if (xmlHttp)
		{
			xmlHttp.open("GET", lookupURL + queryString, true);
			//what to do w/ the response:
			xmlHttp.onreadystatechange = function()
			{
				if (xmlHttp.readyState == 4 && xmlHttp.responseText && searching)
				{
					eval(xmlHttp.responseText);
					searching = false;
				}
			}
			xmlHttp.send(null);
		}
	}