// JavaScript Document
var haloapi_key = "24140a45d5507832e2e7ed441086b8d9";

function haloapi(gamertag, gameid, dataType, callback)
{
	if (!gamertag)
	{
		return;
	}
	
	$.ajax({
		async: true,
		cache: false,
		url: phpbb_root_path + "../haloapi/default.php",
		data: "key=" + haloapi_key + "&gamertag=" + gamertag + "&dataType=" + dataType,
		type: "GET",
		dataType: dataType,
		error: function(response)
		{
			callback(response);
		},
		success: function(response)
		{
			callback(response);
		}					
	});
	return;
}
