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(document.getElementById) {
    with(document.getElementById("texte").style) {
      if(position!="") { blnOk=false; }
      if(top!="") { blnOk=false; }
      if(left!="") { blnOk=false; }
      if(width!="") { blnOk=false; }
      if(height!="") { blnOk=false; }
      if(zIndex!="") { blnOk=false; }
      if(margin!="") { blnOk=false; }
      if(padding!="") { blnOk=false; }
      if(visibility!="") { blnOk=false; }
    }
  }
  else{
  blnOk=false;
  }

  if(blnOk) {
    with(document.body.style) {
/* la couleur du fond */
      backgroundColor="#E58900";
      color="#FFF";
      marginLeft="15em";
    }
    
    
    with(document.getElementById("texte").style) {
      margin="0";
      padding="1em";
      backgroundColor="#FFF";
      color="#333";
    }
    
/* C'est ici qu'on gère l'espacement des éléments du menu.
C'est codé en dur et c'est laid, mais ça marche. */

    for(i=1;i<=10;i++) {
      with(document.getElementById("menu"+i).style) {
        position="absolute";

		if(i<2){top=(((i-1)*2)+1)+"em";}        else 
		if(i<4){top=(((i-1)*2)+4)+"em";}        else 
		if(i<5){top=(((i-1)*2)+5.2)+"em";}      else 
		if(i<9){top=(((i-1)*2)+6.4)+"em";}      else 
		       {top=(((i-1)*2)+7.6)+"em";}

		left="1em";
        	width="13em";

		if(i==8) {height="2.4em";}		else
		if(i==4) {height="2.4em";}		else
		if(i==3) {height="2.4em";}		else
		if(i==1) {height="2.4em";}		else
		         {height="1.2em";}
        textAlign="center";
        margin="0";
        padding="0";
        zIndex="2"; 
      }
    }
        
    CacherMenus();
  }
}

function MontrerMenu(strMenu) {  
  if(blnOk) {
    CacherMenus();
    
    document.getElementById(strMenu).style.visibility="visible";
  }
}

function CacherMenus() {
  if(blnOk) {
    for(i=2;i<=6;i++) {
      with(document.getElementById("ssmenu"+i).style) {
        visibility="hidden";
      }
    }
  }
}


