Ext.onReady(function(){

	// Create a variable to hold our EXT Form Panel. 
	// Assign various config options as seen.	 
    var login = new Ext.FormPanel({ 
        labelWidth:80, 
        frame:true, 
        standardSubmit: true,
        labelWidth: 75,
        title:'Please Login', 
        defaultType:'textfield',
		monitorValid:true,
	// Specific attributes for the text fields for username / password. 
	// The "name" attribute defines the name of variables sent to the server.
        items:[{ 
                fieldLabel:'Username', 
                name:'username', 
                allowBlank:false 
            },{
                inputType: 'hidden',
                id: 'submitaction',
                name: 'loginAction',
                value: 'verify'
            },{ 
                fieldLabel:'Password', 
                name:'password', 
                inputType:'password', 
                allowBlank:false 
            }],
 
	// All the magic happens after the user clicks the button     
        buttons: [{
            text: 'Submit',
            handler: function() {
			login.getForm().getEl().dom.action = 'index.php';
	        login.getForm().getEl().dom.method = 'POST';
            login.getForm().submit();
            }
        }]
    });

 var p = new Ext.Panel({
        collapsible:false,
        renderTo: 'panel',
        width:300,
        items: [login]
    });
	// This just creates a window to wrap the login form. 
	// The login object is passed to the items collection.       
    /*var wind = new Ext.Window({
		closable: false,
        width: 300,
        height:175,
        layout: 'fit',
        plain:true,
        items: [login]
	});
	
	wind.show();
	*/
	
	
	
	
	
	
	

});


