var Forum = {};



Ext.onReady(function(){
		Ext.Direct.addProvider(
        Ext.app.REMOTING_API
    );


    Ext.QuickTips.init();

   var root=new Ext.tree.TreeNode({
            id:"root",//根节点id
            text:"根节点"
      });
      
    var viewport = new Ext.Viewport({
        layout:'border',
        id:'mainviewport',
        items:[
            new Ext.BoxComponent({ // raw
                region:'north',
                el: 'header',
                Height:24
            }),
            new Ext.tree.TreePanel({
                id:'forum-tree',
                region:'west',
                title:'导航',
                split:true,
                width: 180,
                minSize: 150,
                maxSize: 400,
                collapsible: true,
                margins:'0 0 5 5',
                rootVisible:false,
                lines:false,
                autoScroll:true,
                root:root
            }),
            new Ext.TabPanel({
                id:'main-tabs',
                activeTab:0,
                region:'center',
                margins:'0 5 5 0',
                resizeTabs:true,
                tabWidth:150,
                items: [{
                        title: '广告位',
                        contentEl:'center1',
                        autoScroll:true
                	
                	}]
              })
         ]
    });

    var tree = Ext.getCmp('forum-tree');

    function toggleDetails(btn, pressed){
        var view = Ext.getCmp('topic-grid').getView();
        view.showPreview = pressed;
        view.refresh();
    }

    function togglePreview(btn, pressed){
        var preview = Ext.getCmp('preview');
        preview[pressed ? 'show' : 'hide']();
        preview.ownerCt.doLayout();
    }
	

  
		 var c1=new Ext.tree.TreeNode({
        id:'c1',
        text:'四渡',
        "cls":"forum-ct",
        "iconCls":"forum-parent",
        "expanded":true,
        singleClickExpand:true,
        listeners:{"click":function(){CreateCustomerGrid("sidu")}}
      });

      var c2=new Ext.tree.TreeNode({
        id:'c2',
        text:'白河',
        "cls":"forum-ct",
        "iconCls":"forum-parent",
        "expanded":true,
        "leaf":true,
        listeners:{"click":function(){CreateCustomerGrid("baihe")}}
        
      });
      
      c2.appendChild(new Ext.tree.TreeNode({
    	  text:"Beginner",
      	listeners:{"click":function(){CreateCustomerGrid("baihe_beginner")}}
		  }));
		  
		  c2.appendChild(new Ext.tree.TreeNode({
    	  text:"半岛",
      	listeners:{"click":function(){CreateCustomerGrid("baihe_bandao")}}
		  }));
		  
		  c2.appendChild(new Ext.tree.TreeNode({
    	  text:"蜜蜂峡谷北侧",
      	listeners:{"click":function(){CreateCustomerGrid("baihe_bee_north")}}
		  }));
		  
			c2.appendChild(new Ext.tree.TreeNode({
    	  text:"蜜蜂峡谷南侧",
      	listeners:{"click":function(){CreateCustomerGrid("baihe_bee_south")}}
		  }));
		  
		  c2.appendChild(new Ext.tree.TreeNode({
    	  text:"CoolDay",
      	listeners:{"click":function(){CreateCustomerGrid("baihe_coolday")}}
		  }));
		  
		  c2.appendChild(new Ext.tree.TreeNode({
    	  text:"二道河",
      	listeners:{"click":function(){CreateCustomerGrid("baihe_erdaohe")}}
		  }));
		  
		  c2.appendChild(new Ext.tree.TreeNode({
    	  text:"鸽壁",
      	listeners:{"click":function(){CreateCustomerGrid("baihe_gebi")}}
		  }));
		  
		  c2.appendChild(new Ext.tree.TreeNode({
    	  text:"纪念碑",
      	listeners:{"click":function(){CreateCustomerGrid("baihe_jinianbei")}}
		  }));
		  
		  c2.appendChild(new Ext.tree.TreeNode({
    	  text:"纪念王茁",
      	listeners:{"click":function(){CreateCustomerGrid("baihe_jinianwangzhuo")}}
		  }));
		  
		  c2.appendChild(new Ext.tree.TreeNode({
    	  text:"精灵谷",
      	listeners:{"click":function(){CreateCustomerGrid("baihe_jinglinggu")}}
		  }));
		  
		  c2.appendChild(new Ext.tree.TreeNode({
    	  text:"老怪",
      	listeners:{"click":function(){CreateCustomerGrid("baihe_laoguai")}}
		  }));
		  
		   c2.appendChild(new Ext.tree.TreeNode({
    	  text:"老岩场",
      	listeners:{"click":function(){CreateCustomerGrid("baihe_laoyanchang")}}
		  }));
		   c2.appendChild(new Ext.tree.TreeNode({
    	  text:"老岩场东岸",
      	listeners:{"click":function(){CreateCustomerGrid("baihe_laoyanchang_east")}}
		  }));
		  
		   
		  c2.appendChild(new Ext.tree.TreeNode({
    	  text:"Steve&John",
      	listeners:{"click":function(){CreateCustomerGrid("baihe_Steve_John")}}
		  }));
		  
		  c2.appendChild(new Ext.tree.TreeNode({
    	  text:"沙陀子",
      	listeners:{"click":function(){CreateCustomerGrid("baihe_shatuozi")}}
		  }));
		  
		  c2.appendChild(new Ext.tree.TreeNode({
    	  text:"天仙瀑",
      	listeners:{"click":function(){CreateCustomerGrid("baihe_tianxianpu")}}
		  }));
		  
		  c2.appendChild(new Ext.tree.TreeNode({
    	  text:"桃谷",
      	listeners:{"click":function(){CreateCustomerGrid("baihe_taogu")}}
		  }));
		  
		  c2.appendChild(new Ext.tree.TreeNode({
    	  text:"完美心情&歪瓜裂枣",
      	listeners:{"click":function(){CreateCustomerGrid("baihe_wanmei_wailie")}}
		  }));
		  
		  c2.appendChild(new Ext.tree.TreeNode({
    	  text:"小柏树",
      	listeners:{"click":function(){CreateCustomerGrid("baihe_xiaobaishu")}}
		  }));
		  
      c2.appendChild(new Ext.tree.TreeNode({
    	  text:"小怪",
      	listeners:{"click":function(){CreateCustomerGrid("baihe_xiaoguai")}}
		  }));
		  
		  c2.appendChild(new Ext.tree.TreeNode({
    	  text:"云蒙峡",
      	listeners:{"click":function(){CreateCustomerGrid("baihe_yunmengxia")}}
		  }));
		  
		  
		  
		  
		  
		  
		  
		  
		  
		  
		  
		  
		  
		   
		  
		  
		  
		  
		  
		  



      root.appendChild(c2);
      root.appendChild(c1);

       
});

    
