  var curmenu=0;

function getAbsolutePos(el) {
  var r = { x: el.offsetLeft, y: el.offsetTop };
  if (el.offsetParent) {
    var tmp = getAbsolutePos(el.offsetParent);
    r.x += tmp.x;
    r.y += tmp.y;
  }
  return r;
}

  function bover(obj) {obj.style.backgroundColor="white";}
  function bout(obj) {obj.style.backgroundColor="#EBF5C2";}

  function m1over(obj) {obj.style.backgroundColor="#EDF0DC";}
  function m1out(obj) {obj.style.backgroundColor="white";}

  function m2over(obj) {obj.style.backgroundColor="white";}
  function m2out(obj) {obj.style.backgroundColor="#EDF0DC";}

  function show(name, ref) {
    eval("obj=document.all['"+name+"']");
//    obj.style.left=document.body.scrollLeft+event.clientX-event.offsetX+158;
//    obj.style.top=document.body.scrollTop+event.clientY-event.offsetY-3;
    obj.style.left=getAbsolutePos(ref).x+160;
    obj.style.top=getAbsolutePos(ref).y-1;
    obj.style.visibility='visible';
    if (ref!=0) curmenu=ref;
    curmenu.style.backgroundColor="#EDF0DC";
    curmenu.style.color='#800000';
  }

  function show2(name) {
    eval("obj=document.all['"+name+"']");
    obj.style.visibility='visible';
    curmenu.style.backgroundColor="#EDF0DC";
    curmenu.style.color='#800000';
  }
  
  function hide(name) {
    eval("obj=document.all['"+name+"']");
    obj.style.visibility='hidden';
    if (curmenu!=0) {
      curmenu.style.backgroundColor="#ffffff";
      curmenu.style.color='#15450C';
    }
  }

  function showpic(name, alt) {
    eval("var pic=window.open(\"\", \"photo\", \"width=500,height=400,menubar=no,scrollbar=no\")");
    pic.document.open();
        content='<html><head>'
        +'<script language="JavaScript">function keyDown(){key=window.event.keyCode;if (key==27) {window.close()};}document.onkeydown = keyDown;</script>'
        +'<body topmargin=0 leftmargin=0 marginwidth=0 marginheight=0 style="font: bold 10px tahoma"><center><img src="'+name+'" id="pic" onload="window.resizeTo(this.width+10,this.height+60)"><br>'+alt+'</center></body></html>';
    pic.document.writeln(content);
    pic.focus();
  }

