﻿function getXY(e) {
    var y = 0;
    var x = 0;
    while (e != null) {
        x += e.offsetLeft;
        y += e.offsetTop;
        e = e.offsetParent;
    }
    return { x: x, y: y };
}
function ttw(self, who, visible) {
    var hint = self.parentNode.getElementsByTagName('SPAN')[0];
    if (!visible)
        hint.className = "tt-invisible";
    else {
        a = getXY(who);
        b = getXY(self.parentNode);
        hint.className = "tt-visible";
        hint.style.top = a.y + who.offsetHeight + 8;
        hint.style.left = a.x;
    }
}
function tt(self, who, visible) {
    ttw(self, document.getElementById(who), visible);
}
