  the_return = true;
  message = "";
  focused = false;

  normal_color = "#ffffff";
  warn_color = "#ffffff";

  function check_nl_email()
  { message = "";
    focused = false;
    res = true;
    if(nl_is_not_empty("fn_form", "nl_champ_email", " - un email\n"))
    { res = res & nl_is_email("fn_form", "nl_champ_email", " - un email valide\n");
    }
    else res = false;
    if(!res) { alert(message); return false; }
    return true;
  }

  function nl_is_not_empty(form, id, mess)
  { document.getElementById(id).style.backgroundColor = normal_color;
    if(eval("document.forms[\"" + form + "\"]." + id + ".value == \"\""))
    { if(message == "") message = "merci de preciser :\n";
      message += mess;
      document.getElementById(id).style.backgroundColor = warn_color;
      if(!focused)
      { document.getElementById(id).focus();
        focused = true;
      }
      return false;
    }
    return true;
  }

  function nl_is_email(form, id, mess)
  { var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
    document.getElementById(id).style.backgroundColor = normal_color;
    if(!eval("filter.test(document.forms[\"" + form + "\"]." + id + ".value)"))
    { if(message == "") message = "merci de preciser :\n";
      message += mess;
      document.getElementById(id).style.backgroundColor = warn_color;
      if(!focused)
      { document.getElementById(id).focus();
        focused = true;
      }
      return false;
    }
    return true;
  }
