//init
if (document.all) {
  docObj='document.all.';
  styleObj='.style';
  type=1;
} else if (document.getElementById) {
  docObj="document.getElementById('";
  styleObj="').style";
  type=2;
} else if (document.layers) {
  docObj='document.';
  stylObj='';
  type=3;
}

function annotate( note, t ) {
  domNew = eval( docObj + note + styleObj );
  domAnchor = t.style;
  if ( domNew.visibility == "visible" ) {
    domNew.visibility = "hidden";
  } else {
    //position it
    //alert( t.nodeName + ": " + t.offsetLeft + ", " + t.offsetTop );
    theleft = t.offsetLeft + 10;
    thetop = t.offsetTop + 20;
    //alert( t.parentNode.parentNode.offsetTop );
    theleft = t.parentNode.parentNode.offsetLeft;
    thetop = t.parentNode.parentNode.offsetTop;
    /*while ( t.parentNode.nodeName != "BODY" ) {
      t = t.parentNode;
      if ( t.nodeName != "TR" ) {
        alert( t.nodeName + ": " + t.offsetLeft + ", " + t.offsetTop );
        theleft += t.offsetLeft;
        thetop += t.offsetTop;
      }
    }*/
    domNew.left = theleft;
    domNew.top = thetop;
    //make it visible
    domNew.visibility = "visible";
  }
}