team_panel = function(){
	var teamPanel = new Ext.Panel({
		//title: 'Team',
		id: 'team',
		width: 650,
		renderTo: 'vp_center_item',
		style: {marginLeft:'10px', paddingTop: '20px'},
		layout:'table',
	    defaults: {
	        // applied to each contained panel
	        //bodyStyle:'padding:20px'
	    },
	    layoutConfig: {
	        // The total column count must be specified here
	        columns: 2
	    },
	    items: [
	    	teamHead, teamListe, teamEinzeln
	    ]
	});
	
	
}

var teamHead = {
	colspan: 2,
	html: 'Team',
	style:{color: '#4e6378', fontWeight: 'bold'}
};

var teamListe = {
	items: new Ext.tree.TreePanel({
		id: 'tree_team',
		border: false,
		cellCls:'td-layertree', // wichtig Verweis auf custom.css
		rootVisible: false, 
		collapsible: false,
		useArrows: true,
		autoScroll: true,
		animate: true,
        enableDD: true,
        iconCls: 'empty',
        border: false,
        root: {
        	nodeType: 'async'
        },
        dataUrl: 'js/team.json',
        listeners: {
        	'click': function(node, event){
		    	tree_action_team(node, event);
			}
        }
	})
};
	
var teamEinzeln = {
	id: 'teamPersonen',
	style: {marginTop: '15px', marginLeft: '40px'},
	items: {
		html: '<-- Bitte einen Namen ausw&auml;hlen.'
	}
};

tree_action_team = function(node, event) {
	var c = Ext.getCmp('teamPersonen');
	if (c.items.items.length) {
	    c.remove(c.items.items[0]);
	};
	c.add({
		items: {id: 'teamPersonen_item', title: node.text, bodyBorder: false, border: true, autoScroll: true}
	});
	c.doLayout();
	if(Ext.getUrlParam('lang')){
		lang = Ext.getUrlParam('lang');
	}
	else {lang = 'de';}
	Ext.getCmp('teamPersonen_item').load('contents/'+node.id+'_'+lang+'.html');
	setProduktImage('images/stadt_ilu02moni223.jpg',500,250);
}


