function submitIt(theForm){
  var img = new Image();
  if(!validEmail(theForm.Email.value)){
    alert("Adresse email non valide");
    theForm.Email.focus();
    theForm.Email.select();
    return false;
  }
  else{
    if(!validName(theForm.Name.value)){
      alert("Prénom non valide");
      theForm.Name.focus();
      theForm.Name.select();
      return false;
    }

}
	if (document.downloadForm.Telephone.value.length == 0)
	{
	alert ("Veuillez entrer votre numéro de téléphone.");
      theForm.Telephone.focus();
      theForm.Telephone.select();
	return false;
	}

	if (document.downloadForm.URL.value.length == 0)
	{
	alert ("Veuillez entrer l'adresse de votre site web.");
      theForm.URL.focus();
      theForm.URL.select();
	return false;
	}


  img.src = "http://action.metaffiliation.com/suivi.php?mclic=CODE_CAMPAGNE_NETAFF&argann=" +
escape(theForm.Email.value);
  return true;
}

function validEmail(Email){
  var invalidChars;
  var badChar;
  var atPos;
  var peroidPos;

  invalidChars = "/:,;";
  if (Email == ""){
     return false;
  }
  for(i=0;i<invalidChars.length;i++){
    badChar = invalidChars.charAt(i);
    if (Email.indexOf(badChar,0) > -1){
       return false;
    }
  }
  atPos = Email.indexOf("@",1);
  if(atPos == -1){
    return false;
  }
  if (Email.indexOf("@",atPos+1) > -1){
    return false;
  }
  periodPos = Email.indexOf(".",atPos);
  if(periodPos == -1){
    return false;
  }
  if (periodPos+3 > Email.length){
    return false;
  }
  return true;
}

function validName(Name){
  var invalidChars;
  var badChar;

  invalidChars = "/:,;";
  if (Name == ""){
     return false;
  }
  for(i=0;i<invalidChars.length;i++){
    badChar = invalidChars.charAt(i);
    if (Name.indexOf(badChar,0) > -1){
       return false;
    }
  }
  return true;
}