var wmtt = null;
document.onmousemove = updateWMTT;
function updateWMTT(e) {
  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;
    width = 0;
    if( window.innerWidth){ //alle Browser außer IE
        width = window.innerWidth;
    }else if(document.documentElement && document.documentElement.clientWidth){
        // IE 6 mit DOCTYPE
        width = document.documentElement.clientWidth;
    }else if( document.body.clientWidth ){
        width = document.body.clientWidth;
    }
    
    tt_width = wmtt.innerWidth;
    if( x > width - wmtt.scrollWidth - 40 ){
        x = x - wmtt.scrollWidth - 20;
    }
    wmtt.style.left = (x + 20) + "px";
    wmtt.style.top   = (y + 20) + "px";
  }
}
function showWMTT(Tooltiptext) {
    wmtt = document.getElementById('tooltip_id');
    width = 0;
    if( window.innerWidth){ //alle Browser außer IE
        width = window.innerWidth;
    }else if(document.documentElement && document.documentElement.clientWidth){
        // IE 6 mit DOCTYPE
        width = document.documentElement.clientWidth;
    }else if( document.body.clientWidth ){
        width = document.body.clientWidth;
    }
    wmtt.innerHTML = "<table ><tr><td valign='top'><img src='templatesets/default/images/info.png' width=16 height=16/></td><td><div style='max-width:200px;text-align:left'>"+ Tooltiptext+"</div></td></tr></table>";
    wmtt.style.display = "block"
}
function hideWMTT() {
    wmtt.style.display = "none";
}



