/*
var dom = (document.getElementById) ? true : false;
var ns5 = (!document.all && dom || window.opera) ? true: false;
var ie5 = ((navigator.userAgent.indexOf("MSIE")>-1) && dom) ? true : false;
var ie4 = (document.all && !dom) ? true : false;
var nodyn = (!ns5 && !ie4 && !ie5 && !dom) ? true : false;

var origWidth, origHeight;
var tipFollowMouse = true;
var tooltip, tipcss;
tooltip = document.getElementById("infobulle");


function get_mouse(evt) {
	if (!tipFollowMouse) {
		standardbody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body
		mouseX = (ns5)? evt.pageX: window.event.clientX + standardbody.scrollLeft;
		mouseY = (ns5)? evt.pageY: window.event.clientY + standardbody.scrollTop;
	}
	// tooltip width and height
	var tpWd = (ie4||ie5)? tooltip.clientWidth: tooltip.offsetWidth;
	var tpHt = (ie4||ie5)? tooltip.clientHeight: tooltip.offsetHeight;
	// document area in view (subtract scrollbar width for ns)
	var winWd = (ns5)? window.innerWidth-20+window.pageXOffset: standardbody.clientWidth+standardbody.scrollLeft;
	var winHt = (ns5)? window.innerHeight-20+window.pageYOffset: standardbody.clientHeight+standardbody.scrollTop;
	// check mouse position against tip and window dimensions
	// and position the tooltip 
	if ((mouseX+offX+tpWd)>winWd) 
		tooltip.style.left = mouseX-(tpWd+offX)+"px";
	else tooltip.style.left = mouseX+offX+"px";
	if ((mouseY+offY+tpHt)>winHt) 
		tooltip.style.top = winHt-(tpHt+offY)+"px";
	else tooltip.style.top = mouseY+offY+"px";
	if (!tipFollowMouse) t1=setTimeout("tooltip.style.visibility='visible'",100);
}


function ietruebody(){
	return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
} 
*/
// les affecte au style de la div infobulle pour qu'elle suive les d�placements
function get_mouse(e){
	if ($("#infobulle") != null) {
		var x;
		var y;
		
		if (e) {
			x = e.clientX + 10 + document.documentElement.scrollLeft;
			y = e.clientY + 10 + document.documentElement.scrollTop;			
		}else{
			x = event.clientX + 10 + document.documentElement.scrollLeft;
			y = event.clientY + 10 + document.documentElement.scrollTop;
		}
		
		
		//position verticale
		if(y > ((window.innerHeight + document.documentElement.scrollTop)/2)){
			y = y - document.getElementById("infobulle").offsetHeight - 20;
		}
		
			var Obj = $("#infobulle");
			Obj.css("left", x + "px" );
			Obj.css("top", y + "px" );
			document.getElementById("infobulle").style.left = x;
			document.getElementById("infobulle").style.top = y;
	}
}
// affiche la bulle
function see_bubble(html,width_){
  var Obj = $("#infobulle");
  Obj.append(html);
  Obj.show();
}
// cache la bubble
function kill_bubble(){
  $("#infobulle").hide();
  $("#infobulle").empty();
}
document.onmousemove = get_mouse;