<script type="text/javascript">
  var activeMenu = null;
  function showMenuItem(menuId, menuBarItem)
  {
    if(!menuBarItem) return;

    xOff = 0;
    yOff = menuBarItem.offsetHeight/1;

    while(menuBarItem.offsetParent){
      xOff += menuBarItem.offsetLeft/1;
      yOff += menuBarItem.offsetTop/1;
      menuBarItem = menuBarItem.offsetParent;
    }
    closeMenu();
    activeMenu = document.getElementById(menuId);
    if(!activeMenu) return;
    activeMenu.style.top = yOff + "px";
    activeMenu.style.left = xOff + "px";
    activeMenu.style.display = "block";
  }
  //dalsza cześć skryptu