//Based on code courtesy of Jim Ley (Jibbering.com)
//http://jibbering.com/2002/4/httprequest.html

function initXMLhttp() {

	var xmlhttp = false;

	//for IE
	/*@cc_on @*/	//This is MS JScript's "Conditional Compilation" that lets us test for a version of JScript and whether or 
					//not we're permitted to initialize an XMLHTTP object, which may be blocked by end-user security settings.
					//  (It's commented out to block it from other browsers.}
					//  see: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/js56jsconconditionalcompilation.asp

	/*@if (@_jscript_version >= 5)
		try {
			xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try {
				xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (E) {
				xmlhttp = false;
			}
		}
	@else
		xmlhttp = false;
	@end @*/

	//for Mozilla/Safari
	if (!xmlhttp && typeof XMLHttpRequest!='undefined') { //'undefined' is in quotes to avoid the "undefined is undefined" error message in IE5/Mac
		xmlhttp = new XMLHttpRequest();
	}
	
	return xmlhttp;
	
}