/**************************************************************************************************/
/**************************************************************************************************/
// prepare the form when the DOM is ready 
$(document).ready(function() { 
    var options = { 
        target:        '#ResultLog',   // target element(s) to be updated with server response 
        beforeSubmit:  ReturnLogin,  // pre-submit callback 
        success:       showResponse  // post-submit callback 
    }; 
 
    // bind to the form's submit event 
    $('#LogMe').submit(function() { 
        $(this).ajaxSubmit(options); 
        return false; 
    }); 
}); 
 
 
// post-submit callback 
function showResponse(responseText, statusText)  { 
	if(responseText=='Acc&egrave;s autoris&eacute;... Veuillez patienter') {  
		alert('Login ok');
		$("#LogIn").load("/portail/pages/form_redac_cmt.php");
		$('#ResultLog').hide();
	};
}

function ReturnLogin(){
	   $('#ResultPasse').show();
	   $('Form#LogMe').hide();
};

function BackResetLogin(){
	   $('form#LogMe').show();
       $('#ResultLog').hide();
       $('#WaitLog').hide();
};




