//A function that handles multiple AJAX requests function AjaxMultiple(ajaxArray, callback){ //Set the callback this.callback = callback; //A function that handles the callback from the requests this.CallbackHandler = function(){ this.amount -= 1; if (this.amount === 0) this.callback(); } //A variable that is used to indicate how many requests are remaining to be completed this.remain = ajaxArray.length; for (var i = 0; i