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

function menuGaucheSportPop (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 ();
		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 menuGaucheSportHide () {		
	if (document.getElementById) {
		if (checkItGauche) clearTimeout(checkItGauche);
		checkItGauche = setTimeout('menuGaucheSportHideAll()',3000);
	}
}

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

function menuGaucheSportPopLien (actionVal, lienVal, popWidth, popHeight, popScroll) {
	if (document.getElementById) {		
		
		actionGauche = actionVal;
		lienIDGauche = lienVal;
		popWidthVal = popWidth;
		popHeightVal = popHeight;
		popScrollVal = popScroll;
				
		// 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';
			menuGaucheSportHide();
		}
		
		// onclick
		if (actionGauche == "click") {
			document.location = lienIDGauche;
		}
		
		// popUp
		if (actionGauche == "clickPop") {
			popUp (lienIDGauche,popWidthVal,popHeightVal,popScrollVal)
		}
	}
}