// JavaScript Document Guitariff
this.menuOpen = false;
this.menuOpenName = '';
this.ongletOpenName = '';

function menuOver(this_) {
   this_.className = "presence_bar_button_over";
   //alert (this_);
   }
function menuOut(this_, menuCourant_) {
   if(!this.menuOpen || (menuCourant_ != this.menuOpenName)) {
      this_.className = "presence_bar_button";
      }
   }
function toggleTab(this_, ongletCourant_) {
   if(!this.menuOpen) {
	   // il n'y a aucun menu ouvert, on l'ouvre
      ongletCourant_.className = "presence_bar_button_over";
	  this.menuOpenName = this_; //  on prend le nom du menu ouvre
	  this.ongletOpenName = ongletCourant_;
      this._openTab(this_);
      }
   else {
	   // il y a menu ouvert
	   
	    // on ferme le menu courant
	   	this.ongletOpenName.className = "presence_bar_button";
      	this._closeTab(this.menuOpenName);
	   
	   if (this_ != this.menuOpenName)
	   {	
	   		// ou ouvre le nouveau menu
			  this_.className = "presence_bar_button_over";
			  this.menuOpenName = this_;
			  this.ongletOpenName = ongletCourant_;
			  this._openTab(this_);	
		}
      }
   }
      
function closeAll () {
  // on ferme le menu courant
	   	this.ongletOpenName.className = "presence_bar_button";
      	this._closeTab(this.menuOpenName);
   
   this.menuOpen = false;
   }
function _openTab (this_) {
   var menu = document.getElementById(this_);
   menu.style.display = 'block';
   this.menuOpen = true;
   }
function _closeTab (this_) {
   var menu = document.getElementById(this_);
   menu.style.display = 'none';
   this.menuOpen = false;
   }