function htRequest(sURL, sOnSuccess) {
	var http_request = false;
	if (window.XMLHttpRequest) {
		http_request = new XMLHttpRequest(); 
		if (http_request.overrideMimeType) { 
			http_request.overrideMimeType('text/xml'); 
		}
	} else if (window.ActiveXObject) {
		try { 
			http_request = new ActiveXObject("MSXML2.XMLHTTP.3.0"); 
		} catch (e) {
			try { 
				http_request = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e) {}
		}
	}
	if (!http_request) {
		alert('Unfortunately you browser doesn\'t support the feature that allows this data to be loaded.');
		return false;
	}
	http_request.onreadystatechange = function() {
		if (http_request.readyState == 4) {
			if (http_request.status == 200) {
				eval(sOnSuccess + "(http_request.responseText)");
			} else {
				alert("Sorry, an error has occurred processing the request. (Status code: " + http_request.status + ")\n\n***Common error codes***\n0: Security settings have blocked the request.\n500: Internal Server Error - contact us for help.");
			}
		}
	}
	http_request.open("GET", sURL, true);
	http_request.send(null);
}
// multi-browser/platform methods for getting page characteristics
// 	from: http://www.softcomplex.com/docs/get_window_size_and_scrollbar_position.html
function f_clientWidth() {
	return f_filterResults (
		window.innerWidth ? window.innerWidth : 0,
		document.documentElement ? document.documentElement.clientWidth : 0,
		document.body ? document.body.clientWidth : 0
	);
}
function f_clientHeight(bMax) {
	if (bMax) {
		// maxResults returns largest value, for setting background grayout
		var htmlObj = document.getElementsByTagName('html')[0];		// when DOCTYPE = xhtml, body/window height doesn't work.  Must use HTML element height.
		return document.documentElement.scrollTop + Math.max(
			window.innerHeight ? window.innerHeight : 0,
			document.documentElement ? document.documentElement.clientHeight : 0,
			document.body ? document.body.clientHeight : 0,
			htmlObj.offsetHeight ? htmlObj.offsetHeight : 0,
			htmlObj.scrollHeight ? htmlObj.scrollHeight : 0,
			htmlObj.clientHeight ? htmlObj.clientHeight : 0
		);
	} else {
		// filterResults gets the VISIBLE SCREEN's dimensions, not the whole body
		return f_filterResults (
			window.innerHeight ? window.innerHeight : 0,
			document.documentElement ? document.documentElement.clientHeight : 0,
			document.body ? document.body.clientHeight : 0
		);
	}
}
function f_scrollTop() {
	return f_filterResults (
		window.pageYOffset ? window.pageYOffset : 0,
		document.documentElement ? document.documentElement.scrollTop : 0,
		document.body ? document.body.scrollTop : 0
	);
}
function f_filterResults(n_win, n_docel, n_body) {
	var n_result = n_win ? n_win : 0;
	if (n_docel && (!n_result || (n_result > n_docel)))
		n_result = n_docel;
	return n_body && (!n_result || (n_result > n_body)) ? n_body : n_result;
}

