var Static<?php echo $_POST['id'];?> = new Ext.Panel({
		id:'wupStaticPage<?php echo $_POST['id'];?>',
		title:'<?php echo $_POST['title']; ?>',

		layout:'fit',
		border: false,
		closable:true,
		items:[
			new Ext.form.HtmlEditor({
				id: 'wupStaticPage<?php echo $_POST['id'];?>Editor'
			})
		],
		tbar: [{
			text: 'Save',
			handler: function() {
				Ext.Ajax.request({
					url:'webuserspool/_forms/portal/_ajax/ajax.load-static-page.php',
						params: { 
									action: 'update',
									id : <?php echo $_POST['id'];?>,
									editText : Ext.getCmp('wupStaticPage<?php echo $_POST['id'];?>Editor').getValue()
								},
						success : function(resp,opt){ 
							alert('Saved');
						}
				})
			}		
		}]
});

mainTabPanel.add(Static<?php echo $_POST['id'];?>).show();

Ext.Ajax.request({
		url:'webuserspool/_forms/portal/_ajax/ajax.load-static-page.php',
		params: { 
					id : <?php echo $_POST['id'];?>
				},
		success : function(resp,opt){ 
			//console.log(resp);
			Ext.getCmp('wupStaticPage<?php echo $_POST['id'];?>Editor').setValue(resp.responseText);	
		}
})
						