Ext.onReady(function() {

	var rootEl = new Ext.tree.AsyncTreeNode({
		children: HelpInfo
	});

	new Ext.Panel({
	  title: "Помощь",
	  layout:'fit',
	  renderTo: window.OVPORTLETDIV,	 
	  height:  500,
	  maximizable: true,
	  items: [
		  {
			layout:'border',
			defaults: {
				collapsible: true,
				split: true,
				//bodyStyle: 'padding:15px'
			},
			items: [
			{
			  xtype:'treepanel',
			  listeners: {
				click: function(a,b,c){
				  if(a.attributes.url) Ext.getCmp('helpIframe').body.dom.innerHTML= '<iframe style="border: none;" height="100%" width="100%" src="' + OVROOT + a.attributes.url + '"></iframe>'
				}
			  },
			  rootVisible: false,
			  region:'west',
			  //margins: '5 0 0 0',
			  //cmargins: '5 5 0 0',
			  width: 175,
			  minSize: 100,
			  maxSize: 250,
			  useArrows:true,
			  autoScroll:true,
			  animate:true,
			  containerScroll: true,
			  border: false,
			  root: rootEl,
			},
			{
				collapsible: false,
				region:'center',
				margins: '5 0 0 0',
				id: 'helpIframe'
			}
		  ]
		}
	  ]
	});

});