



/*--------------------------------------
/*  Vérification de formulaire 
/*---------------------------------------
     */
function check_form_com(){
	docForm = document.formulaire;
	if (docForm.nom.value==''){
		alert("Le champ 'Nom' est obligatoire.");
		docForm.nom.focus();
		return;
	}
	if (docForm.prenom.value==''){
		alert("Le champ 'Prénom' est obligatoire.");
		docForm.prenom.focus();
		return;
	}
	if (docForm.adresse.value==''){
		alert("Le champ 'Adresse' est obligatoire.");
		docForm.adresse.focus();
		return;
	}
	if (docForm.cp.value==''){
		alert("Le champ 'Code postal' est obligatoire.");
		docForm.cp.focus();
		return;
	}
	if (docForm.ville.value==''){
		alert("Le champ 'Ville' est obligatoire.");
		docForm.ville.focus();
		return;
	}
	if (docForm.tel.value==''){
		alert("Le champ 'Téléphone' est obligatoire.");
		docForm.tel.focus();
		return;
	}
	if (docForm.email.value==''){
		alert("Le champ 'E-mail' est obligatoire.");
		docForm.email.focus();
		return;
	}
	if (docForm.email.value!=""){
		var exclude=/[^@\-\.\w]|^[_@\.\-]|[\._\-]{2}|[@\.]{2}|(@)[^@]*\1/;
		var check=/@[\w\-]+\./;
		var checkend=/\.[a-zA-Z]{2,3}$/;
		var bEmailCheck = true ;
		if(((docForm.email.value.search(exclude) != -1)||(docForm.email.value.search(check)) == -1)||(docForm.email.value.search(checkend) == -1)){
			alert("L'adresse email est incorrecte !");
			docForm.email.focus();
			return;
		}
	}
	

	

	docForm.action='http://www.voyages-pharaon.com/contact.php';
	docForm.submit(true);
}


function alert_submit_complete() {
	alert("\n\n\n\Votre demande de documentation a bien été prise en compte.\n\n\n");
}

function onbodyloaded() {

	if(submit_complete) alert_submit_complete()

}

var submit_complete = false;
window.onload = onbodyloaded;


/*  Fin Vérification de formulaire      */



function afficheId(baliseId) {
    if (document.getElementById && document.getElementById(baliseId) != null) {
         document.getElementById(baliseId).style.visibility='visible';
         document.getElementById(baliseId).style.display='block';
    }
}

function cacheId(baliseId) {
    if (document.getElementById && document.getElementById(baliseId) !=  null) {
         document.getElementById(baliseId).style.visibility='hidden';
         document.getElementById(baliseId).style.display='none';
    }
}

cacheId('contenu');
