
function XMLHttp(responseH) {
	this.responseHandler = responseH;
	this.xmlHttpObj = null;
}

XMLHttp.prototype.createXmlHttpRequestObject = function() {  
	// if running Internet Explorer
	if(window.ActiveXObject) {
		try {
			this.xmlHttpObj = new ActiveXObject("Microsoft.XMLHTTP");
		}
		catch (e) {
			this.xmlHttpObj = false;
		}
	} 
	// if running Mozilla or other browsers
	else {
		try {
			this.xmlHttpObj = new XMLHttpRequest();
		}
		catch (e) {
			this.xmlHttpObj = false;
		}
	}
	
	return this.xmlHttpObj;
}

XMLHttp.prototype.sendRequest = function(url) {
	if (this.xmlHttpObj.readyState == 4 || this.xmlHttpObj.readyState == 0)
	{
		/*
		try {
			if (netscape.security.PrivilegeManager.enablePrivilege) {
				netscape.security.PrivilegeManager.enablePrivilege('UniversalBrowserRead');
			}
		}
		catch (ex) {}
		*/
		this.xmlHttpObj.onreadystatechange = this.responseHandler;
		this.xmlHttpObj.open("GET", url, true);
		this.xmlHttpObj.send(null);
	}
}