function tstForm() {
  if(tstNom()&&tstOrg()&&tstDest()&&tstMessage()&&tstCode()) return true;
  return false;
}
function tstNom() {
  if(document.recommandation.nom.value.length!=0) return true;
  alert("Il n'y a aucun nom !");
  document.recommandation.nom.focus();
  return false;
}
function tstOrg() {
  var i,x=""+document.recommandation.email.value;
  for(i=0;i<x.length;i++) {
    if((x.charAt(i)=="@")&&(i>1)) {
      for(i=i+3;i<x.length;i++) {
        if((x.charAt(i)==".")&&(i<x.length-2)) return true;
      }
    }
  }
  alert("Votre e-mail est incorrect !");
  document.recommandation.email.focus();
  return false;
}
function tstDest() {
  var i,x=""+document.recommandation.to.value;
  for(i=0;i<x.length;i++) {
    if((x.charAt(i)=="@")&&(i>1)) {
      for(i=i+3;i<x.length;i++) {
        if((x.charAt(i)==".")&&(i<x.length-2)) return true;
      }
    }
  }
  alert("L'e-mail de votre ami(e) est incorrect !");
  document.recommandation.to.focus();
  return false;
}
function tstMessage() {
  if(document.recommandation.msgv.value.length!=0) return true;
  alert("Il n'y a aucun message !");
  document.recommandation.msgv.focus();
  return false;
}
function tstCode() {
  if(document.recommandation.code.value.length==4) return true;
  alert("Le code est incorrect !");
  document.recommandation.code.focus();
  return false;
}
