wmtt = null;
var clickCount = 0;
document.onclick = updateWMTT;


function showWMTT(id){
    wmtt = document.getElementById(id);
    wmtt.style.display = "block";
    document.getElementById(id).onclick = clickCount++;
}

function updateWMTT(e){
    //alert(clickCount);
    if(clickCount == 0){
    if (wmtt != null) {
        x = (document.all) ? window.event.x + wmtt.offsetParent.scrollLeft : e.pageX;
        y = (document.all) ? window.event.y + wmtt.offsetParent.scrollTop : e.pageY;
        wmtt.style.left = (x + 20) + "px";
        wmtt.style.top = (y + 40) + "px";
    }
    }


}

function hideWMTT(id){
    document.getElementById(id).style.display = "none";
    clickCount = 0;
}
