var Playlist = function(){
    var dialog1, showBtn1;    
  
    return {
        init : function(){
             showBtn1 = Ext.get('playlist');
          	
             showBtn1.on('click', this.showDialog1, this);
        },
        showDialog1 : function(){
            if(!dialog1){ // lazy initialize the dialog and only create it once
                dialog1 = new Ext.BasicDialog("playlist-dlg", {                      
                        width:325,
                        height:250,    
                        minWidth:100,
                        minHeight:100,	
						shadow: true,								
                        proxyDrag: false
                });   
				dialog1.addButton('Close', dialog1.hide, dialog1);				
            }
			
            dialog1.show(showBtn1.dom);
        }
    };	
}();

var Imprint = function(){
    var dialog2, impBtn;  
    return {
        init : function(){
             impBtn = Ext.get('imprint');
             impBtn.on('click', this.showDialog, this);
        },
       
        showDialog : function(){
            if(!dialog2){ // lazy initialize the dialog and only create it once
                dialog2 = new Ext.BasicDialog("imprint-dlg", {                     
                        width:320,
                        height:250,
                        shadow:true,
                        minWidth:100,
                        minHeight:100,						
                        proxyDrag: false
                });   
				dialog2.addButton('Close', dialog2.hide, dialog2);				
            }
            dialog2.show(impBtn.dom);
        }
    };
}();

Ext.onReady(Playlist.init, Playlist, true);
Ext.onReady(Imprint.init, Imprint, true);

 //for flash overflow
Ext.useShims = true;

