var enabletip; var offsetypoint; var ie; var ns6; var tipobj; var tipiframe; var tooltipInitialised = false; function initTooltip () { enabletip = false; offsetypoint=20; //Customize y offset of tooltip ie=document.all; ns6=document.getElementById && !document.all; tipobj = document.getElementById("idDivToolTip"); tipiframe=document.getElementById("idIFrameToolTip"); tipobj.style.top="0"; tipobj.style.left="0"; tipobj.style.width="0"; tipobj.style.height="0"; tipobj.style.border="1px solid black"; tipobj.style.padding = "2px"; tipobj.style.backgroundColor="white"; tipobj.style.zIndex="8888"; tipiframe.style.width = tipobj.offsetWidth; tipiframe.style.height = tipobj.offsetHeight; tipiframe.style.top = tipobj.style.top; tipiframe.style.left = tipobj.style.left; tipiframe.style.zIndex = tipobj.style.zIndex - 1; // eens initeel aan/uit zetten om visuele bugs op te lossen tipobj.style.position="absolute"; tipobj.style.visibility="visible"; tipiframe.style.display="block"; tooltipInitialised = true; hideToolTip(); document.onmousemove=positiontip; } function ietruebody(){ return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body; } function positiontip(e){ if (enabletip){ var curX=(ns6)?e.pageX : event.clientX+ietruebody().scrollLeft; var curY=(ns6)?e.pageY : event.clientY+ietruebody().scrollTop; //Find out how close the mouse is to the corner of the window var rightedge=ie&&!window.opera? ietruebody().clientWidth-event.clientX : window.innerWidth-e.clientX-20; var bottomedge=ie&&!window.opera? ietruebody().clientHeight-event.clientY-offsetypoint : window.innerHeight-e.clientY-offsetypoint-20; var leftedge=0; if (curX maxmove) { var x = 5; } else { var x = curX-shouldmove; } tipobj.style.left= x + "px"; } else //position the horizontal position of the menu where the mouse is positioned tipobj.style.left=curX+"px"; //same concept with the vertical position if (bottomedge