function createHttpRequester() {
	if (window.XMLHttpRequest) { // code for Mozilla, Safari, etc
		try {
			return new XMLHttpRequest();
		} 
		catch(e) {}
	} 
	else if (window.ActiveXObject) { // IE/Windows ActiveX version
		try {
			return new ActiveXObject("Msxml2.XMLHTTP");
		} 
		catch(e) {
			try {
				return new ActiveXObject("Microsoft.XMLHTTP");
			} 
			catch(e) {}
		}
	}
	return null;
}


function getRemoteFile(url, doReturnXml, callbackFunc, callbackData) {
	var xmlHttp = createHttpRequester();
	if (xmlHttp == null) return null;
	try {
		var isAsync = (callbackFunc != null);
		xmlHttp.open("GET", url, isAsync);
		xmlHttp.setRequestHeader("If-Modified-Since", "Sat, 1 Jan 2000 00:00:00 GMT");
		
		if (isAsync) {
			xmlHttp.onreadystatechange = function() {
				if (xmlHttp.readyState == 4) {
					callbackFunc(doReturnXml ? xmlHttp.responseXML : xmlHttp.responseText, callbackData);
					delete xmlHttp.onreadystatechange;
				}
			};
		}
		
		xmlHttp.send("");
		if (isAsync) return null; // later
		if (doReturnXml) return xmlHttp.responseXML;
		return xmlHttp.responseText;
	}
	catch (e) {}
	return null;
}
