AjouterGestionCharg(InitEnBref);

function InitEnBref() {
	
	if (document.getElementById("g2c_lienAffBreves")) {
		var declencheur = document.getElementById("g2c_lienAffBreves");
	
		AjouterGestionEve(declencheur, "mouseover", AfficherEnBref, false);

		// attribuer style par Javascript (pour réaction immédiate)
		document.getElementById("g2c_liensBreves").style.display = "none";
		
		// correction d'un bug d'affichage dans IE
		document.getElementById("g2c_navBasRub").style.margin = "0";
		
		return true;
		
	}
}

function AfficherEnBref(event) {
			
  if (typeof event == "undefined") {
    event = window.event;
  }

	var enBref = document.getElementById("g2c_liensBreves");
	
	if (enBref.style.display == "none") {
		enBref.style.display = "block";
	}
	else {
		enBref.style.display = "none";			
	}
	
  return true;
}

function AjouterGestionCharg(fn) {
  if (typeof window.addEventListener != 'undefined') {
    window.addEventListener('load', fn, false);
  } 
	else if (typeof document.addEventListener != 'undefined') {
    document.addEventListener('load', fn, false);
  } 
	else if (typeof window.attachEvent != 'undefined') {
    window.attachEvent('onload', fn);
  } 
	else {
    var precFn = window.onload;
    if (typeof window.onload != 'function') {
      window.onload = fn;
    } 
		else {
      window.onload = function() {
        precFn();
        fn();
      };
    }
  }
}

function AjouterGestionEve(cible, typeEve, refFonction, capture) {
  if (typeof cible.addEventListener != "undefined") {
    cible.addEventListener(typeEve, refFonction, capture);
  } 
	else if (typeof cible.attachEvent != "undefined") {
    cible.attachEvent("on" + typeEve, refFonction);
  } 
	else {
    typeEve = "on" + typeEve;

    if (typeof cible[typeEve] == "function") {
      var precGestion = cible[typeEve];

      cible[typeEve] = function() {
        precGestion();

        return refFonction();
      }
    }
    else {
      cible[typeEve] = refFonction;
    }
  }

  return true;
}
 
  
