<!--  POPUP Newsletter -->
function popUp() {
	var l = ((screen.width-530)/2)
	var h = ((screen.height-225)/2)
	props=window.open('newsletter.html','ACTUALITE','width=530, height=225, top=' + h.toString()+', left=' + l.toString() + ', location=0, statusbars=0, toolbar=no, scrollbars=no, resizable=no');
}

//LANCEMENT DES FONCTIONS au chargement de la page
function loadMenu(){
 setHover();
 menuPosition('menu1','menu1','m1');
 menuPosition('menu2','menu2','m2');
 menuPosition('menu3','menu3','m3');
 menuPosition('menu4','menu4','m4');
}

// GESTION DES ROLLOVER
var rep = "./images/";
function survol(Objet, Fichier) {
   if (!document.images) {}
   document.images[Objet].src = rep + Fichier;
}

// GESTION DU MENU = affichage des rubriques
function hover(obj){
  if(document.all){
    UL = obj.getElementsByTagName('ul');
	if(UL.length > 0){
      sousMenu = UL[0].style;
      if(sousMenu.display == 'none' || sousMenu.display == ''){
        sousMenu.display='block';
      }else{
        sousMenu.display='none';
      }
    }
  }
}

function setHover(){
  for(y=1; y < 5; y++){
    menu = 'm'+y;
	LI = document.getElementById(menu).getElementsByTagName('li');
	nLI = LI.length;
	for(i=0; i < nLI; i++){
	  LI[i].onmouseover = function(){
  		this.style.backgroundColor='#FFFFFF';
	    hover(this);
	  }
	  LI[i].onmouseout = function(){
  		this.style.backgroundColor='#F0F0EC';
		hover(this);
	  }
    }
  }
}

// GESTION DU MENU = montrer/cacher les menus
function montre(object){
  if (document.layers && document.layers[object]){ 
    document.layers[object].visibility = 'show';
	document.layers.zIndex = 100;
  } 
  else if (document.all){
    document.all[object].style.visibility = 'visible';
    document.all[object].style.zIndex = 100;
  }
  else if (document.getElementById){
    document.getElementById(object).style.visibility = 'visible';
	document.getElementById(object).style.zIndex = 100; 
  } 
}

function cache(object){
  if (document.layers && document.layers[object]){ 
    document.layers[object].visibility = 'hide';
  } 
  else if (document.all){ 
    document.all[object].style.visibility = 'hidden';
  }
  else if (document.getElementById){
    document.getElementById(object).style.visibility = 'hidden'; 
  } 
}

// GESTION DU MENU = positionner les menus
var ns4 = (document.layers)? true:false; 
var ie4 = (document.all)? true:false;
var dom = (document.getElementById)? true:false;

function menuPosition(ID_Anchor,Name_Anchor,ID_Div){
 var DivLeft = 0;
 var DivTop = 0;
  if (dom){ 
	pos = document.getElementById(ID_Anchor);
    DivLeft = getLeft(pos);
    DivTop = getTop(pos);
	document.getElementById(ID_Div).style.left = DivLeft+"px";
    document.getElementById(ID_Div).style.top = DivTop+"px";
  }
  else if (ie4){ 
	pos = document.all[ID_Anchor];
    DivLeft = getLeft(pos);
    DivTop = getTop(pos);
	document.all[ID_Div].style.posLeft = DivLeft;
    document.all[ID_Div].style.posTop = DivTop;
  }
  else if (ns4){
    pos = document.anchors[Name_Anchor];
    DivLeft = pos.x;
    DivTop = pos.y;
    document.layers[ID_Div].pageX = DivLeft;
    document.layers[ID_Div].pageY = DivTop;
  }
}

function getLeft(MyObject){
 if (MyObject.offsetParent)
  return (MyObject.offsetLeft + getLeft(MyObject.offsetParent));
 else 
  return (MyObject.offsetLeft);
}

function getTop(MyObject){
 if (MyObject.offsetParent)
  return (MyObject.offsetTop + getTop(MyObject.offsetParent));
 else
  return (MyObject.offsetTop);
}