var CWarningManager = Class.create(
{
	initialize: function()
	{
		this.div = $("div-warning"); 
	},
	
	showWarning: function(txt)
	{
		if (this.div == undefined)
			this.initialize();
		this.div.show();
		this.div.select("p")[0].update(txt);
	},
	
	showWarningWithTimeout: function(txt, timeout)
	{
		this.showWarning(txt);
		if (timeout == undefined)
			timeout = 2;
		new PeriodicalExecuter(this.onHideWarning, timeout);
	},
	
	onHideWarning: function(pe)
	{
		pe.stop();
		$("div-warning").hide();
	},
	
	hideWarning: function()
	{
		if (this.div == undefined)
			this.initialize();
		this.div.hide();
	}
	
});

