function loading(){
	return 'Loading data....<img src="_core/images/ajaxLoading.gif">';
}

function newRequestObj()
{
	var xmlhttp=false;

	/*@cc_on @*/
	/*@if (@_jscript_version >= 5)
	// JScript gives us Conditional compilation, we can cope with old IE versions.
	// and security blocked creation of the objects.
	try{
		xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
	}
	catch (e){
		try{
			xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
		}
		catch (E){
			xmlhttp = false;
		}
	}
	@end @*/
	
	if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
		try {
			xmlhttp = new XMLHttpRequest();
		} catch (e) {
			xmlhttp=false;
		}
	}
	if (!xmlhttp && window.createRequest) {
		try {
			xmlhttp = window.createRequest();
		} catch (e) {
			xmlhttp=false;
		}
	}
	
	return xmlhttp;
}

function ajaxRequest(target, url)
{
	var xmlObj = newRequestObj();

	window.status='Loading data....';
	document.getElementById(target).innerHTML = loading();

	xmlObj.open("GET", url, true);
	xmlObj.setRequestHeader("Cache-Control", "no-store, no-cache, must-revalidate");
	xmlObj.setRequestHeader("If-Modified-Since","Sat, 1 Jan 2000 00:00:00 GMT");
		xmlObj.onreadystatechange=function()
		{
			if (xmlObj.readyState==4)
			{
				document.getElementById(target).innerHTML = xmlObj.responseText;
	
				// necessary to execute any SCRIPT tags in AJAX source
				var x = document.getElementById(target).getElementsByTagName("script");
				for (var i=0; i<x.length; i++)
					eval(x[i].text);
	
				window.status='Data loaded.';
			}
		}
	xmlObj.send(null);
}
	function getContent(pageAction)
	{
		ajaxRequest('ajaxContent', '_core/ajax/dspContent.cfm?action=' + pageAction);
	}
