/*!
 * Ext JS Library 3.1.1
 * Copyright(c) 2006-2010 Ext JS, LLC
 * Impressum kmu-visitenkarte.ch Darstellungsscript
 */
Ext.onReady(function(){
    var win;
    var button = Ext.get('show-impressum');

    button.on('click', function(){
        // create the window on the first click and reuse on subsequent clicks
        if(!win){
           win = new Ext.Window({
                applyTo:'impressum-win',
                layout: 'fit',
                width:550,
                height:400,
                closeAction:'hide',
                html: '<span></span>',
                plain: true,

                items: new Ext.TabPanel({
                    applyTo: 'impressum-tabs',
                    autoTabs:true,
                    activeTab:0,
                    deferredRender:false,
                    border:false,
                    autoScroll: true
                }),
                buttons: [{
                    text: 'Schliessen',
                    handler: function(){
                        win.hide();
                    }
                }]
            });
        }
        win.show(this);
    });
});
