Ext.ns('Sight');
Sight.HeaderPanel = Ext.extend(Ext.Panel, {
    width:'100%',
    height:95,
    margins:'0 0 0 0',
    layout:'border',
    handlers:{},
    filters:{},
    toolBarEl:null,    
    border:false
    ,initComponent:function() {
        
        var topNav = new Ext.Panel({
            region: 'north',
            width:'100%',
            height:70,
            margins:'0 0 0 0',
            border:false,
            contentEl:'header'
        });
		
        var toolBar;
        if (!this.toolBarEl) {
        	toolBar = new Sight.ToolbarPanel({
        		region:'center',
        		handlers:this.handlers,
        		filters:this.filters
        	});
        } else {
        	toolBar = new Sight.ToolbarPanel({
        		region:'center',
        		handlers:this.handlers,
        		filters:this.filters,
        		contentEl:this.toolBarEl
        	});
        }
		        
        Ext.apply(this, {
                items:[
                topNav,
                toolBar
                ]
        });
         
        Sight.HeaderPanel.superclass.initComponent.apply(this, arguments);
    } // eo function initComponent
 
    ,onRender:function() {
        // nothing to do for this comp
        Sight.HeaderPanel.superclass.onRender.apply(this, arguments);
    } // eo function onRender
        
});
 
Ext.reg('headerpanel', Sight.HeaderPanel);
