Ext.onReady(function(){
    var win;
    var button = Ext.get('show-btn3');

    button.on('click', function(){
        // create the window on the first click and reuse on subsequent clicks
        if(!win){
            win = new Ext.Window({
                el:'ERP&Web-win',
                layout:'fit',
                width:446,
                height:480,
                closeAction:'hide',
                plain: true,
                
                items: new Ext.TabPanel({
                    el: 'ERP&Web-tabs',
                    autoTabs:true,
                    activeTab:0,
                    deferredRender:false,
                    border:false
                }),

                buttons: [{
                    text: 'Cerrar Ventana',
                    handler: function(){
                        win.hide();
                    }
                }]
            });
        }
        win.show(this);
    });
});

