function cursorhand(ind)
{
	switch(ind)
	{
	
	case 1:
    document.getElementById("bindex").style.backgroundImage = "url(image/boutonBas.png)";document.body.style.cursor = "pointer"; 
    
    break
		
	case 2:
    document.getElementById("binstitut").style.backgroundImage = "url(image/boutonBas.png)";document.body.style.cursor = "pointer"; 
    
    break;
   	case 3:
    document.getElementById("bproduits").style.backgroundImage = "url(image/boutonBas.png)";document.body.style.cursor = "pointer"; 
    
    break;
    case 4:
    document.getElementById("btarifs").style.backgroundImage = "url(image/boutonBas.png)";document.body.style.cursor = "pointer"; 
   
    break;
    case 5:
    document.getElementById("bpromos").style.backgroundImage = "url(image/boutonBas.png)";document.body.style.cursor = "pointer"; 
    
    break;
   	case 6:
    document.getElementById("bCont").style.backgroundImage = "url(image/boutonBas.png)";document.body.style.cursor = "pointer"; 
    
    break;
    case 7:
    document.getElementById("bfaq").style.backgroundImage = "url(image/boutonBas.png)";document.body.style.cursor = "pointer"; 
    break;
    case 8:
    document.getElementById("bvisite").style.backgroundImage = "url(image/boutonBas.png)";document.body.style.cursor = "pointer"; 
    break;
    default:
    break;
}
	
    
   
}

function cursordefault(ind)
{
	switch(ind)
{	
	case 1:
    document.getElementById("bindex").style.backgroundImage = "url(image/boutonHaut.png)";document.body.style.cursor = "default";
    
    break
		
	case 2:
    document.getElementById("binstitut").style.backgroundImage = "url(image/boutonHaut.png)";document.body.style.cursor = "default"; 
    
    break;
   	case 3:
    document.getElementById("bproduits").style.backgroundImage = "url(image/boutonHaut.png)";document.body.style.cursor = "default"; 
    
    break;
    case 4:
    document.getElementById("btarifs").style.backgroundImage = "url(image/boutonHaut.png)";document.body.style.cursor = "default"; 
   
    break;
    case 5:
    document.getElementById("bpromos").style.backgroundImage = "url(image/boutonHaut.png)";document.body.style.cursor = "default"; 
    
    break;
   	case 6:
    document.getElementById("bCont").style.backgroundImage = "url(image/boutonHaut.png)";document.body.style.cursor = "default";
    
    break;
    case 7:
    document.getElementById("bfaq").style.backgroundImage = "url(image/boutonHaut.png)";document.body.style.cursor = "default";
    break;
    case 8:
    document.getElementById("bvisite").style.backgroundImage = "url(image/boutonHaut.png)";document.body.style.cursor = "default"; 
    break;
    default:
    break;
  
}
}


function bClick(ind)
{ 
	switch(ind)
	{
	
	case 1:
    document.getElementById("bindex").style.backgroundImage = "url(image/boutonBas.png)";
    
    break
		
	case 2:
    document.getElementById("binstitut").style.backgroundImage = "url(image/boutonBas.png)";
    
    break;
   	case 3:
    document.getElementById("bproduits").style.backgroundImage = "url(image/boutonBas.png)";
    
    break;
    case 4:
    document.getElementById("btarifs").style.backgroundImage = "url(image/boutonBas.png)";
   
    break;
    case 5:
    document.getElementById("bpromos").style.backgroundImage = "url(image/boutonBas.png)";
    
    break;
   	case 6:
    document.getElementById("bCont").style.backgroundImage = "url(image/boutonBas.png)";
    
    break;
    case 7:
    document.getElementById("bfaq").style.backgroundImage = "url(image/boutonBas.png)";
    break;
    case 8:
    document.getElementById("bvisite").style.backgroundImage = "url(image/boutonBas.png)";
    break;
    default:
    break;
}

}
function bRelache(ind)
{ 
	switch(ind)
	{
	case 1:
    document.getElementById("bindex").style.backgroundImage = "url(image/boutonHaut.png)";
    window.location.href = "index.php";
    break;	
		
		
	case 2:
    document.getElementById("binstitut").style.backgroundImage = "url(image/boutonHaut.png)";
    window.location.href = "institut.php";
    break;
   	case 3:
    document.getElementById("bproduits").style.backgroundImage = "url(image/boutonHaut.png)";
    window.location.href = "produits.php";
    break;
    case 4:
    document.getElementById("btarifs").style.backgroundImage = "url(image/boutonHaut.png)";
    window.location.href = "tarifs.php";
    break;
    case 5:
    document.getElementById("bpromos").style.backgroundImage = "url(image/boutonHaut.png)";
    window.location.href = "promos.php";
    break;
   	case 6:
    document.getElementById("bCont").style.backgroundImage = "url(image/boutonHaut.png)";
    window.location.href = "Contact.php";
    break;
    case 7:
    document.getElementById("bfaq").style.backgroundImage = "url(image/boutonHaut.png)";
    window.location.href = "faq.php";
    break;
    case 8:
    document.getElementById("bvisite").style.backgroundImage = "url(image/boutonHaut.png)";
    window.location.href = "visite.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;
        
   
      
}
}

