// JavaScript Document
var blnOk=true;

function Chargement() {
  
  if(document.body.style.backgroundColor!="") { blnOk=false; }
  if(document.body.style.color!="") { blnOk=false; }
  if(document.body.style.marginTop!="") { blnOk=false; }

  if(blnOk) 
  {   
    for(i=1;i<=3;i++) 
       {
      with(document.getElementById("sous_"+i).style) 
         {
        position="absolute";
        margin="0";
        //paddingLeft="5px";
              paddingBottom="10px";
              fontWeight="bold";
        zIndex="5";
              color="#646770";
              backgroundColor="#ffffff";
              //backgroundImage='url(images/px_bleu_fonce.gif)';
              top="20px";
        left=(((i-1)*134)+134)+"px";
      }
    }  
    CacherMenus();
  }
}

function MontrerMenu(strMenu) 
{
  if(blnOk) 
  {
    CacherMenus();  
    document.getElementById('sous_'+strMenu).style.display="block";
       document.getElementById('titre_sous_'+strMenu).className="select";
  }
}

function CacherMenus() 
{
  //alert(document.getElementById("ssmenu1").focus());
  if(blnOk ) 
  {
    for(i=1;i<=3;i++) 
       {
      with(document.getElementById("sous_"+i).style) {display="none";}
         document.getElementById('titre_sous_'+i).className="";
    }
       if (menu_select != '')document.getElementById('titre_sous_'+menu_select).className="select";
  }
}

/* ###################################################################################### */
/* ############################# MENU DES SOINS ######################################### */
function Chargement_soins(strMenu) 
{ 
    CacherMenus_soins();
       document.getElementById(strMenu).style.display="";
}

function CacherMenus_soins() 
{
    // on cache les archives (au niveau des annees):
    for(i=0;i<=10;i++) 
       {
      if (document.getElementById('soins_'+i)){
         with(document.getElementById('soins_'+i).style) {display="none";}
         //alert(i);
         }
    }
}

function MontrerMenu_soins(strMenu) 
{
    //alert(strMenu);
       CacherMenus_soins();
    document.getElementById(strMenu).style.display="";
}
/* ###################################################################################### */
/* ############################# MENU DES CATEGORIES ######################################### */
function Chargement_categories(strMenu) 
{ 
    CacherMenus_categories();
       document.getElementById(strMenu).style.display="";
    //on recup l'id pour modifier le graph du block
    id=strMenu.split("_");
    id=id[1];
    document.getElementById("block_"+id).className="module_menu_produits select";
    document.getElementById("img_h_"+id).style.display="";
    document.getElementById("img_b_"+id).style.display="";       
}

function CacherMenus_categories() 
{
    // on cache les archives (au niveau des annees):
    for(i=0;i<=100;i++) 
       {
      if (document.getElementById('categories_'+i)){
         with(document.getElementById('categories_'+i).style) {display="none";}
         //alert(i);
         }
         if (document.getElementById('block_'+i)){
         with(document.getElementById('block_'+i)) {className="module_menu_produits";}
         with(document.getElementById('img_h_'+i).style) {display="none";}
         with(document.getElementById('img_b_'+i).style) {display="none";}
         }         
    }
}

function MontrerMenu_categories(strMenu) 
{
    //alert(strMenu);
       CacherMenus_categories();
    document.getElementById(strMenu).style.display="";
    //on recup l'id pour modifier le graph du block
    id=strMenu.split("_");
    id=id[1];
    document.getElementById("block_"+id).className="module_menu_produits select";
    document.getElementById("img_h_"+id).style.display="";
    document.getElementById("img_b_"+id).style.display="";    
}
/* ###################################################################################### */
/* ############################# MENU DES PRODUITS ######################################### */
function Chargement_produits(strMenu) 
{ 
    CacherMenus_produits();
       document.getElementById(strMenu).style.display="";
    //on recup l'id pour modifier le graph du block
    id=strMenu.split("_");
    id=id[1];
    document.getElementById("block_"+id).className="module_menu_produits select";
    document.getElementById("img_h_"+id).style.display="";
    document.getElementById("img_b_"+id).style.display="";       
}

function CacherMenus_produits() 
{
    // on cache les archives (au niveau des annees):
    for(i=0;i<=100;i++) 
       {
      if (document.getElementById('produits_'+i)){
         with(document.getElementById('produits_'+i).style) {display="none";}
         }
         //alert(i);
         if (document.getElementById('block_'+i)){
         with(document.getElementById('block_'+i)) {className="module_menu_produits";}
         with(document.getElementById('img_h_'+i).style) {display="none";}
         with(document.getElementById('img_b_'+i).style) {display="none";}
         }
         
    }
}

function MontrerMenu_produits(strMenu) 
{
    //alert(strMenu);
       CacherMenus_produits();
    document.getElementById(strMenu).style.display="";
    //on recup l'id pour modifier le graph du block
    id=strMenu.split("_");
    id=id[1];
    document.getElementById("block_"+id).className="module_menu_produits select";
    document.getElementById("img_h_"+id).style.display="";
    document.getElementById("img_b_"+id).style.display="";
}
/* ###################################################################################### */
/* ############################# MENU DES EXPOS ######################################### */
function Chargement_expo(action) 
{ 
    switch (action)
       {
              case 'ouvre':
                     MontrerMenu_expo()
                     break;
              case 'ferme':
                     CacherMenus_expo() 
                     break;
       }
}
function clique_expo() 
{ 
       
       with(document.getElementById('archives').style) 
       {
              if (display=="none")display="";
              else display="none";
       }
}

function CacherMenus_expo() 
{
         with(document.getElementById('archives').style) {display="none";}
}

function MontrerMenu_expo() 
{
    document.getElementById('archives').style.display="";
}

/* ################################# PICTO + IMG CENTRE #######################################*/
function montre_centre()
{
       The_div=document.getElementById("plein_ecran");
       The_Pict=document.getElementById("img_picto");
       The_div.style.display='block';
       The_Pict.style.visibility='hidden';
}
function cache_centre()
{
       The_div=document.getElementById("plein_ecran");
       The_Pict=document.getElementById("img_picto");
       The_div.style.display='none';
       The_Pict.style.visibility='visible';
}

