// Redirection de la frame sur accueil si appel direct
function retourindex ()
{if ( top == self )
   self.location.href = "../index.php";
}

// Redirection de la frame sur accueil si appel direct d'un produit
function retourindexproduit (id)
{if ( top == self )
   self.location.href = "../index.php?id="+id;
}
// Redirection de la frame sur accueil si appel direct d'une gamme
function retourindexgamme (id)
{if ( top == self )
   self.location.href = "../indexgamme.php?id="+id;
}

// Affichage date
function afficheDate() {
  var maintenant=new Date();
  var jour=maintenant.getDate();
  var mois=maintenant.getMonth()+1;
  var an=maintenant.getFullYear();
  document.write("Date : ",jour,"/",mois,"/",an,".");
}

// La fonction retourne un nombre alŽatoire entier entre 1 et N
   function aleatoire(N) {
      return (Math.floor((N)*Math.random()+1));
   }

// Ouverture et fermeture de div
	function montrercacher(id){
  
 		  var element = document.getElementById(id);
		   if(element.style.display=="none") element.style.display="block";
 		  else element.style.display="none";  
		}

