  // ** Free for you to use - www.ralpharama.co.uk
  // Start trapping mouse
  if (document.layers) document.captureEvents(Event.MOUSEMOVE);
  document.onmousemove=mtrack;
  var ent;   // Our floating div
  var posx=0;  // Our mouseX
  var posy=0;  // Our mouseY
  var offsetX=16;  // Offset X away from mouse
  var offsetY=16;  // Offset Y
  var popUp = false;  // Is it showing right now??!
  // Run upon load  
  function init() {
   // Set up div we will use to hover our text
   ent = document.createElement("div");
   // Change these to customise your popup
   ent.style.color = "#000000";
   ent.style.font = "normal x-small verdana";
   ent.style.padding = "1px 2px 1px 2px";
   ent.style.background = "#D7E4DA";
   ent.style.border = "1px solid black";
   // Don't, however, change these
   ent.style.left = "-100px";
   ent.style.top = "-100px";
   ent.style.width = "200px";
   ent.style.position = "absolute";
   ent.style.filter = "alpha(opacity=75)";
   ent.style.opacity = "0.75";
   ent.innerHTML = "";
   ent.style.zIndex = 99;
   document.getElementById("thepage").appendChild(ent);
  }
  // Keeps mouse x and y in posx and posy
  function mtrack(e) {
   if (popUp) {
    if (!e) var e = window.event;
    if (e.pageX || e.pageY) {
     posx = e.pageX;
     posy = e.pageY;
     winW = window.innerWidth;
     winH = window.innerHeight;
    }
    else if (e.clientX || e.clientY) {
     posx = e.clientX + document.body.scrollLeft;
     posy = e.clientY + document.body.scrollTop;
     winW = document.body.offsetWidth;
     winH = document.body.offsetHeight;
    }
		// Check x pos isn't over edge of screen
		if (posx + 200 > winW) {
			posx = winW-200;
		}
    ent.style.left = posx + offsetX + "px";
    ent.style.top = posy + offsetY + "px";
   }
  }
  // Change floating div to correct text on mouseover
  function doText(t, e) {
	 if (ent) {
	  popUp = true;
	  ent.innerHTML = t;
	 }
  }
  // Change back to nothing
  function doClear() {
	 if (ent) {
    popUp = false;
    ent.style.left = "-100px";
    ent.style.top = "-100px";
    ent.innerHTML = "";
	 }
  }

