/* Copyright 2009 Palm, Inc.  All rights reserved. */

InvalidsimAssistant = Class.create({
	initialize: function() {
		FirstUseUtil.addDashboardBig($('target'));
	},
	
	handleCommand: function(event) {
		if (event.type == Mojo.Event.back) {
			event.preventDefault();
			event.stopPropagation();
			Mojo.Controller.stageController.popScenesTo();
			Mojo.Controller.stageController.pushScene("language");
		}	
	},	
	
	setup: function(){
		$('target').addEventListener(Mojo.Event.tap, FirstUseUtil.tapHandler.bindAsEventListener(this));
				
		this.keyPressEventHandler =  FirstUseUtil.handleKeyPressEvent.bind(this);
		this.controller.listen(this.controller.sceneElement, Mojo.Event.keydown, this.keyPressEventHandler);
	}	
});