//----------------- FICHIER DE GESTION DES MENUS SUR LA PAGE D'ACCUEIL -------------
//
// fonctions:
//    - MM_findObj(layer): retourne l'objet Layer correspondant
//    - showMenu(layer): affichage de la rubrique survolée
//    - hideMenu(layer): cache de la rubrique quittée
//
//---------------------------------------------------------------------------------

MenuVisible='';
//-------------------------- FONCTION MM_FINDOBJ ----------------------------------
function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=parent.Main; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && parent.Main.getElementById) x=parent.Main.getElementById(n); return x;
}

//-------------------------- FONCTION SHOWMENU ---------------------------------
function showMenu() {
	var obj,args=showMenu.arguments;
	if (MenuVisible!='') {
		obj=MM_findObj(MenuVisible);
		obj=obj.style;
		obj.visibility='hidden';
	}
	obj=MM_findObj(args[0]);
	obj=obj.style;
	obj.visibility='visible';
	MenuVisible=args[0];
}

//-------------------------- FONCTION HIDEMENU ---------------------------------
function hideMenu() {
	var obj;
	obj=MM_findObj(MenuVisible);
	obj=obj.style;
	obj.visibility='hidden';
}	

//if (window != top)
//        top.location.href = location.href;

function FollowScrollbar() {
	var obj=MM_findObj('Menu');
	obj=obj.style;
	docWidth = document.body.clientWidth;
	docHeight = document.body.clientHeight;
	scrollPos = document.body.scrollTop;
	//follower.style.pixelLeft = docWidth - 90;
	obj.pixelTop = scrollPos;
}

window.onresize = FollowScrollbar;
window.onscroll = FollowScrollbar;
