function loginshow(art){

var frm_login = new Ext.FormPanel({
		frame: false, border: false, buttonAlign: 'center',
		id: 'frmLogin',
		url: 'json/login.php?xaction=login',
		layout:'absolute',
		bodyStyle: 'padding:10px 10px 15px 15px;background:#dfe8f6;',
		width: 400, height:300,labelWidth: 100,
		items: [{
            xtype:'box',
            autoEl:
            {
                tag:'img',
                src:'img/logo.png'
            },x:10,y:10
        },
        {xtype:'label',text:'MKit Warenwirtschaft',x:150,y:10,id:'logintitle'},
        {xtype:'label',text:'Datenbank',x:150,y:60},
    	{   xtype: 'combo',
    	    x:210,y:55,width:168,
    		store: new Ext.data.JsonStore({
    	    	autoDestroy: true,
    			autoLoad: true,
    			url: 'json/login.php?xaction=db',
    	    	root: 'db',
    	   		fields: ['Database']
    		}),
    		emptyText: 'DB-Auswahl',
    	    displayField: 'Database',
    	    valueField:'Database',
    		name: 'db',
    		id:'db',
    		typeAhead: true,
    		mode: 'local',
    		allowBlank:false,
    		forceSelection: true,
    		triggerAction: 'all'  },
        {xtype:'label',text:'Benutzer',x:150,y:85},
		{xtype: 'textfield',name: 'username',id: 'username',allowBlank: false,x:210,y:80},
		{xtype:'label',text:'Passwort',x:150,y:110},
		{xtype: 'textfield',name: 'password',id: 'password',allowBlank: false,inputType: 'password',x:210,y:105}
		],
		buttons: [
			{ text: 'Login', iconCls:'ok',handler: function() {
				frm_login.getForm().submit
				({
					success: function() {
					   window.location.href="main.php";
					},
					failure: function(form, action) {
					   Ext.Msg.alert('Failure', "keine Datenbank auswählen, Username oder Login falsch!");
					}
				});

				}			
			},
			{ text: 'Reset', iconCls:'reset', handler: function() {
					formLogin.getForm().reset();
				}
			}
		]
	});
loginwin = new Ext.Window( {
   title: 'Login',
   closable : false,
   modal: true,
   width: 400,  
   height: 220, 
   resizeable: false,
   layout : "border",
   items: [
           { region:'center', layout:'fit', height:220,width:400,items: [frm_login]}
          ]
});
loginwin.show();
// enter auf taste submit legen
loginwin.map = new Ext.KeyMap("frmLogin", [{
            key : [10, 13],
            scope : this,
            fn : function() {
				frm_login.getForm().submit
				({
					success: function() {
						   window.location.href="main.php";
					},
					failure: function(form, action) {
					   Ext.Msg.alert('Failure', "Username oder Login falsch!");
					}
				});

			}	
        }]); 
	Ext.getCmp('username').focus(true,200);
}


