// for making sfeerbeeld popups in center of screeen
// input is image path, image widt & image height

// Set browser-determined global variables
var NN      = (document.layers ? true : false);
var hideName = (NN ? 'hide' : 'hidden');
var showName = (NN ? 'show' : 'visible');

// Define a function to hide layers
function hideSlide() {

  refSlide("zoomlayer").style.visibility = hideName;
  //refSlide("zoomlayer").innerHTML ="";
}

function hidehintSlide() {

    refSlide("hintlayer").style.visibility = hideName;
    //refSlide("zoomlayer").innerHTML ="";
}  

// Define a function to reveal layers
function showSlide(name) {
  refSlide(name).style.visibility = showName;
  refSlide(name).style.visibility = showName;
  }

// Define a central function to reference layers
function refSlide(name) {
  if (NN) { return document.layers[name]; }
  else { return document.getElementById(name); }
  }

// build and show zoomlayer for images
function sfeerPopup(sfeerURL,width,height) {
    
	refSlide("zoomlayer").innerHTML = "<img onClick='hideSlide();' src='" + sfeerURL + "' alt='' border='0'><br />Cliquez sur l&#39image pour fermer";
	refSlide("zoomlayer").style.width = width + "px";
	refSlide("zoomlayer").style.top= "200px";
	refSlide("zoomlayer").style.height = (parseInt(height) + 30) + "px";
	refSlide("zoomlayer").style.marginLeft = (100-parseInt(width)/2) + "px";
	
	showSlide("zoomlayer");
}

// build and show zoomlayer for texts
function textPopup(width,height) {
	refSlide("zoomlayer").style.width = width + "px";
	refSlide("zoomlayer").style.height = height + "px";
	showSlide("zoomlayer");
}
