var TTIPS = [  ];
  var IE = document.all ? true : false

  if (!IE) document.captureEvents(Event.MOUSEMOVE)

  document.onmousemove = getMouseXY;

  var tempX = 0
  var tempY = 0


  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 }
    return true

  }
function ieCoordinates(event) {
   return [ event.clientX + document.body.scrollLeft, event.clientY + document.body.scrollTop ]
}
function notIeCoordinates(event) {
  return [event.pageX, event.pageY]
  
  
}
function operaCoordinates(event) {
   if (event.pageX) 
         return [ event.pageX, event.pageY ];
   else
         return [ event.clientX, event.clientY ];
}
function getWindowSize() {
   if (window.innerHeight != null) 
         return [ innerWidth, innerHeight ];
   else
         return [ document.body.clientWidth, document.body.clientHeight ];
}
function getWindowScroll() {
   if (window.innerHeight != null) 
         return [ pageXOffset, pageYOffset ];
   else
         return [ document.body.scrollLeft, document.body.scrollTop ];
}
function getElemSize(elem) {
   if (elem.offsetWidth) 
         return [ elem.offsetWidth, elem.offsetHeight ];
   else
         return [ elem.style.pixelWidth, elem.style.pixelHeight ];
}
var getCoordinates;
function showNote(ttipId, event) {
	var ttip = document.getElementById(ttipId)
   if (event) {
      var wX = getWindowScroll()[0];
      var wY = getWindowScroll()[1];
      var wWidth = getWindowSize()[0];
      var wHeight = getWindowSize()[1];
      var width = getElemSize(ttip)[0];
      var height = getElemSize(ttip)[1];
      var eX = getCoordinates(event)[0];
      var eY = getCoordinates(event)[1];
      var right = Math.min((wX + wWidth) - 10, width + eX);
      var bottom = Math.min((wY + wHeight) - 20, height + eY);
      var left = Math.max(wX, right - width);
      var top = Math.max(wY, bottom - height);
      ttip.style.top = 10 + top + 'px';
      ttip.style.left = 10 + left + 'px';
      
      ttip.style.visibility = "visible";
   }
}
function hideNote(ttipId) {
var ttip = document.getElementById(ttipId)
   ttip.style.visibility = "hidden";
}
if (window.opera) 
   getCoordinates = operaCoordinates;
else {
if (navigator.appVersion.indexOf("MSIE")!=-1) 

      getCoordinates = ieCoordinates;
else
      getCoordinates = notIeCoordinates;
}