var checkItGauche;
var actionGauche;
var	sMenuGauche;
var	xCoordGauche;
var	yCoordGauche;	
var	sMenuStatutGauche;
var lienIDGauche;	
var x;

function menuGauchePop (lienGauche, menuGauchePopVal, menuStatut) {

	sLienGauche = lienGauche;
	sMenuGauche = menuGauchePopVal;	
	sMenuStatutGauche = menuStatut;					
	
	var newX = findPosX(sLienGauche);
	var newY = findPosY(sLienGauche);									
	var menuPopGauche = new getObj(sMenuGauche);		
			
	if (document.getElementById) {			
		
		// Ferme tous les sous-menus
		menuHautHideAll ();
		menuGaucheHideAll ();		
		
		// Si menu gauche sport est presente, ferme ces sous-menus aussi
		if (document.getElementById('menuGauchePopSport1')) {
			menuGaucheSportHideAll ();
		}

		// Ouvre le bon sous menu (si enabled)
		if (sMenuStatutGauche == "enabled") {													
			menuPopGauche.style.display = 'block';
			menuPopGauche.style.position = 'absolute';
			menuPopGauche.style.top = newY + 'px';
			menuPopGauche.style.left = (newX + 128) + 'px';
		}	
	}
}

function menuGaucheHide () {		
	if (document.getElementById) {
		if (checkItGauche) clearTimeout(checkItGauche);
		checkItGauche = setTimeout('menuGaucheHideAll()',30);
	}
}

function menuGaucheHideAll () {	
	
	if ((document.getElementById) && (isPageLoaded == true)) {
	
		x = 1;		
        while (document.getElementById('menuGauchePop' + x)) {
          // turn off layer
          document.getElementById('menuGauchePop' + x).style.display = 'none';
		  
          // increase x with each loop
          x++;		  
         }
		 
	}	
	
}	

function menuGauchePopLien (actionVal, lienVal) {
	if (document.getElementById) {		
		actionGauche = actionVal;
		lienIDGauche = lienVal;
		
		// mouseover
		if (actionGauche == "mouseover") {
			document.getElementById(lienIDGauche).style.cursor = 'pointer';
			document.getElementById(lienIDGauche).style.cursor = 'hand';
			document.getElementById(lienIDGauche).style.color = '#FFFFFF';
			document.getElementById(lienIDGauche).style.backgroundColor = '#999999';
		}
		
		// mouseout
		if (actionGauche == "mouseout") {
			document.getElementById(lienIDGauche).style.color = '#000000';
			document.getElementById(lienIDGauche).style.backgroundColor = '#CCCCCC';
			//menuGaucheHide();
		}
		
		// onclick
		if (actionGauche == "click") {
			document.location = lienIDGauche;
		}
	}
}	