var ajaxNextGamesObjects = new Array();

function ajaxGetNextGames(sportid,maxdays)
{
	var ajaxIndex = ajaxNextGamesObjects.length;
	ajaxNextGamesObjects[ajaxIndex] = new sack();
	ajaxNextGamesObjects[ajaxIndex].requestFile = '/WebServices/RenderSportCountryLeagues.aspx';	
	ajaxNextGamesObjects[ajaxIndex].setVar('sportid',sportid);
	ajaxNextGamesObjects[ajaxIndex].setVar('days',maxdays);
	ajaxNextGamesObjects[ajaxIndex].onCompletion = function(){ ajaxGetNextGames_CallBack(ajaxIndex); };	// Specify function that will be executed after file has been found
	ajaxNextGamesObjects[ajaxIndex].runAJAX();		// Execute AJAX function		
}


function ajaxGetNextGames_CallBack(ajaxIndex)
{
    var args = ajaxNextGamesObjects[ajaxIndex].response;
    RenderContent(args);
    
}

