nmdgf.widgets.LoadingPanel = {
		
	id : 'loading-panel',
	
	panel : null,
	
	create : function() {
		this.panel = new YAHOO.widget.Panel(this.id, { 
			width:'240px', 
			fixedcenter:true, 
			close:false, 
			draggable:false, 
			zindex:4,
			modal:false,
			visible:false
		});

		this.panel.setHeader("Loading, please wait...");
		//TODO: Pull image into local library to avoid mixed content warning
		this.panel.setBody('<img src="/static/images/loading_bar.gif" />');
		this.panel.render(document.body);
	},
	
	show : function() {
		if(this.panel === null) {
			this.create();
		}
		this.panel.show();
	},
	
	hide : function() {
		this.panel.hide();
	}

};
nmdgf.registerWidget(nmdgf.widgets.LoadingPanel);
