
<!--
function newXMLHttpRequest() {
	var xmlreq = false;
	if (window.XMLHttpRequest) {
		xmlreq = new XMLHttpRequest();
	}
	else if (window.ActiveXObject) {
		try {
			xmlreq = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e1) {
	  		try {
				xmlreq = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e2) {
				xmlreq = false;
		  	}
		}
	}
	//if (! xmlreq) alert("No HttpRequest object created in newXMLHttpRequest()");

	return xmlreq;
}
function getResponseFunction(req, elementId, callback) {

	return function () {
		//alert("getResponseFunction() " + req.readyState + " : " + req.status);
		if (req.readyState == 4) {
			if (req.status == 200 || req.status == 0) {
				callback(req.responseText, elementId);
			}
			else {
				//alert("HTTP error " + req.status + ": " + req.statusText);
			}
		}
	}

}

function setInnerHtml(response, id) {
	//alert("From server :" + response);
	document.getElementById(id).innerHTML = response;
}

function httpGet(url, elementId, callback) {
	if (! callback) {
		callback = setInnerHtml;
	}
	var agent = new newXMLHttpRequest();
	if (agent) {
		agent.open("GET", url, true);
		agent.onreadystatechange =
					getResponseFunction(agent, elementId, callback);
		agent.send(null);
	}
}
-->
