// 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;
}

// Define a function to reveal layers
function showSlide(name) {
    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 = "<br /><img src='" + sfeerURL + "' alt='' border='0' width='" + width + "px'><div id='pu_close'><a href='#' onClick='javascript:hideSlide();'><img src='Images/close.png' alt='Sluiten' width='22' height='22' border='0'></a></div>";
    refSlide("zoomlayer").style.width = width + "px";
    refSlide("zoomlayer").style.height = (parseInt(height) + 20) + "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");
}
function hidehintSlide() {

    refSlide("hintlayer").style.visibility = hideName;
    //refSlide("zoomlayer").innerHTML ="";
}