﻿// Barbaros YATKIN - 2009

var x = 0, y = 0;
function bul(e)
{
if(!e) var e = window.event;
if (e.pageX || e.pageY)
{
      x = e.pageX;
      y = e.pageY;
  }
  else if (e.clientX || e.clientY)
  {
      x = e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft;
      y = e.clientY + document.body.scrollTop + document.documentElement.scrollTop;
  }

  document.getElementById("tooltip").style.left = eval(x - 45) + "px";
  document.getElementById("tooltip").style.top = y - 20 + "px";
}
//      document.onmousemove = bul;

function StartFollow()
{
    var tooltip = document.getElementById("tooltip");
    if (tooltip) {
        tooltip.style.visibility = 'visible';
        document.onmousemove = bul;
    }  
}
function StopFollow()
{
    var tooltip = document.getElementById("tooltip");
    if (tooltip) {
        tooltip.style.visibility = 'hidden';
        document.onmousemove = "";
    }  
}
