function getNewHttpObject() {
var objType = false;
try {
objType = new ActiveXObject('Msxml2.XMLHTTP');
} catch(e) {
try {
objType = new ActiveXObject('Microsoft.XMLHTTP');
} catch(e) {
objType = new XMLHttpRequest();
}
}
return objType;
}
function loadhtml(url,elementContainer){
document.getElementById(elementContainer).innerHTML = '<blink class="redtxt">Loading...<\/blink>';
var theHttpRequest = getNewHttpObject();
theHttpRequest.onreadystatechange = function() {processhtml(elementContainer);};
theHttpRequest.open("GET", url);
theHttpRequest.send(false);
function processhtml(elementContainer){
if (theHttpRequest.readyState == 4) {
if (theHttpRequest.status == 200) {
document.getElementById(elementContainer).innerHTML = theHttpRequest.responseText;
} else {
document.getElementById(elementContainer).innerHTML="<p><span class='redtxt'>Error!<\/span> HTTP request return the following status message:&nbsp;" + theHttpRequest.statusText +"<\/p>";
}
}
}
}