php javascrip callback function
O3Global.Ajax.loadXML('Lackeys', 'hire', aPost, function(oResponse) {hireCallback(oResponse, iCurLackey, iCredits);}, Lackeys.cancel);

is the oResponse calling back 2 times?
how to handle this call back?

       this.doHire = function()
	    {
	 	if(!aLackeys[iCurLackey])
			return;

		// Fetch credits
		var oCredits = $("#lackey_hire_credits");
		var iCredits = oCredits.val() * 1;
		if(iCredits <= 0)
		{
			alert('You must enter a valid number of credits');
			oCredits.focus();
		}
		else if(iCredits > iAvailableCredits)
		{
			alert('You do not have enough credits. You only have' + iAvailableCredits + '.');
			oCredits.val(iAvailableCredits);
			oCredits.focus();
		}
		else
		{
			// Send the Ozone event
			var aPost        = new Array();
			aPost['type']    = iCurLackey;
			aPost['credits'] = iCredits;
			O3Global.Ajax.loadXML('Lackeys', 'hire', aPost, function(oResponse) {hireCallback(oResponse, iCurLackey, iCredits);}, Lackeys.cancel);
          
		}
	}

	function hireCallback(oResponse, iLackey, iCredits)
	{
		// Fetch data
    var sCity = oResponse.getElementsByTagName('city')[0].firstChild.data;

		// Process
		aLackeys[iLackey].hired(iCredits, sCity);
		Lackeys.modCredits(-iCredits);

		// Close the box
		Lackeys.cancel();
	}
php javascrip callback function
===

O3Global.Ajax.loadXML('Lackeys', 'hire', aPost, function(oResponse) {hireCallback(oResponse, iCurLackey, iCredits);}, Lackeys.cancel);

is the oResponse calling back 2 times?
how to handle this call back?

       this.doHire = function()
	    {
	 	if(!aLackeys[iCurLackey])
			return;

		// Fetch credits
		var oCredits = $("#lackey_hire_credits");
		var iCredits = oCredits.val() * 1;
		if(iCredits <= 0)
		{
			alert('You must enter a valid number of credits');
			oCredits.focus();
		}
		else if(iCredits > iAvailableCredits)
		{
			alert('You do not have enough credits. You only have' + iAvailableCredits + '.');
			oCredits.val(iAvailableCredits);
			oCredits.focus();
		}
		else
		{
			// Send the Ozone event
			var aPost        = new Array();
			aPost['type']    = iCurLackey;
			aPost['credits'] = iCredits;
			O3Global.Ajax.loadXML('Lackeys', 'hire', aPost, function(oResponse) {hireCallback(oResponse, iCurLackey, iCredits);}, Lackeys.cancel);
          
		}
	}

	function hireCallback(oResponse, iLackey, iCredits)
	{
		// Fetch data
    var sCity = oResponse.getElementsByTagName('city')[0].firstChild.data;

		// Process
		aLackeys[iLackey].hired(iCredits, sCity);
		Lackeys.modCredits(-iCredits);

		// Close the box
		Lackeys.cancel();
	}