/*
 * Ext JS Library 2.2
 * Copyright(c) 2006-2008, Ext JS, LLC.
 * licensing@extjs.com
 *
 * http://extjs.com/license
 */


	function showMessage(msg) {
	    Ext.MessageBox.hide();
		Ext.MessageBox.alert('Lembrete de senha', msg, "");
    };


Ext.onReady(function(){


    Ext.get('esqueceuSenhaButton').on('click', function(e) {
        Ext.MessageBox.prompt('Email', 'Por favor, informe seu email:', showResultText);
    });


    function showResultText(btn, text) {
        //Ext.example.msg('Button Click', 'You clicked the {0} button and entered the text "{1}".', btn, text);
        if( btn == "ok" ) {
        	xajax_x_enviar_senha(text);
			mostraEnviandoLembrete();
        }
    };


	function mostraEnviandoLembrete(){
        Ext.MessageBox.show({
           msg: 'Enviando senha, por favor aguarde...',
           progressText: 'Enviando...',
           width:300,
           wait:true,
           waitConfig: {interval:400},
           icon:'ext-mb-download', //custom class in msg-box.html
           animEl: ''
       });
    }


});

