
    function popUp(URL) {
        day = new Date();
        id = day.getTime();
        eval("page" + id + " = window.open(URL, '" + id + "','toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=800,height=600');");
    }

    function activateActiveX() {
        var activeXObjTypes = new Array("applet","embed","object");
        for (var i=0; i<activeXObjTypes.length; i++ ) {
            var xObj = document.getElementsByTagName(activeXObjTypes[i]);
            for(var j=0; j<xObj.length; j++ ) {
                xObj[j].outerHTML = xObj[j].outerHTML;
            }   
        } 
    }

    Function.prototype.andThen = function(g) {
        var f = this;
        if (typeof(g) != 'function') {
            return this;
        }
        return function() {f();g();}
    }

    var nSlide = 0;
    var aSlides = new Array();
    var tScrollTimeOut = '';
    var tProgressTimeOut = '';
    var sBrowser = navigator.userAgent;
    var bIE = sBrowser.search('MSIE');
    var bChrome = sBrowser.search('Chrome');
    var bFirefox = sBrowser.search('Firefox');
    function fInitCufon() {
        Cufon.replace('h1', { fontFamily: 'Frutiger Bold' });
        Cufon.replace('h2', { fontFamily: 'Frutiger Roman' });
    }
    function fInit() {
        var oWrapperDiv = document.getElementById('oWrapperDiv');
        nWidth = oWrapperDiv.offsetWidth;
        nHeight = oWrapperDiv.offsetHeight;
        nSlideMax = aSlides.length - 1;
        fSlideHTML(aSlides[nSlide],'oContainerDiv');
        fInitSpeed();
        fInitSlide();
        fInitProgress();
        fProgressTimeOut();
    }
    function fInitSpeed() {
        nScrollTimeOut = 20;
        nScrollMinus = 60;
        nProgressTimeOut = 25;
        nProgressMinus = 5;
        if (bFirefox > 0 || bChrome > 0) {
            nScrollTimeOut = 20;
            nScrollMinus = 60;
            nProgressTimeOut = 40;
            nProgressMinus = 5;
        }
    }
    function fSlideHTML(oName,oDiv) {
        window.status = oName + ' ' + oDiv;
        var oDiv = document.getElementById(oDiv);
        oSlideDiv = document.getElementById(oName);
        sHTML = oSlideDiv.innerHTML;
        oDiv.innerHTML = sHTML;
        fInitCufon();
    }
    function fInitProgress() {
        oWidth = nWidth;
        var oProgressDiv = document.getElementById('oProgressDiv'); 
        oProgressDiv.width = oWidth;
        oProgressDiv.style.display = 'none';
    }    
    function fInitSlide() {
        nSlide = nSlide + 1;
        if(nSlide > nSlideMax || nSlide < 0) { nSlide = 0 };
        fInitSpeed();
        var oScrollDiv = document.getElementById('oScrollDiv'); 
        if(bDirection == 'Left-Right') {
            oMinus = nWidth;
            oScrollDiv.style.top = '0px';
            oScrollDiv.style.left = oMinus;
        }
        if(bDirection == 'Bottom-Up') {
            oMinus = nHeight;
            oScrollDiv.style.top = oMinus;
            oScrollDiv.style.left = '0px';
        }
        oScrollDiv.style.display = 'none';
        fSlideHTML(aSlides[nSlide],'oScrollDiv');
    }
    function fProgress() {
        var oProgressDiv  = document.getElementById('oProgressDiv'); 
        oProgressDiv.style.display = 'block';
        if(oWidth < nProgressMinus) {
            clearTimeout(tProgressTimeOut);
            fInitProgress();
            fScrollTimeOut();
        } else {
            oWidth = oWidth - nProgressMinus;
            oProgressDiv.style.width = oWidth + 'px';
        }
    }
    function fProgressTimeOut() {
        tProgressTimeOut = setTimeout("fProgressTimeOut()",nProgressTimeOut);
        fProgress();
    }
    function fScroll() {
        var oScrollDiv = document.getElementById('oScrollDiv');
        oScrollDiv.style.display = 'block';
        if(oMinus < nScrollMinus) {
            nScrollMinus = 2;
        }
        if(oMinus < nScrollMinus) {
            fSlideHTML(aSlides[nSlide],'oContainerDiv');
            clearTimeout(tScrollTimeOut);
            fInitSlide();
            fProgressTimeOut();
        } else {
            oMinus = oMinus - nScrollMinus;
            if(bDirection == 'Left-Right') {
                oScrollDiv.style.left = oMinus + 'px';
            }
            if(bDirection == 'Bottom-Up') {
                oScrollDiv.style.top = oMinus + 'px';
            }
        }
    }
    function fScrollTimeOut() {
        tScrollTimeOut = setTimeout("fScrollTimeOut()",nScrollTimeOut);
        fScroll();
    }
    function tSlide(oName) {
        var oSlideDiv = document.getElementById(oName);
        if(oSlideDiv == null) { return false };
        if(oSlideDiv.name == nSlide) { return false };
        nSlide = oSlideDiv.name - 2;
        clearTimeout(tProgressTimeOut);
        clearTimeout(tScrollTimeOut);
        fInitSlide();
        fInitProgress();
        fScrollTimeOut();
    }
    function tMouseOver() {
        clearTimeout(tProgressTimeOut);
    }
    function tMouseOut() {
        fProgressTimeOut();
    }

    var sOverBorder = '1px solid #990000';
    var sOverBG = 'http://www.rightclick.nl/files/rc5-2010/BG-line-990000.gif';
    var sOutBorder = '1px solid #999999';
    var sOutBG = 'http://www.rightclick.nl/files/rc5-2010/BG-line.gif';
    function eOver(oId) {
        oLabel = document.getElementById(oId+'-label');
        oContent = document.getElementById(oId+'-content');
        if(oLabel == null || oContent == null) { return false};
        oLabel.style.backgroundImage = 'url(' + sOverBG + ')';
        oLabel.style.borderRight = sOverBorder;
        oContent.style.border = sOverBorder;
        document.body.style.cursor = 'hand';
    }
    function eOut(oId) {
        oLabel = document.getElementById(oId+'-label');
        oContent = document.getElementById(oId+'-content');
        if(oLabel == null || oContent == null) { return false};
        oLabel.style.backgroundImage = 'url(' + sOutBG + ')';
        oLabel.style.borderRight = sOutBorder;
        oContent.style.border = sOutBorder;
        document.body.style.cursor = 'default';
    }
    function eClick(oURL) {
        location.href = oURL;
    }
    function eBorder(oId,oSwitch) {
        var oIdTag = document.getElementById(oId+'logo');
        if(oIdTag == null) { return false };
        if(oSwitch == true) {
            oIdTag.style.border = sOverBorder;
        }
        if(oSwitch == false) {
            oIdTag.style.border = sOutBorder;
        }
    }
