﻿Itsb_LinkPage = function(config)
{
    Ext.apply(this, config);

	Ext.ns('Ext.ux.layout');
	Ext.ux.layout.CenterLayout = Ext.extend(Ext.layout.ContainerLayout,{
		onLayout: function(ct, target) {
			if(!this.innerCt) {
				this.innerCt = target.createChild({tag:'center'});
			}
			this.renderAll(ct, this.innerCt);
		}
	});
	Ext.Container.LAYOUTS['ux.center'] = Ext.ux.layout.CenterLayout;

	var iframepanel = new Ext.ux.ManagedIframePanel({
		id: 'iframe-link-page',
		defaultSrc :  'public/WebPage/Link.aspx',
		width: 615,
		height: 440,
		loadMask:true
	});

	var contentLinkPage =  new Ext.Panel({
        collapsible: false,
        id:'center-panel-link-page',
		layout:'ux.center',
		frame:false,
		width: 615,
		height: 440,
		border : true,
		items:[iframepanel]
    });
    
    Itsb_LinkPage.superclass.constructor.call(this, {
        id:         config.id,
        title:      config.title,
        layout:     'fit',
        border:     false,
        bodyStyle:  'padding:5px',
        closable:   true,
        autoScroll: true,
        items:      [contentLinkPage]
    });
};

Ext.extend(Itsb_LinkPage, Ext.Panel, {

    initComponent : function(){
        Itsb_LinkPage.superclass.initComponent.call(this);             
    }
    
});
