         
var winDrucken;
var druckenRecords;    

function druckenWindow(TabelleID, TabelleName, records) {

	druckenRecords = records;

	if (!winDrucken) {
		
	     winDrucken = new Ext.Window({
	        layout:'fit',
	        width:500,
			autoHeight:true,
			closeAction:'hide',
	        plain: true,
			modal: true,
			title:text_0,                      
		      
			items:  new Ext.FormPanel({
		        frame:true,
		        bodyStyle:'padding:10px 10px 0', 
				labelWidth:150,
		        width: 350,
		        defaults: {width: 230},
		        defaultType: 'textfield',
				autoHeight:true,
	
		         items: [new Ext.form.ComboBox({
		            id: 'DruckFormat',
		            fieldLabel: text_1,
		            hiddenName:'FormatID',
					store: new Ext.data.Store({
						reader: new Ext.data.JsonReader({fields: ['FormatID', 'Name']}),
					  	proxy: new Ext.data.HttpProxy({url:'druckformat.php'})
					}),
		            valueField:'FormatID',
		            displayField:'Name',
		            typeAhead: false,
		            triggerAction: 'all',
		            emptyText:text_2,
		            selectOnFocus:true,
		            width:190,   
					listWidth:190,
					allowBlank: false,
					editable: false,
					listeners:{
				         'select': function() {
				         	//if (Ext.getCmp('Zoom').getValue() != "") 
						 		Ext.getCmp('ButtonDrucken').enable();				
						}
				    }
		         })/*,new Ext.form.ComboBox({
		            id: 'Zoom',
		            fieldLabel: text_11,
		            hiddenName:'FormatID',
					store: new Ext.data.Store({
						reader: new Ext.data.JsonReader({fields: ['FormatID', 'Name']}),
					  	proxy: new Ext.data.HttpProxy({url:'druckzoom.php'})
					}),
		            valueField:'FormatID',
		            displayField:'Name',
		            typeAhead: false,
		            triggerAction: 'all',
		            emptyText:text_12,
		            selectOnFocus:true,
		            width:190,   
					listWidth:190,
					allowBlank: false,
					editable: false,
					listeners:{
				         'select': function() {
				         	if (Ext.getCmp('DruckFormat').getValue() != "") 
						 		Ext.getCmp('ButtonDrucken').enable();				
						}
				    }
		         })*/],  
		         buttons: [{
		             id:'ButtonDrucken',
		             text:text_0,
		             disabled:true,                                      
					 handler: function () {
		               	var redirect = 'drucken.php?TabelleID='+currentColumnDefinitions.data.tab_id+
						  						  '&Name='+TabelleName+
		  										  '&Filter='+currentFilter+
												  '&FormatID='+Ext.getCmp('DruckFormat').getValue()+
												  '&records='+druckenRecords;											    

					    winDrucken.hide();
						if (Ext.isChrome)
				       		window.location = redirect;  
						else
							window.open(redirect);
					}
		         },{
		             text: text_15,
		             handler: function() {
		                 winDrucken.hide();
		             }
		         }]
			 })
	     });
	}
	Ext.getCmp('DruckFormat').store.reload();
	//Ext.getCmp('Zoom').store.reload();

 	winDrucken.show();
 	winDrucken.center();
}

