function bClick(ind)
{ 
	switch(ind)
	{
		case 7:
		document.getElementById("bMastiff").style.backgroundImage = "url(image/boutonBas.png)";
		break;
	    	case 8:
		document.getElementById("bResultat").style.backgroundImage = "url(image/boutonCanelleBas.png)";
		break;
		case 1:
		document.getElementById("bChiens").style.backgroundImage = "url(image/boutonFlorettaBas.png)";
		break;
		case 2:
		document.getElementById("bNais").style.backgroundImage = "url(image/boutonBas.png)";
		break;
		case 3:
		document.getElementById("bNurs").style.backgroundImage = "url(image/boutonCanelleBas.png)";
		break;
	    	case 4:
		document.getElementById("bPedi").style.backgroundImage = "url(image/boutonFlorettaBas.png)";
		break;
	    	case 5:
		document.getElementById("bCont").style.backgroundImage = "url(image/boutonBas.png)";
		break;
	    	case 6:
		document.getElementById("bRegl").style.backgroundImage = "url(image/boutonCanelleBas.png)";
		break;
	    	    
		default:
		break;
	}

}
function bRelache(ind)
{ 
	switch(ind)
	{
		case 7:
		document.getElementById("bMastiff").style.backgroundImage = "url(image/boutonHaut.png)";
		window.location.href = "Mastiffs.php";
		break;
		case 8:
		document.getElementById("bResultat").style.backgroundImage = "url(image/boutonCanelleHaut.png)";
		window.location.href = "Resultat.php";
		break;
		case 1:
		document.getElementById("bChiens").style.backgroundImage = "url(image/boutonFlorettaHaut.png)";
		window.location.href = "News.php";
		break;
		case 2:
		document.getElementById("bNais").style.backgroundImage = "url(image/boutonHaut.png)";
		window.location.href = "Naissance.php";
		break;
		case 3:
		document.getElementById("bNurs").style.backgroundImage = "url(image/boutonCanelleHaut.png)";
		window.location.href = "Nurserie.php";
		break;
		case 4:
		document.getElementById("bPedi").style.backgroundImage = "url(image/boutonFlorettaHaut.png)";
		window.location.href = "Pedigre.php";
		break;
		case 5:
		document.getElementById("bCont").style.backgroundImage = "url(image/boutonHaut.png)";
		window.location.href = "Contact.php";
		break;
		case 6:
		document.getElementById("bRegl").style.backgroundImage = "url(image/boutonCanelleHaut.png)";
		window.location.href = "Reglementation.php";
		break;
		default:
		break;
	}
}
function verifiermail() 
{
      var recu = document.getElementById("Email").value;
      var verif = new RegExp("^([a-zA-Z0-9_-])+([.]?[a-zA-Z0-9_-]{1,})*@([a-zA-Z0-9-_]{2,}[.])+[a-zA-Z]{2,3}$");
      if (!verif.test(recu))
        {
            return false;
        }
         else
        {
            return true;
        }
         
}
function validation()
{
   
   var saisie1 = document.getElementById("Nom").value;
    var saisie2 = document.getElementById("Prenom").value;
     var saisie3 = document.getElementById("Email").value;
     
	if ( saisie1 == "") 
	{
            alert("Vous devez renseigner le champ Nom");
            document.getElementById("Nom").focus();
            return false;
        }
        if ( saisie2 == "") 
	{
            alert("Vous devez renseigner le champ Prenom");
            document.getElementById("Prenom").focus();
            return false;
        }
            if ( saisie3 == "") 
	{
            alert("Vous devez renseigner le champ Email");
            document.getElementById("Email").focus();
            return false;
        }else if(!verifiermail())
        {
            alert("Vous devez saisir une adresse email valide");
            document.getElementById("Email").focus();
            return false;
        }
        
        return true;
         
}


