Mojo.Timing.enabled = false;

var AppAssistant = Class.create
({
	initialize: function(appController)
	{
		Mojo.Log.info("Certificate AppAssistant");
	},
	
	name : 'certificate',
	
	handleLaunch: function(params)
	{
		Mojo.Log.info("certificate handlelaunch");

		var stageController = this.controller.getStageController(this.name);
		if (stageController) 
		{
			this.launch(params, stageController);
			stageController.activate();
		}
		else
		{
			this.controller.createStageWithCallback(
			{
				name: this.name,
				lightweight: true
			}, this.launch.bind(this, params));
			
		}
	},
	
	launch: function(params, stageController)
	{
		if (stageController.topScene()) 
		{
			stageController.popScenesTo();
			stageController.pushScene('list', params);
		}
		else 
		{
			Mojo.Log.info("Certificate launch create");
			stageController.pushScene('list', params);
		}
	}
});

function StageAssistant(stageController)
{
	Mojo.Log.info("stageassistant");
}

AppAssistant.certificateService = new CertificateManagerService;

