function open_close(div, img, open_img, close_img) {
  if (document.all) {
    if (document.all[div]) {
      if (document.all[div].style.display == 'none') {
        document.all[div].style.display = '';
        if (document.all[img]) document.all[img].src = open_img;
      } else {
        document.all[div].style.display = 'none';
        if (document.all[img]) document.all[img].src = close_img;
      }
    }
  } else if (document.getElementById) {
    var el = document.getElementById(div);
    var im = document.getElementById(img);
    if (el) {
      if (el.style.display == 'none') {
        el.style.display = '';
        if (im) im.src = open_img;
      } else {
        el.style.display = 'none';
        if (im) im.src = close_img;
      }
    }
//  } else if (document.layers) {
//    alert(document.layers.length);
//    if (document.layers[div]) {
//      if (document.layers[div].visibility == 'hide') {
//        document.layers[div].visibility = "show";
//      } else {
//        document.layers[div].visibility = "hide";
//      }
//    }
  }
}

// Открыть в новом окне изображение
function openPic(sName,iW,iH)
{ if(sName=='') return;
  window.open(sName,
              '_blank',
              "width="+(iW+20)+
              ",height="+(iH+20)+
              ",toolbar=no,status=no,menubar=no, scrollbars=no,resizable=no, location=no");
}

