
function ajaxXHR() {
	var xhr;
	if(window.XMLHttpRequest) {
		xhr = new XMLHttpRequest();
	}
	else {
		if(window.ActiveXObject) {
			xhr = new ActiveXObject("Microsoft.XMLHTTP");
		}
	}
	return xhr;
}

function ajaxGetInnerHTML(requestUrl, elemId) {
	xhr = ajaxXHR();
	xhr.onreadystatechange = function() { 
		var elem = document.getElementById(elemId);
		if(xhr.readyState == 4) {
			if(xhr.status == 200) { // HTTP status code
				elem.innerHTML = xhr.responseText;
			}
		}
	};
	xhr.open("GET", requestUrl, true);
	xhr.send(null);
}
