function verif() {

// Vérification du nom
if (document.form.contact.value == '') {
	alert('Le nom de contact est obligatoire !');
	document.form.contact.focus();
	return false
};

// Vérification du téléphone
if (document.form.telephone.value == '') {
	alert('Le téléphone est obligatoire !');
	document.form.telephone.focus();
	return false
};


// Vérification de l'email
//if (document.form.email.value == '') {
//	alert('L\'email est obligatoire !');
//	return false
//};

if (document.form.email.value != '') {
if (CheckMail(document.form.email.value) == false) {
	window.alert("Adresse E-mail invalide !\nVeuillez respecter le format xxx@xxx.xxx s.v.p.");
	return false
};
};


  var checkOK = "0123456789";
  var checkStr = document.form.siret.value;
  var allValid = true;
  var decPoints = 0;
  var allNum = "";
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Ne tapez que  des chiffres dans le champ \"siret\".");
    document.form.siret.focus();
    return (false);
  }

  var checkStr = document.form.siret.value.length;
  if (checkStr<9)
  {
    alert("Tapez un numéro de siret valide (9 chiffres) !");
    document.form.siret.focus();
    return (false);
  }






function CheckMail(MailData) {
	correct = true;
	p = MailData.indexOf("@");
	if (p != -1) {
		correct = (MailData.indexOf(".",p) != -1);
	}
	else {
		correct = false;
	}
	return correct;
}


function CheckDate(DateData,DateFormat) {
	correct = true;
	if ( (DateData.length < 11) && (DateData.length > 7) ) {
		if (DateFormat == "FR") {
			j = DateData.substring(0,2);
			m = DateData.substring(3,5);
		}
		else {
			j = DateData.substring(3,5);
			m = DateData.substring(0,2);
		}
		a = DateData.substring(6,DateData.length);
		bi = ((parseInt(a) % 4) == 0);


		if (  ( (m == "01") || (m == "03") || (m == "05") || (m == "07") || (m == "08") || (m == "10") || (m == "12") ) && ( (Math.round(j) >= 1) && (Math.round(j) <= 31) ) ) {
			correct = true;
		}
		else {
			if (  ( (m == "04") || (m == "06") || (m == "09") || (m == "11") ) && ( (Math.round(j) >= 1) && (Math.round(j) <= 30) ) ) {
				correct = true;
			}
			else {
				if (bi)  {
					correct = (  ( (Math.round(j) >= 1) && (Math.round(j) <= 29) ) && (m == "02") );
				}
				else {
					correct = ( ( (Math.round(j) >= 1) && (Math.round(j) <= 28) ) && (m == "02")  );
				}
			}
		}
	}
	else {
		correct = false;
	}
	return correct;
}


}
