Ext.onReady(function(){
    new Ext.form.Panel({
        renderTo: Ext.getBody(),
        title: 'Audiofarm Login',
        standardSubmit: true,
        width: 350,
        height: null,
        frame: true,
        bodyPadding: 13,
        url: 'index.php',           
        defaultType: 'textfield',
        defaults: {
            anchor: '100%'
        },
        baseParams: {
            action: 'login'
        },
            
        items: [
        {
            allowBlank:false, 
            fieldLabel: 'User ID', 
            name: 'user', 
            emptyText: 'user id (email)',
            vtype: 'email'
        },
        {
            allowBlank:false, 
            fieldLabel: 'Password', 
            name: 'pw', 
            emptyText: 'password', 
            inputType: 'password'
        }],
            
        buttons: [
        {
            text:'Login',        
            handler: function() {
                var form = this.up('form').getForm();
                if (form.isValid()) {
                    form.submit();
                }
            }
        }
        ]
    }).center() 
    
});




