var XHR = function() {	
	var req;		
	try {
		req = new XMLHttpRequest();
	} catch(e) {
		try {
			req = new ActiveXObject('Microsoft.XMLHTTP');
		} catch(e) {
			try {
				req = new ActiveXObject('Msxml2.XMLHTTP');
			} catch(e) {
				req = null;
			}
		}
	}		
	return req;
}
