function ajouterAuxFavoris()
{

         var ua = navigator.userAgent.toLowerCase();
         var isIE = ((ua.indexOf("msie") != -1) && (ua.indexOf("opera") == -1) && (ua.indexOf("webtv") == -1));
         //tester si le navigateur est IE
         if(isIE)
         {
         window.external.AddFavorite(location.href,document.title);
         }
}


function visibilite(thingId)
{
        var targetElement;
        targetElement = document.getElementById(thingId) ;
        if (targetElement.style.display == "none")
        {
                targetElement.style.display = "" ;

        } else {
                targetElement.style.display = "none" ;
        }
}

//fonction qui permet d'ouvrir les sous catégories du menu
function ouvrirfermerBoite(nomboite,lien)
{
   if(nomboite!=null && lien!=null)
   {
        //si la boite n'a pas de sous catégorie alors lien sur la catégorie
        var presenceSousCategorie=$('#'+nomboite).html();
        if(presenceSousCategorie=="")
        {
          //lien vers la grande catégorie
          document.location.href=lien;
        }
        else
        {
          //afficher ou masquer suivant l'action
          if($('#'+nomboite).css("display")=="none")
          {
             $('#'+nomboite).show("slow");
          }
          else
          {
            $('#'+nomboite).hide("slow");
          }
        }
   }
}


//fonction qui permet d'ouvrir la boite d'une sous catégorie
function ouvrirBoite(nomboite,nomboiteparent)
{
 if(nomboiteparent!=null)
 {
   $('#'+nomboiteparent).show();
 }
 if(nomboite!=null)
 {
   $('#'+nomboite).show();
 }
}



//fonction qui permet de changer la longueur
function changerLongueurArticle(valeurarticle,id_article)
{
 var taille=$("#longueur_"+id_article).val();
 var prix=taille*valeurarticle;
 prix=parseInt(prix);
 $("#prixtotallongueur_"+id_article).html(prix);
}