/* JavaScript file for AJAX Object */

var xmlHttp = null;

function getXmlHttpObject() {
	
	try {
		xmlHttp = new XMLHttpRequest();
	} catch(e) {
		try {
			xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
		} catch(e) {
			try {
				xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
			} catch(e) {
				window.alert("Sorry, but your browser does not support AJAX!");
				return;
			}
		}
	}
	return xmlHttp;
	
}

function stateChanged(thefunc, xmlHttp) {
	if(xmlHttp.readyState == 4 || xmlHttp.readyState == 'complete') {
		if(xmlHttp.status == 200) {
			thefunc(xmlHttp);
		}
	}
}

