var xmlhttp = null;

function StartSearch(url)
{
	if (window.XMLHttpRequest) // Modern browsers
	{
		xmlhttp = new XMLHttpRequest();
	}
	else if (window.ActiveXObject) // IE5 and IE6
	{
		xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
	}
	if (xmlhttp != null)
	{
		xmlhttp.onreadystatechange = HttpRequestStateChange;
		xmlhttp.open("GET",url,true);
		xmlhttp.send(null);
	}
}

function HttpRequestStateChange()
{
	if (xmlhttp.readyState == 4) // loaded
	{
		if (xmlhttp.status == 200) // OK
		{
			ProcessSearchResults(xmlhttp.responseText); // Defined in Downloads.js
		}
		else // error
		{
			ErrorPerformingSearch(xmlhttp.responseText); // Defined in Downloads.js
		}
	}
}

