function getobject(obj){
if (document.getElementById)
return document.getElementById(obj)
else if (document.all)
return document.all[obj]
}



function findPos(obj) {
    var curleft = curtop = 0;
    if (obj.offsetParent) {
        do {
            curleft += obj.offsetLeft;
            curtop += obj.offsetTop;
        } while (obj = obj.offsetParent);
    }
    return [curleft,curtop];
}

    
function showTooltip(him,tt)
{
  him.id = "curr-tt";
  himId = him.id;

  getobject(himId).firstChild.id = "curr-tt-img";
  posarray = findPos(getobject("curr-tt-img"));

  getobject(tt).style.display= "block";
  getobject(tt).style.left = (posarray[0] + 49) + "px";
  getobject(tt).style.top = (posarray[1] - (getobject(tt).offsetHeight - 26)) + "px";
  getobject(tt).onmouseover = function() { keepTooltipVisible(this.id); }
  getobject(tt).onmouseout = function() { setTooltipUnvisible(this.id); }
}



function hideTooltip(him,tt)
{
  getobject(tt).style.display= "none";
  getobject(him.id).firstChild.id = "";
  him.id = "";
}

function keepTooltipVisible(tt)
{
  getobject(tt).style.display= "block";
}

function setTooltipUnvisible(tt)
{
  getobject(tt).style.display= "none";
}


function ifProps()
{
  if (window.location.hash.indexOf("#iframe") > -1  && parent.frames.length > 0)
  {
    document.getElementsByTagName("body")[0].className = "iframe";
  }
}


this.onload = function() { ifProps(); }
