
	var sLoadingText = "Loading, please wait...";
	var sModalRequestURL = "";
	var sModalVars = "";
	
	function jExecuteAjaxRequest(sInjectionElement, sLoadingElement, sLoadingText, sRequestURL, sVars) {
		var oModalAjaxRequest = jInitAjax(); // Create a new request..
		sModalRequestURL = sRequestURL;
		sModalVars = sVars ? sVars : "";
		
		var oLoadingElement = document.getElementById(sLoadingElement);
		oLoadingElement.style.display = ""; // Show the screen..
		
		var oInjectionElement = document.getElementById(sInjectionElement);
		
		oModalAjaxRequest.onreadystatechange = function() {
			if (oModalAjaxRequest.readyState == 4) {
				oInjectionElement.innerHTML = oModalAjaxRequest.responseText; // Update the content..
			}
		}
		
		oInjectionElement.innerHTML = sLoadingText;
		
		oModalAjaxRequest.open("POST", sModalRequestURL, true); // Avoid page cache..
		oModalAjaxRequest.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
		oModalAjaxRequest.send("Hash=" + Math.random() + sModalVars); // Send the request..
	}
	
	/* Initializes an Ajax object. */
	function jInitAjax() {
		var oAjaxRequest;
		
		try {
			oAjaxRequest = new XMLHttpRequest(); // Opera, Firefox, Safari..
		} catch (e) {
			try {
				oAjaxRequest = new ActiveXObject("Msxml2.XMLHTTP"); // Internet Explorer..
			} catch (e) {
				try {
					oAjaxRequest = new ActiveXObject("Microsoft.XMLHTTP"); // Internet Explorer..
				} catch (e) {
					return false;
				}
			}
		}
		
		return oAjaxRequest;
	}
	
