/****************************************************/
/*	This is the universal ajax calls.				*/
/****************************************************/

// master variable list
var xmlHttp;

// this is the XML requestor 
function createXMLHttpRequest(){
	if (window.ActiveXObject) {
		xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
	}
	else if (window.XMLHttpRequest) {
		xmlHttp = new XMLHttpRequest();
	}
}

// this handles the default state change waiting for the status response
function handleStateChange() {
	if(xmlHttp.readyState == 4) {
		if(xmlHttp.status == 200) {
			var response = xmlHttp.responseText;
			var update = new Array();
			if(response.indexOf('|' != -1)) {
				update = response.split('|');		// this allows us to parse the results and easily target where to stick it on the page
				document.getElementById(update[0]).innerHTML = update[1];	// we use the InnerHTML even if it's just text because Mozilla has a problem with the innerText command
			}
		}
	}
}