function showImg(img)
{
  if (document.getElementById("phFoto"))
  {
    var phFoto = document.getElementById('phFoto');
    var src = img.getAttribute( 'src' );
    
    phFoto.setAttribute( 'src', src );
    
    var intClientWidth    = document.documentElement.clientWidth;
    var intClientHeight   = document.documentElement.clientHeight;
    var intScrollLeft     = document.documentElement.scrollLeft;
    var intScrollTop      = document.documentElement.scrollTop;

    var breedte;
    var hoogte;
    var top;
    var left;
  
    var intTop        = 0;
    var intLeft       = 0;

    intTop          = 80 + intScrollTop;
    top = intTop
    intTop          += 'px';
    intLeft         = ( intClientWidth / 2.5 ) + intScrollLeft;
    left = intLeft;
    intLeft         += 'px';

    // De grootte van de afbeelding moet softwarematig worden vastgesteld.
    intLeft = '10px';

    phFoto.style.top    = intTop;
    phFoto.style.left   = intLeft;
    phFoto.style.position = 'absolute';
    phFoto.style.visibility = 'visible';
    phFoto.style.display = 'block';
    phFoto.style.zIndex = 1100;
    phFoto.setAttribute( 'alt', 'Klik op de afbeelding om deze te verkleinen' );
    phFoto.setAttribute( 'title', 'Klik op de afbeelding om deze te verkleinen' );
    breedte = phFoto.width;
    hoogte = phFoto.height;

    if (document.getElementById("btnClose"))
    {
      var btn = document.getElementById("btnClose")
      btn.style.position = 'absolute';
      btn.style.visibility = 'visible';
      btn.style.display = 'block'
      btn.style.left = ( breedte - 140 - 45 ) + 'px';
      btn.style.top = ( hoogte + top - 65 ) + 'px';
      btn.style.width = '120px';
      btn.style.zIndex = 1150;
      btn.style.color = '#555'
      btn.style.borderWidth = '1px';
      btn.style.borderStyle = 'solid';
      btn.style.borderColor = '#555';
    }
    return;
  }
}

function hideImg()
{
  if (document.getElementById("phFoto"))
  { 
    var phFoto = document.getElementById( 'phFoto' );
    phFoto.setAttribute( "src", '' );
    phFoto.style.position = 'absolute';
    phFoto.style.visibility = 'hidden';
    phFoto.style.display = 'none';
    if (document.getElementById("btnClose"))
    {
      var btn = document.getElementById("btnClose")
      btn.style.position = 'absolute';
      btn.style.visibility = 'hidden';
      btn.style.display = 'none'
    }
  }
  return;

}