//**********************************************************************
// Setup AJAX object.
//**********************************************************************
function getxmlhttp() {
	var xmlhttp = false;
	try {
		xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");			//used in Newer IE
	} catch(e) {
		try {
			xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");	//Used in Older IE
		} catch(e) {
			xmlhttp = false;
		}
	}

	if( !xmlhttp && typeof XMLHttpRequest != "undefined" ) {
		xmlhttp = new XMLHttpRequest;
	}
	
	return xmlhttp;
}
function getPage( objID, serverPage, method, params ) {
	
	var xmlhttp=getxmlhttp();
	var rtnVal = null;
	var obj = document.getElementById( objID );
	
	xmlhttp.open(method, serverPage, true);
	
	if( (method == "POST") || (method == "post") ) {
		//Send the proper header information along with the request
		xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
		xmlhttp.setRequestHeader("Content-length", params.length);
		xmlhttp.setRequestHeader("Connection", "close");
		rtnVal = params;
	}
	
	xmlhttp.onreadystatechange = function () {
		if(xmlhttp.readyState == 4 && xmlhttp.status == 200) {
			obj.style.visibility = 'visible';
			obj.style.display = 'block'; 
			obj.innerHTML = xmlhttp.responseText;
		}
	}
	xmlhttp.send(rtnVal);
}
