/*@cc_on @if (@_win32 && @_jscript_version >= 5) if (!window.XMLHttpRequest)
window.XMLHttpRequest = function() { return new ActiveXObject('Microsoft.XMLHTTP') }
@end @*/

function ajax(fileName, query, callBack, callBackArg) {
	
	/* Set up the request */
	var xmlhttp =  new XMLHttpRequest();
	xmlhttp.open('POST', fileName, true);
	
	/* The callback function */
	xmlhttp.onreadystatechange = function() {
		if (xmlhttp.readyState == 4) {
			if (xmlhttp.status == 200)
				callBack(eval(callBackArg));
		}
	}
	
	/* Send the POST request */
	xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
	xmlhttp.send(query);
}