<!--

function random_imghead(){
  var headerimage=new Array()
  //Headerplaatjes
  headerimage[1]="../images/poster/1.gif"
  headerimage[2]="../images/poster/2.gif"
  headerimage[3]="../images/poster/3.gif"
  headerimage[4]="../images/poster/4.gif"

  var ry=Math.floor(Math.random()*headerimage.length)

  if (ry==0)
     ry=1
     document.write("<style>#poster {background: url('"+headerimage[ry]+"');}</style>");
	 

 random_imghead()
}


//-------------------------------------------------------------------------------------------//

var image = null;

function ShowFoto(image)
{
  var divwidth    = 600;
  var divheight   = 470;
  var width       = document.body.clientWidth;
  var height      = document.body.clientHeight + document.body.scrollTop;
  var marginleft  = (width - divwidth) / 2;
  var margintop   = (height - divheight) /2;
  var bodywidth	  = document.body.scrollWidth;
  var bodyheight  = document.body.scrollHeight;

  document.getElementById("a_overlay").style.width  = bodywidth;
  if (height > bodyheight)
  {
    document.getElementById("a_overlay").style.height = height;
  }
  else document.getElementById("a_overlay").style.height = bodyheight;

  document.getElementById("showfoto").style.width  = divwidth;
  document.getElementById("showfoto").style.height = divheight;
  document.getElementById("showfoto").style.top    = margintop + (document.body.scrollTop / 2);
  document.getElementById("showfoto").style.left   = marginleft;
  
  var inner = "<img src=\ "+image+"\ onclick=\"HideFoto();\" /><br /><span class=\"sluitfoto\">Klik op de foto om deze af te sluiten</span>"

  document.getElementById("showfoto").innerHTML = inner;
  
  document.getElementById("showfoto").style.display  = "block";
  document.getElementById("a_overlay").style.display  = "block";
}

function HideFoto()
{
  document.getElementById("showfoto").style.display  = "none";
  document.getElementById("a_overlay").style.display  = "none";
}

