// JavaScript Document
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
    init();
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}


function EmbedFlash(txtFlash,txtWidth,txtHeight)
{
	document.write('<object classid="CLSID:D27CDB6E-AE6D-11cf-96B8-444553540000" width="' + txtWidth + '" height="' + txtHeight + '">');
	document.write('<param name="movie" value="'+txtFlash+'"></param>');
	document.write('<param name="wmode" value="transparent"></param>');
	document.write('<embed src="' + txtFlash + '" type="application/x-shockwave-flash" wmode="transparent" width="' + txtWidth + '" height="' + txtHeight + '">');
	document.write('</embed>');
	document.write('</object>');
}

function checkform()
{
	if (document.formcontact.onderwerp.value=='')
	{
		if (document.formcontact.text.value=='')
		{
			if (document.formcontact.email.value=='')
			{
				alert("Lege e-mail verzenden heeft geen zin.")
				return false;
			}
		}
	}
	if (document.formcontact.email.value=='')	
	{
		var answer=confirm('E-mailadres niet ingevuld. Toch verzenden?')
		if (answer)
		{
			return true;
		}
		else
		{
			return false;
		}
	}

	// If the script gets this far through all of your fields
	// without problems, it's ok and you can submit the form

	return true;
}
function setCookie(naam, waarde, dagen){
	verval="";
	if(dagen){
		var vandaag = new Date();
		var vervaldatum = new Date(vandaag.getTime()+dagen*24*60*60*1000);
		verval=vervalDatum.toUTCString();
	}
 document.cookie = naam + "=" + waarde + ";expires=" + verval;
}
function getCookie(naam){

	var zoek = naam + "=";
	if (document.cookie.length>0){
		var begin = document.cookie.indexOf(zoek);
		if (begin!=-1){
				begin += zoek.length;
			var einde = document.cookie.indexOf(";", begin);
			if (einde==-1){
					einde = document.cookie.length;
				}
			return document.cookie.substring(begin, einde);
		}
	}
}
function nootuit(y) {
		var o=document.getElementById("Memo"); 
		if(o){ 
			document.getElementById("Memo").style.visibility='hidden';
			document.getElementById("Close").style.visibility='hidden';
			zijbalkaan();
			document.cookie="pvdamemouit=ja";
		} 
}
function zijbalkaan(y) {
		var o=document.getElementById("zijmemo"); 
		if(o){ 
			document.getElementById("zijmemo").style.visibility='visible';
		}
}
function zijbalkuit(y) {
		document.getElementById("zijmemo").style.visibility='hidden';
}
function init(){
	if (getCookie("pvdamemouit")){
		nootuit();
		zijbalkaan();	
	}
	else
	{
		zijbalkuit();
	}
}
function stemreden(y) {
		nootuit();
		window.location="campagne.html";
}
function pop_window(url) {
			var popit = window.open(url,'console','width=800,height=413');
			popit.focus();
		}
