Ext.onReady( function(){
	
	Ext.QuickTips.init();
	Ext.util.CSS.swapStyleSheet('green', '/extjs/resources/css/xtheme-olive.css');
	
	var viewp = new Ext.Panel( {
	//autoEl: 'div',
	//renderTo: Ext.getBody(),
	//renderTo: 'myPanel',
	width: 780,
	height: 535,
	layout: 'fit',
	border	: false,
	frame	: false,
	padding : '10px',
	id		: 'viewp',
	items : [
			{
				xtype	: 'panel',
				title	: 'ZivingNews: Cosas que estan ocurriendo en Ziving, es ortodoncia...',
				layout	: 'auto',
				id		: 'contenido',
				border	: false,
				frame	: false,
				items: [ gridfeeds ],
				fbar	: [
				{
					text	: 'Ver todas las noticias...',
					handler	: function(){
						window.location = "http://news.ziving.com";
					}
				}]
			}
		]	});

	storeFeeds.load();
	viewp.render('myPanel');
	
	var afiliadosPanel = new Ext.Panel( {
		width: 250,
		//autoWidth: true,
		height: 343	,
		//autoHeight: true,
		layout: 'fit',
		border	: false,
		frame	: true,
		//padding : '2px',
		id		: 'afiliadosPanel',
		//items	: [ afiliadosDview,verAfiliadoPanel ],
		items	: [ afiliadosDview,detallesDview ],
		fbar	: [
			{
				autoWidth	: true,
				text		: "Contacte con Ziving",
				handler		: function(){
					window.open("https://ziving.wufoo.com/forms/z7x4m1/");
				}
			}
		 ],
		title	: 'Todos los Centros Ziving en España',
		//collapsible: true,
		//collapsed: true
	});

	afiliadosSto.load();
	//console.log(afiliadosSto);
	
	//afiliadosForm.render('myMenu');
	afiliadosPanel.render('myMenu');
	
	
});
