
var IE = document.all?true:false
if (!IE) document.captureEvents(Event.MOUSEMOVE)
document.onmousemove = getMouseXY;
var tempX = 0
var tempY = 0

// Main function to retrieve mouse x-y pos.s
function getMouseXY(e) {
  if (IE) { 
    tempX = event.clientX + document.body.scrollLeft
    tempY = event.clientY + document.body.scrollTop
  } else {  
    tempX = e.pageX
    tempY = e.pageY
  }  
  if (tempX < 0){tempX = 0}
  if (tempY < 0){tempY = 0}  

  if(mn!=0){
  	if((tempX < x1 || tempX > x2) || (tempY < y1 || tempY > y2))
  	{
  	dSel()
	}
  }
  

// pour l'anim
  
  	if((tempX > 25 && tempX < 250) || (tempY > 5 || tempY < 130))
  	{
  	xm = tempX;
    ym = tempY;
	}
  
  
  
  
  
  return true
}

var x1=0; x2=0; y1=0; y2=0; mn = 0; 

function dSel(){

		mn.className = "";
		mn.parentNode.getElementsByTagName('a').item(0).className = "";
		mn = 0;
		//	document.getElementById('menu').style.zIndex = "2";

}

function menu1(t)
{
	if(mn!=0)
	{
	dSel()

	}
if(t.parentNode.getElementsByTagName('ul').length > 0 && t.parentNode.getElementsByTagName('ul').item(0).style.display != 'none'){

	//document.getElementById('menu').style.zIndex = "5";

	cbl = t.parentNode.getElementsByTagName('ul').item(0)
	cbl.className = "over";
	t.getElementsByTagName('a').item(0).className = "over";

	oParentL(cbl);oParentT(cbl)

	lft = oNL; tp = oNT+5;

	oNL = 0; oNT = 0;

	x1 = lft - 10;
	x2 = lft + cbl.offsetWidth;

	y1 = tp - t.offsetHeight;
	y2 = tp + (cbl.offsetHeight + 15)

	mn = cbl;
	}
	else { mn = 0 }
}

oNL = 0;
oNT = 0;

function oParentL(d){

	d2 = d.offsetParent;
	oNL += d2.offsetLeft;
	if(d2.offsetParent) 
		{ oParentL(d2) }
	else { return oNL; }
}

function oParentT(d){
	d2 = d.offsetParent;
	oNT += d2.offsetTop;
	if(d2.offsetParent) 
		{ oParentT(d2) }
	else { return oNT; }
}


