function showTooltip(id, obj)
{
  if(id < 1 || id > 3) return;

  if(!obj) return;

  xOff = obj.offsetWidth/1;
  yOff = obj.offsetHeight/1;

  while(obj.offsetParent){
    xOff += obj.offsetLeft/1;
    yOff += obj.offsetTop/1;
    obj = obj.offsetParent;
  }

  var tooltipDiv = document.getElementById("tooltipDiv");  
  tooltipDiv.innerHTML = "Wczytuję dane...";
  tooltipDiv.style.top = yOff + "px";
  tooltipDiv.style.left = xOff + "px";
  tooltipDiv.style.display = "block";

  url = "http://localhost/tooltip" + id + ".html";
  startGETRequest(url, onComplete, onEnd);
}

function closeTooltip()
{
  var tooltipDiv = document.getElementById("tooltipDiv");
  tooltipDiv.style.display = "none";
}

function onComplete(text, xml)
{
  var tooltipDiv = document.getElementById("tooltipDiv");
  tooltipDiv.innerHTML = text;
}

function onEnd(text, xml)
{
}