<!--
/*
   Copyright (c) M.F. Wieland
   Ver   : 1.0
   Date  : 2004-2011
*/

    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;
    }

	
	//Cookie functions
	function writeCookie(name,value,expiredays) {
	
		var today = new Date();
		var expire = new Date();
		expire.setTime(today.getTime() + 3600000*24*expiredays); // day
		document.cookie = name+"="+value+";expires="+expire.toGMTString();
		
	}
	
	function readCookie(name) {
		var nameEQ = name + "=";
		var ca = document.cookie.split(';');
		for(var i=0;i < ca.length;i++) {
		
			var c = ca[i];
			while (c.charAt(0)==' ') c = c.substring(1,c.length);
			if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
		}
		return null;
	}	
	
    function showFlash( flashurl,w,h )
    {
          document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="750" height="100" align="middle">');
          document.write('<param name="allowScriptAccess" value="sameDomain" />');
          document.write('<param name="movie" value="'+ flashurl +'" />');
          document.write('<param name="quality" value="high" /><param name="bgcolor" value="#ffffff" />');
          document.write('<embed src="'+ flashurl +'" quality="high" bgcolor="#ffffff" width="'+ w +'" height="'+ h +'" name="foo" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
          document.write('</object>');
    }

    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 = 3500;
	var activeMenu = "";

	function findPosX(obj)
	{
	  var curleft = 0;
	  if (obj.offsetParent)
	  {
		while (obj.offsetParent)
		{
		  curleft += obj.offsetLeft
		  obj = obj.offsetParent;
		}
	  }
	  else if (obj.x)
		curleft += obj.x;
	  return curleft;
	}

	function findPosY(obj)
	{
	  var curtop = 0;
	  if (obj.offsetParent)
	  {
		while (obj.offsetParent)
		{
		  curtop += obj.offsetTop;
		  obj = obj.offsetParent;
		}
	  }
	  else if (obj.y)
		curtop += obj.y;
	  return curtop;
	}



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

	function showMenu(ctrl,menu,marginLeft,marginTop)
	{
	  var obj = document.getElementById(menu);
	  if(obj)
	  {
		  hideActiveMenu();
		  clearTimeout(menuTimer);
		  activeMenu = menu;

		  obj.style.left=findPosX(ctrl) + marginLeft + 'px';
		  obj.style.top=findPosY(ctrl) + marginTop + 'px';
		  obj.style.visibility='visible';

		  menuTimer = setTimeout("hideActiveMenu()",menuTimeOut);
	  }
	}

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

-->
