Xsn.StatisticsDialog = function(){

    Xsn.StatisticsDialog.superclass.constructor.call(this, 'statistics-dlg', {
        modal:true,
        autoCreate: true,
        title: 'Statistieken',
        width:980,
        height:650,
        shadow:true,
        closable:false,
        draggable:false,
        collapsible:false,
        animateTarget:null,
        resizable:false,
        minWidth:400,
        minHeight:250,
        center: {
          useShim:true,
          titlebar: false,
          autoScroll:false
        }
    });

    var contentPanel = this.getLayout().getEl().createChild({tag:'iframe', frameborder:0, style:'padding:5px'});

    this.addKeyListener(27, this.hide, this);
    this.addButton('Sluiten', this.hide, this);

    this.getLayout().beginUpdate();
    this.getLayout().add('center', new Ext.ContentPanel(contentPanel, {title:'Statistieken', fitToFrame:true}));
    this.getLayout().endUpdate();
}

Ext.extend(Xsn.StatisticsDialog, Ext.LayoutDialog,{

    show: function(){
        this.getLayout().getRegion('center').getActivePanel().getEl().dom.src = "http://statistics.xsnewsletter.nl/statistiek_xsn.php?username=" + Xsn.settings.username;
        Xsn.StatisticsDialog.superclass.show.call(this);
    }

});
