var msProgIds = ["MSXML2.XMLHTTP.5.0", "MSXML2.XMLHTTP.4.0", "MSXML2.XMLHTTP.3.0", "MSXML2.XMLHTTP", "Microsoft.XMLHTTP"];

function loadXMLDoc(url, callback, noBrowserSupport)
{
	/*
	 * Loads data from a specific URL and executes the callback function specified when state changes
	 * 
	 * MODIFICATIONS:
	 * 3/22/07 - Joe Dickerson - created
	 */
	xmlhttp=null;
	// code for mozilla
	if ( window.XMLHttpRequest ) {
		  xmlhttp = new XMLHttpRequest();
	  }
	// code for IE
	else if ( window.ActiveXObject ){
		while (!xmlhttp && msProgIds.length)
			{
				try { xmlhttp = new ActiveXObject(msProgIds[0]); } catch (e) { xmlhttp = null; }
				if (!xmlhttp)
					msProgIds.splice(0, 1);
			}
	}
	if ( xmlhttp != null ){
	  xmlhttp.onreadystatechange=callback;
	  xmlhttp.open("GET",url,true);
	  xmlhttp.send(null);
	}
	else{
		// calls noBrowserSupport function if one was passed in
		if( noBrowserSupport ){
			noBrowserSupport();
		}else{
		  alert("Your browser does not support XMLHTTP.")
		}
	}
}

