var ajaxObjectArray = new Array();
document.write('<div id="badcode_text"></div>');

function getBadcodeFromServer(ajaxIndex,ulId){
	var resp = ajaxObjectArray[ajaxIndex].response;
	document.getElementById(ulId).innerHTML = resp;
	ajaxObjectArray[ajaxIndex] = false;
}

function badcode(){
	ajaxObjectArray[ajaxObjectArray.length] = new sack();
	var ajaxIndex = ajaxObjectArray.length-1;
	ajaxObjectArray[ajaxIndex].requestFile = '/ajax/process.php?module=catalog&action=badcode';
	ajaxObjectArray[ajaxIndex].onCompletion = function() { getBadcodeFromServer(ajaxIndex, 'badcode_text'); };	// Specify function that will be executed after file has been found					
	ajaxObjectArray[ajaxIndex].runAJAX();		// Execute AJAX function
}

window.onload = badcode;
