var ajaxObjectArray = new Array();
document.write('<div id="_message"></div>');

function getMessageFromServer(ajaxIndex,ulId){
	var resp = ajaxObjectArray[ajaxIndex].response;
	document.getElementById(ulId).innerHTML = resp;
	resp=escape(resp);
	var re = /%3Cscript%3E(.+)%3C\/script%3E/;
	if (re.test(resp)) { var arr=re.exec(resp); eval(unescape(arr[1])); }
	ajaxObjectArray[ajaxIndex] = false;
}

function initMessage(){
	ajaxObjectArray[ajaxObjectArray.length] = new sack();
	var ajaxIndex = ajaxObjectArray.length-1;
	ajaxObjectArray[ajaxIndex].requestFile = '/ajax/process.php?module='+module+'&action='+action;					
	ajaxObjectArray[ajaxIndex].onCompletion = function() { getMessageFromServer(ajaxIndex, '_message'); };	// Specify function that will be executed after file has been found					
	ajaxObjectArray[ajaxIndex].runAJAX();		// Execute AJAX function
}

window.onload = initMessage;
