function MM_preloadImages()
{
  var d = document;
  if (d.images)
  {
    if (!d.MM_p)
      d.MM_p = new Array();
    var i, j=d.MM_p.length, a=MM_preloadImages.arguments;
    for (i=0; i<a.length; i++)
    {
      if (a[i].indexOf("#") != 0)
      {
        d.MM_p[j]       = new Image;
        d.MM_p[j++].src = a[i];
      }
    }
  }
}

function sel(id, img) {
  if (obj = document.getElementById('i'+id))
    obj.src = "pub/"+img;

  if (obj = document.getElementById('t'+id))
    obj.style.backgroundColor = "#999999";
}

function unsel(id, img) {
  if (obj = document.getElementById('i'+id))
    obj.src = "pub/"+img;

  if (obj = document.getElementById('t'+id))
    obj.style.backgroundColor = "#B40000";
}

function  reHight() {
  if (obj = document.getElementsByTagName('table')) {
    kol = obj.length;
    h = 0;
    for(i=0;i<kol;i++) {
      if (obj[i].className == "contBlockGal") {
        hk = obj[i].clientHeight;
        if (h < hk) {
          h = hk;
        }
      }
    }

    for(i=0;i<kol;i++) {
      if (obj[i].className == "contBlockGal") {
        obj[i].style.height = h+'px';
      }
    }
  }
}

function selGalImg(id, img) {
  if (obj = document.getElementById('galI'+id))
    obj.src = "pub/"+img;
}

function unselGalImg(id, img) {
  if (obj = document.getElementById('galI'+id))
    obj.src = "pub/"+img;
}






