<!--
	function create_xmlhttp(){
		
   //	Create a boolean variable to check for a valid Internet Explorer instance.
		var xmlhttp = false;
	//	Check if we are using IE.
		try {
	//	If the javascript version is greater than 5.
			xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
	//	If not, then use the older active x object.
			try {
	//	If we are using IE.
				xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (E) {
	//	Else we must be using a non-IE browser.
				xmlhttp = false;
			}
		}
		
	//	If we are using a non-IE browser, create a javascript instance of the object.
		if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
			xmlhttp = new XMLHttpRequest();
		}
		
		return xmlhttp;
	}
	

//	Function to process an XMLHttpRequest.
	function processajax (obj, serverPage, asynch){
		xmlhttp = create_xmlhttp();
		xmlhttp.open("GET", serverPage, asynch);
		if (asynch){
			xmlhttp.onreadystatechange = function() {
				if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
					document.getElementById(obj).innerHTML = xmlhttp.responseText;
				}
			}
			xmlhttp.send(null);
		} else {
			xmlhttp.send(null);
			if (xmlhttp.status == 200) {
				document.getElementById(obj).innerHTML = xmlhttp.responseText;
			}
		}
	}
	
//	Function to process an XMLHttpRequest.
	function processajax_complete (obj, serverPage, method, asynch, onCompleteAction){
		xmlhttp = create_xmlhttp();
		xmlhttp.open("GET", serverPage, asynch);
		if (asynch){
			xmlhttp.onreadystatechange = function() {
				if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
					document.getElementById(obj).innerHTML = xmlhttp.responseText;
					for(var count = 0; count < onCompleteAction.length; count++) {
						onCompleteAction[count]();
					}
				}
			}
			xmlhttp.send(null);
		} else {
			xmlhttp.send(null);
			if (xmlhttp.status == 200) {
				document.getElementById(obj).innerHTML = xmlhttp.responseText;
				for(var count = 0; count < onCompleteAction.length; count++) {
					onCompleteAction[count]();
				}
			}
		}
	}
	
//function to process an XMLHttpRequest
function processajax_o(serverPage, statusdiv, getOrPost, str, onCompleteAction)
{
	obj = document.getElementById(statusdiv);
	//Get an XMLHttpRequest object for use
	xmlhttp = create_xmlhttp();
	if(getOrPost == "get"){ //send GET
		xmlhttp.open("GET", serverPage);
		xmlhttp.onreadstatechange = function(){
			if(xmlhttp.readyState == 4 && xmlhttp.status == 200){
		  		// put the resulting content from the serverPage into the statusDiv
				obj.innerHTML = xmlhttp.responseText;
				// if onComplete actions are set, perform them
				if(onCompleteAction != 'undefined') {
					for(var count = 0; count < onCompleteAction.length; count++) {
						onCompleteAction[count]();
					}
				}
			}
		}
		xmlhttp.send(null);
	} else { //send POST
		xmlhttp.open("POST",serverPage, true)
		xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");
		xmlhttp.onreadystatechange = function() { 
		  if(xmlhttp.readyState == 4 && xmlhttp.status == 200){
		  		// put the resulting content from the serverPage into the statusDiv
				obj.innerHTML = xmlhttp.responseText;
				// if onComplete actions are set, perform them
				if(onCompleteAction != 'undefined') {
					for(var count = 0; count < onCompleteAction.length; count++) {
						onCompleteAction[count]();
					}
				}
			}
		}
		xmlhttp.send(str);
	}
}

	
//	-->
