function getPageSize(){
    
    var xScroll, yScroll;
    
    if (window.innerHeight && window.scrollMaxY) {  
        xScroll = document.body.scrollWidth;
        yScroll = window.innerHeight + window.scrollMaxY;
    } else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
        xScroll = document.body.scrollWidth;
        yScroll = document.body.scrollHeight;
    } else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
        xScroll = document.body.offsetWidth;
        yScroll = document.body.offsetHeight;
    }
    
    var windowWidth, windowHeight;
    if (self.innerHeight) { // all except Explorer
        windowWidth = self.innerWidth;
        windowHeight = self.innerHeight;
    } else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
        windowWidth = document.documentElement.clientWidth;
        windowHeight = document.documentElement.clientHeight;
    } else if (document.body) { // other Explorers
        windowWidth = document.body.clientWidth;
        windowHeight = document.body.clientHeight;
    }   
    
    // for small pages with total height less then height of the viewport
    if(yScroll < windowHeight){
        pageHeight = windowHeight;
    } else { 
        pageHeight = yScroll;
    }

    // for small pages with total width less then width of the viewport
    if(xScroll < windowWidth){  
        pageWidth = windowWidth;
    } else {
        pageWidth = xScroll;
    }

    arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight) 
    return arrayPageSize;
}

function getScrollPosition(Left)
{
    var Property = (Left)? "scrollLeft" : "scrollTop";

    if (document.documentElement && document.documentElement[Property])
    {
        return document.documentElement[Property];
    }
    else if (document.body)
    {
        return document.body[Property];
    }
    return 0;
}

function showHideObject(id)
{
    var object = document.getElementById(id);
    
    var pageSize = getPageSize();

    object.style.display = "block";
	object.style.marginLeft = "0px";
	object.style.marginTop = "0px";

    object.style.position = "absolute"; 
    object.style.left = ((pageSize[0] - object.offsetWidth) / 2) + "px";
    object.style.top = (((pageSize[3] - object.offsetHeight + getScrollPosition()) / 2)) + "px";

    object.style.zIndex = (object.style.display == "block")? 0 : 100;
    object.style.visibility = (object.style.visibility == "visible")? "hidden" : "visible";
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
    window.open(theURL,winName,features);
}

function popup_nieuwjaarsgroet(URL)
{
    day = new Date();
    id = day.getTime();
    eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=1,menubar=0,resizable=0,width=800,height=525,left = 0,top = 0');");
}