/**
 *	Fonctions pour détecter la position de la souris puis
 *	Afficher dans un popup le calendrier au dessus du click de la souris
 */
//posX = 0
//posY = 0
//function openCalendar(nomChamp) {
//	window.open('choixdate.aspx?nomChamp=' + nomChamp ,'choixdate','height=140,width=200,titlebar=no,toolbar=no,left=' + posX + ',top=' + posY)
//}
//function getMousePos(e) {
//	if (document.all) {
//		posX=event.x+document.body.scrollLeft + window.screenLeft - 200;
//		posY=event.y+document.body.scrollTop + window.screenTop - 180;
//	}
//	else {
//		posX=e.pageX + window.screenX - 200;
//		posY=e.pageY + window.screenY - 60; 
//	}
//}

posX = 0;
posY = 0;

if(navigator.appName.substring(0,3) == "Net")
	document.captureEvents(Event.MOUSEMOVE);
document.onmousemove = coord;

e=window.event;
function mousex(e){
  if(document.layers) {return e.x;}
  else {return event.clientX;}
  }

function mousey(e){
  if(document.layers) {return event.y;}
  else {return event.clientY;}
  }
function coord(e){ 
posX = mousex();
posY = mousey()+140;
}

function openCalendar(nomChamp) {
	window.open('choixdate.aspx?nomChamp=' + nomChamp ,'choixdate','height=140px,width=200px,titlebar=no,toolbar=no,top='+posY+',left='+posX);
}

