/*
 * Ext JS Library 2.0.2
 * Copyright(c) 2006-2008, Ext JS, LLC.
 * licensing@extjs.com
 * 
 * http://extjs.com/license
 */

Ext.onReady(function(){
    var rwin;
    var rbutton = Ext.get('chkZip');
    var rbutton2 =Ext.get('chkZip1');
    
    rbutton.on('click', function(){
        // create the window on the first click and reuse on subsequent clicks
        if(!rwin){
            rwin = new Ext.Window({
                el:'chk-dlg',
                layout:'fit',
                width:500,
                height:250,
                closeAction:'hide',
                plain: true,
                
                items: new Ext.TabPanel({
                    el: 'cx-tabs',
                    autoTabs:true,
                    activeTab:0,
                    deferredRender:false,
                    border:false
                }),

                buttons: [{
                    text:'Submit',
                    disabled:true
                },{
                    text: 'Close',
                    handler: function(){
                        rwin.hide();
                    }
                }]
            });
        }
        rwin.show(this);
    });
    
    
        rbutton2.on('click', function(){
        // create the window on the first click and reuse on subsequent clicks
        if(!rwin){
            rwin = new Ext.Window({
                el:'chk-dlg',
                layout:'fit',
                width:500,
                height:250,
                closeAction:'hide',
                plain: true,
                
                items: new Ext.TabPanel({
                    el: 'cx-tabs',
                    autoTabs:true,
                    activeTab:0,
                    deferredRender:false,
                    border:false
                }),

                buttons: [{
                    text:'Submit',
                    disabled:true
                },{
                    text: 'Close',
                    handler: function(){
                        rwin.hide();
                    }
                }]
            });
        }
        rwin.show(this);
    });
});