function valide_syntaxe_email_formulaire(champ)
{
    //champ.value = trim(champ.value);
    var checkOK = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-@_.'";
    var checkStr = champ.value;
    var allValid = true;
    var i = 0;
    while ((i < checkStr.length) && (allValid)) {
       allValid = (checkOK.indexOf(checkStr.charAt(i)) == -1)?false:true ;
       i ++;
    }
    
    if (!allValid) {
        alert("'Erreur'.");
        champ.focus() ;
        return (false);
    }
    
    var posiA = checkStr.indexOf('@');
    var posiP = checkStr.lastIndexOf('.');
    if ((posiA < 1) || (posiP < posiA+3) || (checkStr.length < 5) || (posiP > checkStr.length - 3)) {
        alert("Courriel invalide ou manquant.");
        champ.focus() ;
        return (false);
    }
    
    return (true);
}

