
var xmlhttp;
function loadXMLDoc(url, delegate)
{
	//http://www.w3schools.com/XML/xml_http.asp
	xmlhttp = null;
	if (window.XMLHttpRequest)
	{// code for Firefox, Opera, IE7, etc.
		xmlhttp = new XMLHttpRequest();
	}
	else if (window.ActiveXObject)
	{// code for IE6, IE5
		xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
	}
	if (xmlhttp != null)
	{
		try{
		xmlhttp.onreadystatechange = delegate;
		xmlhttp.open("GET", url, true);		
		xmlhttp.send(null);
		
		}catch(err){alert(err.message);}
	}
	else
	{
		alert("Your browser does not support XMLHTTP.");
	}
}	