Index = {};

Index.showInform = function(articleId){
	
	new ArticleDetailWin(articleId).show();
}

Index.showInform_app= function(articleId,ispop){
			
   new AppHintWin(articleId,ispop).show();
}

Ext.onReady(function() {
	Ext.QuickTips.init();
	// 定义消息的显示位置
	Ext.form.Field.prototype.msgTarget = 'side';
	// 设置页面上导航栏
	setNavigatorTabId('firstPage');

	// 系统公告板块
	new Ext.Panel({
		id : 'bulletinId',
		title : '系统公告',
		contentEl : 'bulletin',
		height : 240,
		width : 260,
		tools : [{
			id : 'restore',
			qtip : '更多系统公告...',
			handler : function(event, toolEl, panel) {
				window.open('inform/allArticleList.jsp?type=type1');
			}
		}],
		bodyStyle : 'background: #F1F4F9; padding:3px',
		renderTo : 'module-1'
	});
	Ext.get('bulletin').setVisible(true, true);

	// 推荐信息板块
	new Ext.Panel({
		id : 'commendsId',
		title : '推荐信息',
		contentEl : 'commends',
		height : 240,
		width : 480,
		tools : [{
			id : 'restore',
			qtip : '更多推荐信息...',
			handler : function(event, toolEl, panel) {
				window.open('inform/allArticleList.jsp?type=type2');
			}
		}],
		bodyStyle : 'background: #F1F4F9; padding:3px',
		renderTo : 'module-2'
	});
	Ext.get('commends').setVisible(true, true);

	// 定额资源
	new Ext.Panel({
		id : 'rationId',
		title : '定额资源',
		contentEl : 'ration',
		height : 240,
		width : 260,
		tools : [{
			id : 'restore',
			qtip : '更多定额资源...',
			handler : function(event, toolEl, panel) {
				window.open('inform/allArticleList.jsp?type=type3');
			}
		}],
		bodyStyle : 'background:#F1F4F9; padding:3px',
		renderTo : 'module-3'
	});
	Ext.get('ration').setVisible(true, true);

	// 价格信息板块
	new Ext.Panel({
		id : 'priceinfoId',
		title : '价格信息',
		height : 240,
		width : 480,
		contentEl : 'priceinfo',
		tools : [{
			id : 'restore',
			qtip : '更多价格信息...',
			handler : function(event, toolEl, panel) {
				window.open('inform/allArticleList.jsp?type=type4');
			}
		}],
		bodyStyle : 'background:#F1F4F9; padding:3px',
		renderTo : 'module-4'
	});
	Ext.get('priceinfo').setVisible(true, true);
	
	// 费率资源板块
	new Ext.Panel({
		id : 'rateId',
		title : '费率资源',
		height : 240,
		width : 260,
		contentEl : 'rate',
		tools : [{
			id : 'restore',
			qtip : '更多费率资源...',
			handler : function(event, toolEl, panel) {
				window.open('inform/allArticleList.jsp?type=type5');
			}
		}],
		bodyStyle : 'background: #F1F4F9; padding:3px',
		renderTo : 'module-8'
	});
	Ext.get('rate').setVisible(true, true);
	
	// 其它资源板块
	new Ext.Panel({
		id : 'othersId',
		title : '其它资源',
		height : 240,
		width : 480,
		contentEl : 'others',
		tools : [{
			id : 'restore',
			qtip : '更多资源...',
			handler : function(event, toolEl, panel) {
				window.open('inform/allArticleList.jsp?type=type6');
			}
		}],
		bodyStyle : 'background: #F1F4F9; padding:3px',
		renderTo : 'module-9'
	});
	Ext.get('others').setVisible(true, true);

	// 服务热线板块
	new Ext.Panel({
		id : 'supportId',
		title : '服务热线',
		contentEl : 'support',
		height : 198,
		width : 200,
		bodyStyle : 'background: #F1F4F9; padding:3px',
		renderTo : 'module-6'
	});
	Ext.get('support').setVisible(true, true);

	// 友情链接板块
	var firendLink = new Ext.Panel({
		id : 'firendLinkId',
		title : '友情链接',
		contentEl : 'firendLink',
		height : 198,
		width : 200,
		bodyStyle : 'background: #F1F4F9; padding:3px',
		renderTo : 'module-7'
	});
	Ext.get('firendLink').setVisible(true, true);
	
	// 帮助与FAQ
	var firendLink = new Ext.Panel({
		id : 'helpId',
		title : '帮助',
		contentEl : 'help',
		height : 315,
		width : 200,
		bodyStyle : 'background: #F1F4F9; padding:3px',
		renderTo : 'module-10',
		tools : [{
			id : 'restore',
			qtip : '更多帮助信息...',
			handler : function(event, toolEl, panel) {
				window.open('inform/allArticleList.jsp?type=type7');
			}
		}]
	});
	Ext.get('help').setVisible(true, true);

	var loginPanel = new LoginPanel();
	loginPanel.render('module-5');

})

