function showToolTip(e)
{
 if (!e) var e = event;
 var o = getObject(e);
 /*while(o.tagName.toLowerCase() != 'a') {
  o = o.parentNode;
 } */
 if (o.id.length == 0) return;
 var x = getleftPos(o);
 var y = getTopPos(o);
 var container = document.getElementById("toolbar_container");
 var w = getWidth();
 var boxw = container.style.width;
 boxw = boxw.replace("px", "");
 if (1*x + 1*boxw > w) x = w - boxw - 5;
 container.style.left = x + "px";

 var h = getHeight();
 var boxh = 50;//container.style.height;
 //boxh = boxh.replace("px", "");
 if (1*y + 1*boxh > h) y = y - boxh - 5;

 container.style.top = y + "px";
 //container.innerHTML = x + "+" + boxw + ">" + w;
 getToolTip(o.id);
 container.style.visibility = "visible";
}
function hiddenToolTip(e)
{
 var container = document.getElementById("toolbar_container");
 container.style.visibility = "hidden";
}

function getWidth()
{
  var myWidth = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    myWidth = window.innerWidth;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    myWidth = document.documentElement.clientWidth;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    myWidth = document.body.clientWidth;
  }
  return myWidth;
}
function getHeight()
{
  var myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myHeight = document.body.clientHeight;
  }
  return myHeight;
}

