
	var oModalAjaxRequest; // holds the ajax request..
	
	/* executes an ajax request. */
	function jExecuteAjaxRequest(sRequestURL, oInjectionElement, sURLVariables) {
		oModalAjaxRequest = jCreateAjaxRequest(); // create an ajax request..
		sModalRequestURL = sRequestURL;
		
		oModalAjaxRequest.onreadystatechange = function() {
			if (oModalAjaxRequest.readyState == 4) {
				oInjectionElement.innerHTML = oModalAjaxRequest.responseText; // update the content..
			}
		}
		
		oInjectionElement.innerHTML = "<embed src=\"./flash/loading.swf\" style=\"width: 60px; height: 60px\"></embed>";
		
		oModalAjaxRequest.open("POST", sModalRequestURL, true); // avoid page cache..
		oModalAjaxRequest.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
		oModalAjaxRequest.send("Hash=" + Math.random() + sURLVariables); // send the request..
	}
	
	/* creates an ajax request. */
	function jCreateAjaxRequest() {
		var oAjaxRequest;
		
		try {
			oAjaxRequest = new XMLHttpRequest(); // opera, firefox, safari..
		} catch (e) {
			try {
				oAjaxRequest = new ActiveXObject("Msxml2.XMLHTTP"); // ie..
			} catch (e) {
				try {
					oAjaxRequest = new ActiveXObject("Microsoft.XMLHTTP"); // ie..
				} catch (e) {
					return false;
				}
			}
		}
		
		return oAjaxRequest;
	}
	