if (!ez_NN4) {
  window.onresize = function() {
  displayEzMenus();
  }
} 

function displayEzMenu(panel,marker) {
  /* detect the coordinates of image named 'marker'and pass to showPermPanel to display menu panel 'Bar' */
  /* If you have used different names, please change the two lines below accordingly */
  var imgPosition = imgXY(marker);   
  if(imgPosition.x != -1 && imgPosition.y != -1) showPermPanel(panel, imgPosition.x, imgPosition.y);   
}

function imgXY(imgID) {
  /* This function returns the upperleft x,y coordinates of the specified image */
  var XY = new Object();
  var imgObj = document.images[imgID];
  
  XY.x = -1;
  XY.y = -1;
  /* si image existe dans la page */
  if(imgObj) {
	  if (document.layers) {
		XY.x = eval(imgObj).x;
		XY.y = eval(imgObj).y;
	  } else {
		var x,y, tempEl;
		x = eval(imgObj).offsetLeft;
		y = eval(imgObj).offsetTop;
		tempEl = eval(imgObj).offsetParent;
	  	while (tempEl != null) {
	  		x += tempEl.offsetLeft;
			y += tempEl.offsetTop;
	  		tempEl = tempEl.offsetParent;
	  	}
		XY.x = x;
		XY.y = y;
	  }
  }
  return XY;
}

/* Charge le menu sur body onLoad */
if (window.addEventListener)
window.addEventListener("load", displayEzMenus, false)
else if (window.attachEvent)
window.attachEvent("onload", displayEzMenus)
else if (document.getElementById)
window.onload=displayEzMenus