function MaestroInfo() {
	this.maestroID	= sessionStorage.getItem("maestroID");
	this.maestroName = "";
	this.accountType = 0;
	this.availableActivateDateTime = "";
	this.playerCount = 0;
}

MaestroInfo.prototype.loadMaestroInfo = function(onSuccess, onFail) {
	var self = this;

	sendRequestServer(	//url, sendParams, onSuccess, onFail, isDebugMode);
		"./../server/maestro/maestro_info.php",
		"maestro_id=" + this.maestroID,

		function(jsonData) {
			self.maestroName = jsonData["name"];
			self.accountType = jsonData["accountType"];
			self.availableActivateDateTime = jsonData["availableActivateDateTime"];
			self.playerCount = jsonData["playerCount"];

			onSuccess();
		},

		function(errorMessage, errorCode) {
			onFail(errorMessage, errorCode);
		}

	);
}

MaestroInfo.prototype.getMaxPlayerCount = function() {
	switch(this.accountType) {
		case 0:
		case 1:
		case 100:
		case 101:
		return 20;

		case 2:
		return 50;

		case 3:
		return 100;

		case 4:
		return 500;

		case 5:
		return 1000;

		default:
		return 0;
	}
}

MaestroInfo.prototype.getRegisteredPlayerCount = function() {
	return this.playerCount;
}