
/* nieuwsbrief Dhtml popup
ST IO, 20090819 */
	
<!--
		var objref;
		
		var autohidebox=["yes", 60];
		var showonscroll="no";
		var IEfadelength=1;
		var Mozfadedegree=0.05;

		var isIE=document.all;
		var isNN=!document.all&&document.getElementById;
		var isN4=document.layers;
		var isHot=false;
		var docheight;
		var objheight;
		var showonscrollvar;
		var mozfadevar;
		var iebody;
		var bgframe;
		var diff_y;
		var diff_x;
		
		function getCookie(c_name)
		{
			if (document.cookie.length>0)
			{
				c_start=document.cookie.indexOf(c_name + "=");
				if (c_start!=-1)
				{ 
					c_start=c_start + c_name.length+1; 
					c_end=document.cookie.indexOf(";",c_start);
					if (c_end==-1) c_end=document.cookie.length;
					return unescape(document.cookie.substring(c_start,c_end));
				} 
			}
		return "";
		}

		function setCookie(c_name,value,expiredays)
		{
			var exdate=new Date();
			exdate.setDate(exdate.getDate()+expiredays);
			document.cookie=c_name+ "=" +escape(value)+
			((expiredays==null) ? "" : ";expires="+exdate.toGMTString());
		}

		function checkCookie()
		{
			survey=getCookie('nieuwsbrief-st-200901');
			if (survey!=1)
			{
				setCookie('nieuwsbrief-st-200901',1,20);
				setTimeout("displayfadeinbox()", 0*1000);
			}
		}
		
		function displayfadeinbox()
		{
			var ie= isIE;
			var dom=document.getElementById;
			
			iebody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body;
			objref=(dom)? document.getElementById("fadeinbox") : document.all.fadeinbox;
			bgframe=(dom)? document.getElementById("socratos_bgf") : document.all.socratos_bgf;

			var scroll_top=(ie)? iebody.scrollTop : window.pageYOffset;
			var docwidth=(ie)? iebody.clientWidth : window.innerWidth;
			docheight=(ie)? iebody.clientHeight: window.innerHeight;
			var objwidth=objref.offsetWidth;
			objheight=objref.offsetHeight;
	
			objref.style.left = docwidth / 2 - objwidth / 2 + "px";
			objref.style.top = scroll_top + docheight / 2 - objheight / 2 + "px";
			bgframe.style.left = docwidth / 2 - objwidth / 2 + "px";
			bgframe.style.top = scroll_top + docheight / 2 - objheight / 2 + "px";
			
			node = document.getElementById('fadeinbox');
			var offset_x = findPosX(node);
			var offset_y = findPosY(node);
			
			var diff_x = offset_x - (docwidth / 2 - objwidth / 2) +10;
			diff_y = offset_y - (scroll_top + docheight / 2 - objheight / 2);
			
			objref.style.left = -1*diff_x + docwidth / 2 - objwidth / 2 + "px";
			objref.style.top = -1*diff_y + scroll_top + docheight / 2 - objheight / 2 + "px";
			bgframe.style.left = -1*diff_x+ docwidth / 2 - objwidth / 2 + "px";
			bgframe.style.top = -1*diff_y + scroll_top + docheight / 2 - objheight / 2 + "px";
			
			if (showonscroll=="yes") showonscrollvar=setInterval("staticfadebox()", 50);
			
			if (objref.filters)
			{
				objref.filters[0].duration=IEfadelength;
				objref.filters[0].Apply();
				objref.filters[0].Play();
			}
			
			if(bgframe.filters)
			{
				bgframe.filters[0].duration=IEfadelength;
				bgframe.filters[0].Apply();
				bgframe.filters[0].Play();
			}

			bgframe.style.zIndex = 750;	
			bgframe.style.visibility="visible";	
			objref.style.visibility="visible";
			
			if (objref.style.MozOpacity) mozfadevar=setInterval("mozfadefx()", 90);
			else controlledhidebox();
			
		}
		
		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 mozfadefx()
		{
			if (parseFloat(objref.style.MozOpacity)<1)
			{
				objref.style.MozOpacity=parseFloat(objref.style.MozOpacity)+Mozfadedegree;

				
			}
			else
			{
				clearInterval(mozfadevar);
				controlledhidebox();
			}
		}
		
		function staticfadebox()
		{
			var ie=document.all && !window.opera;
			var scroll_top=(ie)? iebody.scrollTop : window.pageYOffset;
	
			objref.style.top = -1*diff_y + scroll_top + docheight / 2 - objheight / 2 + "px";
			bgframe.style.top = -1*diff_y + scroll_top + docheight / 2 - objheight / 2 + "px";
		}

		function hidefadebox()
		{
			bgframe.style.display = "none";
			bgframe.style.visibility = "hidden";
			objref.style.visibility="hidden";
			if (typeof showonscrollvar!="undefined");
			clearInterval(showonscrollvar);
		}
		
		function controlledhidebox(mode)
		{
			if (autohidebox[0]=="yes")
			{
				if(mode == 'simple')
				{
					setTimeout("hidefadebox()", autohidebox[1]*1000);
				}
				else
				{
					var delayvar=(objref.filters) ? (autohidebox[1]+objref.filters[0].duration)*1000 : autohidebox[1]*1000;
					setTimeout("hidefadebox()", delayvar);
				}
			}
		}
  
		function displaysimple()
		{
			var ie= isIE;
			var dom=document.getElementById;

			iebody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body;
			objref=(dom)? document.getElementById("fadeinbox") : document.all.fadeinbox;
			
			var scroll_top=(ie)? iebody.scrollTop : window.pageYOffset;
			var docwidth=(ie)? iebody.clientWidth : window.innerWidth;
			docheight=(ie)? iebody.clientHeight: window.innerHeight;
			var objwidth=objref.offsetWidth;
			objheight=objref.offsetHeight;
	
			objref.style.left=0 + "px";
			objref.style.top=scroll_top+docheight-objheight -1 +"px";
		
	
			if (showonscroll=="yes") showonscrollvar=setInterval("staticfadebox()", 50);

			objref.style.visibility="visible";
			if (objref.style.MozOpacity)
			{
				objref.style.MozOpacity=1;
				controlledhidebox();
			}
			else
			{
				controlledhidebox();
			}
		}
  
		function displayopera()
		{
			var ie = isIE;
			var dom=document.getElementById;
		
			objref=(dom)? document.getElementById("fadeinbox") : document.all.fadeinbox;
			
			objref.style.left=0 + "px";
			objref.style.top= screen.availWidth - objref.height - 1 +"px";

			objref.style.visibility = "visible";
		}
		
		function displaynetscape()
		{
			objref = document.fadeinbox;
			
			objref.style.left=0 + "px";
			objref.style.top= screen.availWidth - objref.height - 1 +"px";
			
			objref.visibility = "visible";
		}
  
		function initfunction()
		{
			setTimeout("displayfadeinbox()", 0*1000);
		}

		if (window.addEventListener) window.addEventListener("load", checkCookie, false);
		else if (window.attachEvent) window.attachEvent("onload", checkCookie);
		else if (document.getElementById) window.onload=checkCookie;

		document.write('<style type="text/css">');
		document.write('#fadeinbox{');
		document.write('width: 499px;');
		document.write('height: 362px;');
		document.write('position:absolute;');
		document.write('left: 0;');
		document.write('top: -2000px;');
		document.write('padding: 0px;');
		document.write('z-index: 1000;');
		document.write('visibility:hidden;');
		document.write('font-family: verdana;');
		document.write('}');
		document.write('');
		document.write('</style>');
		document.write('<iframe src="about:blank" id="socratos_bgf" scrolling="no" frameborder="0" style="color: transparent; filter:progid:DXImageTransform.Microsoft.RandomDissolve(duration=1); filter: alpha(opacity=0); -moz-opacity:0; background-color: transparant; position:absolute; top:0px; left:0px; width:400px; height:300px; visibility: hidden;"></iframe>');
		//document.write('<iframe ALLOWTRANSPARENCY="true" src="javascript:false;" id="socratos_bgf" scrolling="no" frameborder="0" style="color: transparent; filter:progid:DXImageTransform.Microsoft.RandomDissolve(duration=1); -moz-opacity:0; background-color: transparant; position:absolute; top:0px; left:0px; width:499px; height:362px; visibility: hidden;"></iframe>');
		document.write('<DIV id="fadeinbox" style="filter:progid:DXImageTransform.Microsoft.RandomDissolve(duration=1) ; -moz-opacity:0; width:499px; height:362px;">');
		document.write('<table border=0 align=center width="500" style="width:499px; height:362px;" cellspacing=0 cellpadding=0>');
		document.write('<tr><td>');
		document.write('						<img src="/images/popupSTnieuwsbrief.gif" usemap="#map1" border="0" width="499" height="362" /><map name="map1"><area shape="rect" coords="28,272,169,300" href="http://kaap.crmservice.eu/st/aanmelding.aspx" title="Aanmelden" target="_blank"><area shape="rect" coords="272,270,463,301" href="javascript:hidefadebox();" title="Nee bedankt"></map>						');
		document.write('</td></tr>');		
		document.write('</table>');
		document.write('</DIV>');
//-->