function checkForm(){
	var theForm = document.ajout_compte;
	if (( !theForm.civ[0].checked) && (!theForm.civ[1].checked) && (!theForm.civ[2].checked)) {	
		alert("Veuillez remplir le champ 'Civilité'");
		return;
	}
	if (theForm.nom.value=="") {
		alert("Veuillez remplir le champ 'Nom'");
		theForm.nom.focus();
		return;
	}
	if (theForm.prenom.value=="") {
		alert("Veuillez remplir le champ 'Prénom'");
		theForm.prenom.focus();
		return;
	}
	if (theForm.adresse.value=="") {
		alert("Veuillez remplir le champ 'Adresse'");
		theForm.adresse.focus();
		return;
	}
	if (theForm.cp.value=="") {
		alert("Veuillez remplir le champ 'Code Postal'");
		theForm.cp.focus();
		return;
	}
	if (theForm.ville.value=="") {
		alert("Veuillez remplir le champ 'Ville'");
		theForm.ville.focus();
		return;
	}
	if (theForm.pays.value=="") {
		alert("Veuillez remplir le champ 'Pays'");
		theForm.pays.focus();
		return;
	}
	if (theForm.mail.value!=""){
		var exclude=/[^@\-\.\w]|^[_@\.\-]|[\._\-]{2}|[@\.]{2}|(@)[^@]*\1/;
		var check=/@[\w\-]+\./;
		var checkend=/\.[a-zA-Z]{2,3}$/;
		var bEmailCheck = true ;
		if(((theForm.mail.value.search(exclude) != -1)||(theForm.mail.value.search(check)) == -1)||(theForm.mail.value.search(checkend) == -1)){
			alert("L'adresse \'E-mail\' est incorrecte !");
			theForm.mail.focus();
			return;
		}
	} else {
		alert("Veuillez remplir le champ 'e-mail'");
		theForm.mail.focus();
		return;
	}
	
	if (theForm.password.value!=""){
		if (theForm.password.value.length < 5) {
			alert("Votre 'Mot de passe' doit contenir au moins 5 caractères");
			theForm.password.focus();
			return;
		}
	} else {
		alert("Veuillez remplir le champ 'Mot de passe'");
		theForm.password.focus();
		return;
	}
	if (theForm.tel.value=="") {
		alert("Veuillez remplir le champ 'N° de téléphone'");
		theForm.tel.focus();
		return;
	}
	if ((!theForm.connu[0].checked) && (!theForm.connu[1].checked) && (!theForm.connu[2].checked) && (!theForm.connu[3].checked)) {	
		alert("Comment avez-vous connu les parfums By Kilian ?");
		return;
	}

	theForm.action="compte.php";
	theForm.submit();
}

function champautre(varChoix) {
	if (varChoix=="1") {
		document.getElementById('connu2').style.display = "block";
	}
	if (varChoix=="2") {
		document.getElementById('connu2').style.display = "none";
	}
}