<!--
/*
   Function are Copyrighted (c) by Fabpro.nl - Written by M.F. Wieland
   Versie : 1.0
   Datum  : 8-1-2006
*/

    function checkBrowser()
    {

        var agent = navigator.userAgent.toLowerCase();

        var browser = "";

        if( agent.indexOf("opera") != -1 ) browser = "opera";
        if( agent.indexOf("gecko") != -1 ) browser = "gecko";

        if( ( agent.indexOf("msie") != -1 ) && ( agent.indexOf("opera") == -1 ) ) browser = "msie";
        if( agent.indexOf("netscape") != -1 ) browser = "ns";
        if( agent.indexOf("firefox") != -1 ) browser = "ff";

        return browser;
    }

    function imagePopup(url,altname,w,h)
    {
        var left=(document.body.offsetWidth/2)-(w/2);
        var top=((document.body.offsetHeight/2)-(h/2));
        var param="width="+w+", height="+h+",top="+top+",left="+left+",resizable=1, scrollbars=1, toolbar=0, location=0, directories=0, status=0, menubar=0, copyhistory=0";

        var newwin=window.open('','',param);

        newwin.document.write("<html><head><title>Afbeelding..</title>"+
                              "<link rel=\"StyleSheet\" href=\"/wmspub/css/showpage.css\" type=\"text/css\">"+
                              "<style>a { border : 0px; }</style></head><body class=popupbody>");
        newwin.document.write("<table width=100% height=100% border=0 cellspacing=0 cellpadding=0>"+
                              "<tr><td align=center><b>" + altname + "</b></td></tr>"+
                              "<tr><td align=center valign=middle>"+
                              "<a href=javascript:window.close();><img src='/wmspub/scripts/thumb.php?size="+h+"&imgFile="+url+"' border=0>"+
                              "<br>[ sluiten ]</a></td></tr></table></body></html>");

    }

    /*----- MENU FUNCTIES ------*/

    var menuTimer = "";
    var menuTimeOut = 10000;
    var activeMenu = "";

    function hideActiveMenu()
    {
        var obj = document.getElementById(activeMenu);
        if(obj)
        {
            obj.style.visibility='hidden';
        }
    }

    function showMenu(ctrl,menu,marginLeft,marginTop)
    {
        marginLeft = parseInt(marginLeft);
        marginTop = parseInt(marginTop);

        //bepaal bovenkant..
        marginTop+= ctrl.offsetTop;
        tmpCtrl = ctrl.offsetParent;
        while ( tmpCtrl )
        {
            marginTop += tmpCtrl.offsetTop;
            tmpCtrl = tmpCtrl.offsetParent;
        }

        //bepaal linkerkant..
        marginLeft+= ctrl.offsetLeft;
        tmpCtrl = ctrl.offsetParent;
        while ( tmpCtrl )
        {
            marginLeft+= tmpCtrl.offsetLeft;
            tmpCtrl = tmpCtrl.offsetParent;
        }


        //Controleer browser..
        switch( checkBrowser() )
        {
            case "msie" :
                 marginTop+= ctrl.offsetHeight+1;marginLeft+= 1;break;
            case "opera" : marginTop+= ctrl.offsetHeight + 1;marginLeft+= 1;break;
            default : marginTop += ctrl.offsetHeight;break;
        }

        var obj = document.getElementById(menu);
        if(obj)
        {
            hideActiveMenu();
            clearTimeout(menuTimer);
            activeMenu = menu;

            obj.style.left= marginLeft + 'px';
            obj.style.top = marginTop + 'px';

            obj.style.visibility='visible';
            menuTimer = setTimeout("hideActiveMenu()",menuTimeOut);
        }
    }

    function menuStayActive()
    {
        var obj = document.getElementById(activeMenu);
        if(obj)
        {
            obj.style.visibility='visible';
        }
    }

-->