/**
 * Main system load mask class, custom loading with a method to change text.
 */
Uwd.System.LoadMask = function(config) {
	if (!config) {
		config = {};	
	}
	this.isHidden = false;
	config.msg = 'initialisiere System';
	Ext.apply(this, config);
    // call parent constructor
	Uwd.System.LoadMask.superclass.constructor.call(this, window.document.body, config);

};

Ext.extend(Uwd.System.LoadMask, Ext.LoadMask, {
	
	setText : function(text) {
		if (this.isHidden === false) {
			this.msg = text + '...';
			this.show();
		}
	},
	
	hide : function() {
		Uwd.System.LoadMask.superclass.hide.call(this);
		this.isHidden = true;
	},
	
	show : function() {
		Uwd.System.LoadMask.superclass.show.call(this);
		this.isHidden = false;
	}
	
});
