// Toggle expansion of CONTENTS.HTM
function toggleAll(elem, toggle) {
  elems = elem.all.tags("DIV");
  for (i = 0; i < elems.length; i++) {
    with (elems[i])
      if (className == "blurb")
        style.display = toggle ? "block" : "none";
  }
}

function toggleExpand() {
  var eHead = window.event.srcElement;
  if (eHead.className == "expand") {
    var idHead = eHead.id;
    if (eBlurb = document.all["blurb" + idHead.substring(idHead.length - 3)]) {
      with (eBlurb)
        if (style.display == "block") {
          style.display = "none";
          toggleAll(eBlurb, false);
        } else
          style.display = "block";
    }
  }
  window.event.returnValue = false;
}

if (currentBrowser.isIE5up) {
  idExpandSpan.innerHTML = '<img class="noprint" src="images/on.gif" alt="Развернуть все" ' +
    'onclick="toggleAll(document.documentElement, true)" style="vertical-align: middle; cursor: hand">&nbsp;';
  idHideSpan.innerHTML = '&nbsp;<img class="noprint" src="images/off.gif" alt="Свернуть все" ' +
    'onclick="toggleAll(document.documentElement, false)" style="vertical-align: middle; cursor: hand">';
  document.oncontextmenu = toggleExpand;
}

