function treeSubdirToggle(nodeName) {
  var node = document.getElementById(nodeName);
  var img = document.getElementById(nodeName + 'img');
  if (node.style.display == 'none') {
    node.style.display = 'block';
    img.src = fishEyePageContext + '/' + fishEyeSTATICDIR + '/images/folder_open.gif';
  } else {
    node.style.display = 'none';
    img.src = fishEyePageContext + '/' + fishEyeSTATICDIR + '/images/folder_closed.gif';
  }
  return false;
}

function fhCopyDestToggle(nodeName) {
  return feToggleNodeAndImage(nodeName, false, false);
}
function csDiffToggle(nodeName) {
  return feToggleNodeAndImage(nodeName, false, false);
}
function feToggleNodeAndImage(nodeName, forceOpen, forceClose) {
  var node = document.getElementById(nodeName);
  if (node == null) return false;
  var img = document.getElementById(nodeName + 'img');
  var open = (node.style.display == 'none');
  open = (!forceClose) && (forceOpen || open);
  if (open) {
    if (node.style.display == 'none') {
      node.style.display = 'block';
      img.src = fishEyePageContext + '/' + fishEyeSTATICDIR + '/images/arrow_open.gif';
    }
  } else {
    if (node.style.display == 'block') {
      node.style.display = 'none';
      img.src = fishEyePageContext + '/' + fishEyeSTATICDIR + '/images/arrow_closed.gif';
    }
  }
  return false;
}
function csToggleAllDiffs(ids, forceOpen, forceClose) {
  for (var i = 0; i < ids.length; i++) {
    feToggleNodeAndImage(ids[i], forceOpen, forceClose);
  }
  return false;
}
function csExpandAllDiffs(ids) {
  csToggleAllDiffs(ids, true, false);
  return false;
}
function csCollapseAllDiffs(ids) {
  csToggleAllDiffs(ids, false, true);
  return false;
}
