Ext.onReady(function(){
					 
					 

    Ext.QuickTips.init();

    // turn on validation errors beside the field globally
    Ext.form.Field.prototype.msgTarget = 'side';

    var bd = Ext.getBody();

    /*
     * ================  Simple form  =======================
     */
    bd.createChild();


    var dimenticato = new Ext.form.FormPanel({	
										  
										  
		standardSubmit: true,
										  								  
		labelWidth: 109, // label settings here cascade unless overridden
        frame:true,
        title: 'Recupero Codici d\'Accesso',
        bodyStyle:'padding:5px 5px 0',
        width: 550,
        defaults: {width: 350},
        defaultType: 'textfield',
		renderTo: 'table',
		
        items: [
				
				new Ext.form.TextField({
                fieldLabel: 'E-Mail',
                allowBlank:false,
                name: 'mail',
                vtype: 'email'
            }),
				new Ext.form.Hidden({
                name: 'dest',
                value: 'register_dimenticato'
            }),
				new Ext.form.Hidden({
                name: 'mode',
                value: 'recupero'
            })
				],



// All the magic happens after the user clicks the button     
        buttons:[{ 
                text:'Inoltra la richiesta',
                formBind: true,	 
                // Function that fires when user clicks the button 
                handler:function(){ 
                    dimenticato.getForm().getEl().dom.action = 'index.php';		
					dimenticato.getForm().getEl().dom.method = 'POST';
					dimenticato.getForm().submit();
					waitTitle:'Connessione al Server';
                    waitMsg:'Elaborazione in corso...';
						}
 			}]	

})
	
	
	
	
	
	
	
	
	
})









/*

ORIGINALE FUNZIONANTE
SOLO CONTROLLO


        buttons:[{ 
                text:'Login',
                formBind: true,	 
                // Function that fires when user clicks the button 
                handler:function(){ 
                    incisori.getForm().submit({ 
						url:'ciao.php',						 
                        method:'POST', 
                        waitTitle:'Connessione al Server', 
                        waitMsg:'Elaborazione in corso...',
						window.location = url
 			})}
			}]
		
*/
