/*
 * Ext JS Library 1.1.1
 * Copyright(c) 2006-2007, Ext JS, LLC.
 * licensing@extjs.com
 * 
 * http://www.extjs.com/license
 */

function MM_preloadImages() { //v3.0             
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
 
 
var layout = null;

MyLayout = function(){
	        return {
	            init : function(){
	                  layout = new Ext.BorderLayout(document.body, {
	                    north: {
	                        split:false,
	                        initialSize: 160,
                            minSize: 160,
                            maxSize: 160	                        
	                    },
	                    south: {
	                        split:false,
	                        initialSize: 20,
                            minSize: 20,
                            maxSize: 20
	                    },
	                    west: {
	                        split:false,
	                        initialSize: 154,
                            minSize: 154,
                            maxSize: 154,	                        
	                        collapsible: false
	                    },
	                    center: {
                    	titlebar: false,
                    	autoScroll:false,
                    	tabPosition: 'top',
                    	closeOnTab: true,
                    alwaysShowTabs: false                           
	                    }
	                });
	                layout.beginUpdate();
	                layout.add('north', new Ext.ContentPanel('header', {fitToFrame:true}));
	                layout.add('south', new Ext.ContentPanel('footer', {fitToFrame:true}));
	                layout.add('west', new Ext.ContentPanel('nav', {fitToFrame:true}));
	                layout.add('center', new Ext.ContentPanel('contentHome', {fitToFrame:true}));
	                layout.add('center', new Ext.ContentPanel('contentSearch', {fitToFrame:true}));      
	                layout.add('center', new Ext.ContentPanel('contentSite', {fitToFrame:true}));   	                

	                if (sitealiasid!=null) {
                        goSite(sitealiasid,0);                
                    } else{
                        goHome();                
                    };
    
                    var tabs = layout.getRegion('center').getTabs();   
                    tabs.stripWrap.setDisplayed(false);                            
	                layout.endUpdate();
	           }
	     };
	       
	}();
