/*	Function for creating the XMLHttpRequest object.
 *	Function takes no arguments.
 *	Function returns a browser-specific XMLHttpRequest object
 *	or returns the Boolean value false.
 */
function getXMLHttpRequestObject() {
	var ajax = false;
	if (window.XMLHttpRequest) {
		ajax = new XMLHttpRequest();

	} else if (window.ActiveXObject) {
		try {
			ajax = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try {
				ajax = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e) { }
		}
	}
	return ajax;
}

// This function updates the contents of a target <div> tag with content from a url
function updateDiv(url,target) {
	var xmlHttp = getXMLHttpRequestObject();
	xmlHttp.open("GET", url, true);
	xmlHttp.send(null);
	xmlHttp.onreadystatechange=function() {
		if (xmlHttp.readyState == 4) {
   			if (xmlHttp.status == 200) {
      				document.getElementById(target).innerHTML = xmlHttp.responseText;
    			} else {
      				document.getElementById(target).innerHTML=" Process Content Error:\n"+ xmlHttp.status + "\n" +xmlHttp.statusText;
			}
		}
	}
}