function getContent(pURL, clids, wlid, process, process_args) {

	// must be called with a random string for cache busting (IE7)

	if (window.XMLHttpRequest) { // Mozilla, Safari, etc 
		var xmlhttp = new XMLHttpRequest();
	} else if (window.ActiveXObject) { //IE 
		var xmlhttp = new ActiveXObject('Microsoft.XMLHTTP');
	}

	// if we have created the xmlhttp object we can send the request
	if(typeof(xmlhttp)=='object') {
		xmlhttp.onreadystatechange=function(){xmlhttpResults(xmlhttp, clids, wlid, process, process_args);};
		xmlhttp.open('GET', pURL, true);
		xmlhttp.send(null);

		// please wait...
		for (x in clids) {
			document.getElementById(clids[x]).style.display = 'none';
		}
		if (wlid != '') document.getElementById(wlid).style.display = 'block';

		// otherwise display an error message
	} else {
		alert('Your browser is not remote scripting enabled.');
	}
}

// function to handle asynchronous call
function xmlhttpResults(xmlhttp, clids, wlid, process, process_args) {
	if(xmlhttp.readyState==4) { 
		if(xmlhttp.status==200) {
			// loadResults(xmlhttp, clids, wlid);
			process(xmlhttp, clids, wlid, process_args);
		}
	}
}

/*
// Base function
function loadResults(xmlhttp, clids, wlid, process_args) {
	// Results are, for convention, loaded on clids[0]
	document.getElementById(clid[0]).innerHTML = xmlhttp.responseText;
	resetWaitMsg(clids, wlid);
}
// */

function resetWaitMsg(clids, wlid) {
	// ready for another request
	for (x in clids) {
		document.getElementById(clids[x]).style.display = 'block';
	}
	document.getElementById(wlid).style.display = 'none';
}