function OverChangeFond(nomMenu){


	if (nomMenu=='brunch'){
		document.getElementById('brunch').src='images/brunch-on.gif';
		}
		else{
			if (nomMenu=='dejeuner'){
			document.getElementById('dejeuner').src='images/dejeuner-on.gif';
			
			}
			else{
				if (nomMenu=='salondethe'){
				document.getElementById('salonDeThe').src='images/salon-de-the-on.gif';
				
				}
				else{
					if (nomMenu=='baravin'){
					document.getElementById('barAVin').src='images/bar-a-vin-on.gif';
					
					}
					else{
						if (nomMenu=='diner'){
						document.getElementById('diner').src='images/diner-on.gif';
						
						}
						else{
							if (nomMenu=='cocktails'){
							document.getElementById('cocktails').src='images/cocktails-on.gif';
						
							}
						}
					}
				}
			}
		}
	}

function OutChangeFond(nomMenu){

	if (nomMenu=='brunch'){
	document.getElementById('brunch').src='images/brunch.gif';
	}
	else{
		if (nomMenu=='dejeuner'){
		document.getElementById('dejeuner').src='images/dejeuner.gif';
		}
		else{
			if (nomMenu=='salondethe'){
			document.getElementById('salonDeThe').src='images/salon_de_the.gif';
			}
			else{
				if (nomMenu=='baravin'){
				document.getElementById('barAVin').src='images/bar-a-vin.gif'
				}
				else{
					if (nomMenu=='diner'){
					document.getElementById('diner').src='images/diner.gif'
					}
					else{
						if (nomMenu=='cocktails'){
						document.getElementById('cocktails').src='images/cocktails.gif'
						}
					}
				}
			}
		}
	}
}

function verifMail(thisForm) {
var email = thisForm.mail2.value;
var aroba = email.indexOf("@");
	if (aroba == -1) {
	
	return false;
	}
var point = email.indexOf(".", aroba);
	if ((point == -1) || (point == (aroba + 1))) {
	
	return false;
	}
var point = email.lastIndexOf(".");
	if ((point + 1) == email.length) {
	
	return false;
	}
var point = email.indexOf("..")
	if (point != -1) {
	return false;
	}
return true;
}

function valider_formulaire(thisForm)
{
     
    if(thisForm.nom2.value == '')
    {
         alert('Le champ "Nom" doit \352tre rempli');
         thisForm.nom2.focus();
         return false;
    }
		if(thisForm.prenom2.value == '')
    {
         alert('Le champ "Pr\351nom" doit \352tre rempli');
         thisForm.prenom2.focus();
         return false;
    }
	    if(thisForm.mail2.value == '')
    {
         alert('Le champ "Mail" doit \352tre rempli');
         thisForm.mail2.focus();
         return false;
    }
	 
		    if (!verifMail(thisForm))
    {
         alert('Merci de bien vouloir renseigner une adresse email correcte dans le champ "Email"');
         thisForm.mail2.focus();
         return false;
    }
	 if(document.getElementById("verif_saisie2").value=="")
 {
 	 alert('Merci de bien vouloir renseigner "Verification caract\350re"');
         thisForm.verif_saisie2.focus();
         return false;
 }
 	if(document.getElementById("verif_saisie2").value!=document.getElementById("verif2").value)
 {
 		 alert('Les caract\350res ne correspondent pas avec ceux de l\'image.');
         thisForm.verif_saisie2.focus();
         return false;
 }


    return true;
}

function valider_formulaire2(thisForm)
{
     
    if(thisForm.nom.value == '')
    {
         alert('Le champ "Nom" doit \352tre rempli');
         thisForm.nom.focus();
         return false;
    }
		if(thisForm.prenom.value == '')
    {
         alert('Le champ "Pr\351nom" doit \352tre rempli');
         thisForm.prenom.focus();
         return false;
    }
	
		if(thisForm.telephone.value == '')
    {
         alert('Le champ "T\351l\351phone" doit \352tre rempli');
         thisForm.telephone.focus();
         return false;
    }
	
	    if(thisForm.mail.value == '')
    {
         alert('Le champ "Mail" doit \352tre rempli');
         thisForm.mail.focus();
         return false;
    }
	 
		    if (!verifMailR(thisForm))
    {
         alert('Merci de bien vouloir renseigner une adresse email correcte dans le champ "Email"');
         thisForm.mail.focus();
         return false;
    }
		if(thisForm.telephone.value == '')
    {
         alert('Le champ "T\351l\351phone" doit \352tre rempli');
         thisForm.telephone.focus();
         return false;
    }
		if(thisForm.nbPersonnes.value == '')
    {
         alert('Le champ "Nombre de personnes" doit \352tre rempli');
         thisForm.nbPersonnes.focus();
         return false;
    }
		if(thisForm.jour.value == '')
    {
         alert('Le champ "Jour de r\351servation" doit \352tre rempli');
         thisForm.jour.focus();
         return false;
    }
		

		if( document.getElementById('confirmation1').checked == false && document.getElementById('confirmation2').checked == false)
    {
        	alert('Le champ "Mode de confirmation" doit \352tre coch\351');
        	return false;
    }
	
	 if(document.getElementById("verif_saisie").value=="")
 {
 	 alert('Merci de bien vouloir renseigner "V\351rification caract\350re"');
         thisForm.verif_saisie.focus();
         return false;
 }
 	if(document.getElementById("verif_saisie").value!=document.getElementById("verif2").value)
 {
 		 alert('Les caract\350res ne correspondent pas avec ceux de l\'image.');
         thisForm.verif_saisie.focus();
         return false;
 }


    return true;
}

function verifMailR(thisForm) {
	var email = thisForm.mail.value;
	var aroba = email.indexOf("@");
		if (aroba == -1) {
		
		return false;
		}
	var point = email.indexOf(".", aroba);
		if ((point == -1) || (point == (aroba + 1))) {
		
		return false;
		}
	var point = email.lastIndexOf(".");
		if ((point + 1) == email.length) {
		
		return false;
		}
	var point = email.indexOf("..")
		if (point != -1) {
		return false;
		}
	return true;
}


/*function ChangeTypeRepas() {
	var typeRepas = window.document.reservation.elements['typeRepas'].options[window.document.reservation.elements['typeRepas'].selectedIndex].value ;
		
	if (typeRepas == "diner" )
	{
		window.document.reservation.document.getElementById('dejeuner').className='champTexteCache';
		window.document.reservation.diner.className='champTexteVisible';
		
	}
	else{
		window.document.reservation.diner.className='champTexteCache';
		window.document.reservation.dejeuner.className='champTexteVisible';
		
		}
	
}
*/


