$(function(){

	// Les placeholders pour ie.
	$('input, textarea').placeholder();
	console.log("add validateEmail");

});
    
function changePassword() {
    var emailStr = document.getElementById("email").value;
    console.log("email >> " + emailStr);
    if(validateEmail(emailStr)) {
	jsChangePwd(emailStr);
    }
}

    function validateEmail(emailStr) {
    
    var emailPattern = /^([a-zA-Z0-9_\-\.\+]+)@([a-zA-Z0-9_\-\.]+)\.[a-zA-Z0-9\-]{2,}$/;
    var isValid = emailPattern.test(emailStr);
    
    var errorLabel = document.getElementsByClassName("InputText_errorLabel")[0];
    if(!isValid) {
	$(".InputContainer_input").addClass("InputText-error");
	errorLabel.innerText = "error";
    }
    
    return isValid;
    }