function show(photo, w, h)
{
  var doc = document.body;
  var win = document.getElementById('img_win');
  var img = document.getElementById('img');
  var top = doc.scrollTop + doc.clientHeight/2 - h/2;

  if (top < 0) top = 0;
  win.style.top = top;

  win.style.left = doc.clientWidth/2 - w/2;
  win.style.visibility = 'visible';

  img.src = '/img/1x1.gif';
  img.width = w;
  img.height = h;
  img.src = photo;
}

function hide()
{
  document.getElementById('img_win').style.visibility = 'hidden';
  img.width = 0;
  img.height = 0;
  img.src = '/img/1x1.gif';
}

function sh(on, id)
{
  sub = document.getElementById('s' + id);
  if (on == 1) sub.style.visibility = 'visible';
  else sub.style.visibility = 'hidden';
}
