/* message.js */

var MessageManager = function(){}

MessageManager.prototype.show_info = function(message, auto_hide)
{
	var that = this;
	
	$("#app_status").addClass("ui-state-highlight");
	$("#app_status").addClass("ui-corner-all");
	
	$("#app_status").html(message);
	
	if (auto_hide === undefined)
		auto_hide = true;
	
	if (auto_hide)
	{
		window.setTimeout(function() {
			 that.hide_info();
		}, CONSTANTS.SHOW_INFO_INTERVAL);
	}
}

MessageManager.prototype.hide_info = function()
{
	$("#app_status").removeClass("ui-state-highlight");
	$("#app_status").removeClass("ui-corner-all");
	
	$("#app_status").html("");
}

var message = new MessageManager();
