﻿function funcHide(which)
{
  var span = document.getElementById(which);
  
  if(span.className == 'hide')
    span.className = 'show';
  else
    span.className = 'hide';
}

function funcHide2(which)
{
  var span = document.getElementById(which);
  
  if(span.className == 'hide')
    span.className = 'show2';
  else
    span.className = 'hide';
}

function funcEnlarge(which)
{
  var ScrollTop = document.body.scrollTop;
  if (ScrollTop == 0)
  {
    if (window.pageYOffset)
        ScrollTop = window.pageYOffset;
    else
        ScrollTop = (document.body.parentElement) ? document.body.parentElement.scrollTop : 0;
  }
  
  var div = document.getElementById('divEnlarge');
  div.style.display = 'block';
  var windowHeight = window.innerHeight ? window.innerHeight : document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight;
  var windowWidth = window.innerWidth ? window.innerWidth : document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body.clientWidth;
  div.style.top = (windowHeight / 2 - 325 + ScrollTop) + 'px';
  div.style.left = (windowWidth / 2 - 325) + 'px';
  var img = document.getElementById('imgLarge');
  img.src = which.src.replace('/small/', '/large/');
  img.alt = 'click to close this window';
  var title = document.getElementById('divTitle');
  title.innerText = which.alt;
}

function funcCloseEnlarge()
{
  var div = document.getElementById('divEnlarge');
  div.style.display = 'none';
  var img = document.getElementById('imgLarge');
  img.src = '/images/trans.gif';
}
