function initBodyBoxes(box, tag)
{
  var node = getNode(box);
  if (node == null)
    return;

  var boxes = node.getElementsByTagName('DIV');
  for (i = 0; i < boxes.length; ++i) {
    if (!hasClassName(boxes[i], 'body-box'))
      continue;

    boxes[i].className += ' indented';
    boxes[i].style.display = 'none';
    if (!(heading = boxes[i].parentNode.getElementsByTagName(tag)[0]))
      continue;
    heading.style.cursor = 'pointer';
    heading.className += ' body-box-expand';
    registerEvent(heading, 'click', new Function('toggleBodyBox("' + boxes[i].id + '");'));
  }
} // end func initBodyBoxes

function toggleBodyBox(boxId)
{
  var box = getNode(boxId), heading = getNode(boxId + '-heading');

  if (box == null)
    return;

  if (box.style.display == 'none') {
    box.style.display = 'block';
    if (heading) {
      removeClassName(heading, 'body-box-expand');
      heading.className += ' body-box-collapse';
    }
  } else {
    box.style.display = 'none';
    if (heading) {
      removeClassName(heading, 'body-box-collapse');
      heading.className += ' body-box-expand';
    }
  }
} // toggleBodyBox

function showGallery(nodeId, lang, idx)
{
  showImageWin = window.open('/showGallery.php?nodeId=' + nodeId + '&lang=' + lang + '&idx=' + idx, 'Galerie', 'resizable=yes');
} // end func showGallery

