function Swf(swfURL, swfWidth, swfHeight) {			// create an object to hold basic swf parameters
	this.swfURL = swfURL;
	this.swfWidth = swfWidth;
	this.swfHeight = swfHeight;
}

function pageInit() {
	for (var i=0; i<arguments.length; i++) {
		var el = document.getElementById("swf"+i);
		el.innerHTML = renderSWF(arguments[i].swfURL, arguments[i].swfWidth, arguments[i].swfHeight); //write out swf!
	}
}

function renderSWF(swfURL, w, h) {
	var s = "";
	s += "<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0\" width=\"" + w + "\" height=\"" + h + "\" id=\"comm\" align=\"middle\">";
	s += "<param name=\"allowScriptAccess\" value=\"sameDomain\" />";
	s += "<param name=\"movie\" value=\""+swfURL+"\" />";
	s += "<param name=\"menu\" value=\"false\" />";
	s += "<param name=\"quality\" value=\"high\" />";
	s += "<param name=\"bgcolor\" value=\"#ffffff\" />";
    s += "<param name=\"wmode\" value=\"transparent\" />";
	s += "<embed src=\""+swfURL+"\" wmode=\"transparent\" menu=\"false\" quality=\"high\" bgcolor=\"#ffffff\" width=\""+w+"\" height=\""+h+"\" name=\"comm\" align=\"middle\" allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" />";
	s += "</object>";
	return s;
}

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];}}
}

function MM_findObj(n, d) { //v4.0
  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 && document.getElementById) x=document.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 MK_dynamicForm() { //v4.0
  var obj,l,args=MK_dynamicForm.arguments; val=document.MM_returnValue; val=(val==null)?true:val;
  if(val){obj=MM_findObj(args[0]);l=args.length; if(obj){if(l>2){for (i=2; i<(l-1); i+=2)
  {eval("obj."+args[i]+"='"+args[i+1]+"';")}} eval("obj."+args[1]+"();");}}
  document.MM_returnValue = false;
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function openLink(URI){
 win = window.open(URI,"secWin","width=800,height=600,left=10, top=10,menubar=yes, status=yes, toolbar=yes, directories=yes, scrollbars=yes,resizable=yes,location=yes");
 win.focus;
}


function Toggle(item){
   obj=document.getElementById(item);
   visible=(obj.style.display!="none")
   key=document.getElementById("x" + item);
   if (visible) {
     obj.style.display="none";
     key.innerHTML="<img src='images/arrow_blue_right.gif' hspace='0' vspace='0' border='0'>";
   } else {
      obj.style.display="block";
      key.innerHTML="<img src='images/arrow_blue_down.gif' hspace='0' vspace='0' border='0'>";
   }
}

function Toggle2(item, name){
   obj=document.getElementById(item);
   visible=(obj.style.display!="none")
   key=document.getElementById("x" + item);
   if (visible) {
     obj.style.display="none";
     key.innerHTML="<img src='images/arrow_blue_right.gif' id='arrow_"+ name +"' name='arrow_"+ name +"' hspace='0' vspace='0' border='0'>";
   } else {
      obj.style.display="block";
      key.innerHTML="<img src='images/arrow_orange_down.gif' hspace='0' vspace='0' border='0'>";
   }
   key2=document.getElementById("y" + item);
   if (visible) {
      key2.innerHTML= name;
   } else {
      key2.innerHTML="<span class='menu_orange' >"+ name +"</span>";
   }
}


function Expand() {
   divs=document.getElementsByTagName("DIV");
   for (i=0;i<divs.length;i++) {
     divs[i].style.display="block";
     key=document.getElementById("x" + divs[i].id);
     key.innerHTML="<img src='images/arrow_blue_down.gif' hspace='0' vspace='0' border='0'>";
   }
}

function Collapse() {
   divs=document.getElementsByTagName("DIV");
   for (i=0;i<divs.length;i++) {
     divs[i].style.display="none";
     key=document.getElementById("x" + divs[i].id);
     key.innerHTML="<img src='images/arrow_orange_right.gif' hspace='0' vspace='0' border='0'>";
   }
}

function PrintPage(url) {
    if (url!='printpage.asp?page=') {


        var sDefaultFeatures = "menubar=yes,status=yes,toolbar=yes,directories=yes,scrollbars=yes,resizable=no,location=yes";
        var bAutoCenter = true;
        var xPosition = 10;
        var yPosition = 10;
        var xWindowPos;
    	var yWindowPos;
        var cxWidth = 470;
        var cyHeight = 600;

    	if (bAutoCenter)
    		{
    		var xScreenCenter = Math.floor(screen.availWidth / 2);
    		var yScreenCenter = Math.floor(screen.availHeight / 2);
    		xWindowPos = xScreenCenter - Math.floor(cxWidth / 2);
    		yWindowPos = yScreenCenter - Math.floor(cyHeight / 2);
    		sFeatures = sDefaultFeatures + ",left=" + xWindowPos.toString() + ",top=" + yWindowPos.toString() + ",width=" + cxWidth.toString() + ",height=" + cyHeight.toString();
    		}
    	else
    		{
    		xWindowPos = xPosition;
    		yWindowPos = yPosition;
    		sFeatures = sDefaultFeatures + ",left=" + xWindowPos.toString() + ",top=" + yWindowPos.toString() + ",width=" + cxWidth.toString() + ",height=" + cyHeight.toString();
    		}


	    win = window.open(url,"secWin",sFeatures);
 	    win.focus;
    }else{
 	    alert('U kunt deze pagina niet printen');
    }
}

function GetPrintableContent()
{
	return document.getElementById('PrintDiv').innerHTML;
}

function OpenService(url) {

    var sDefaultFeatures = "menubar=no,status=yes,toolbar=no,directories=no,scrollbars=yes,resizable=yes,location=no";
    var bAutoCenter = true;
    var xPosition = 10;
    var yPosition = 10;
    var xWindowPos;
	var yWindowPos;
    var cxWidth = 500;
    var cyHeight = 550;

	if (bAutoCenter)
		{
		var xScreenCenter = Math.floor(screen.availWidth / 2);
		var yScreenCenter = Math.floor(screen.availHeight / 2);
		xWindowPos = xScreenCenter - Math.floor(cxWidth / 2);
		yWindowPos = yScreenCenter - Math.floor(cyHeight / 2);
		sFeatures = sDefaultFeatures + ",left=" + xWindowPos.toString() + ",top=" + yWindowPos.toString() + ",width=" + cxWidth.toString() + ",height=" + cyHeight.toString();
		}
	else
		{
		xWindowPos = xPosition;
		yWindowPos = yPosition;
		sFeatures = sDefaultFeatures + ",left=" + xWindowPos.toString() + ",top=" + yWindowPos.toString() + ",width=" + cxWidth.toString() + ",height=" + cyHeight.toString();
		}


	    popper = window.open(url,"thirdWin",sFeatures);
 	    popper.focus;
}

function OpenCalculation() {

    var sDefaultFeatures = "menubar=no,status=no,toolbar=no,directories=no,scrollbars=no,resizable=no,location=no";
    var bAutoCenter = true;
    var xPosition = 10;
    var yPosition = 10;
    var xWindowPos;
	var yWindowPos;
    var cxWidth = 499;
    var cyHeight = 600;

	if (bAutoCenter)
		{
		var xScreenCenter = Math.floor(screen.availWidth / 2);
		var yScreenCenter = Math.floor(screen.availHeight / 2);
		xWindowPos = xScreenCenter - Math.floor(cxWidth / 2);
		yWindowPos = yScreenCenter - Math.floor(cyHeight / 2);
		sFeatures = sDefaultFeatures + ",left=" + xWindowPos.toString() + ",top=" + yWindowPos.toString() + ",width=" + cxWidth.toString() + ",height=" + cyHeight.toString();
		}
	else
		{
		xWindowPos = xPosition;
		yWindowPos = yPosition;
		sFeatures = sDefaultFeatures + ",left=" + xWindowPos.toString() + ",top=" + yWindowPos.toString() + ",width=" + cxWidth.toString() + ",height=" + cyHeight.toString();
		}


	    calc = window.open("calculatie.asp?calc=1","fourthWin",sFeatures);
 	    calc.focus;
}

var newwindow = '';

function FAQPage(id) {

    var sDefaultFeatures = "menubar=no,status=no,toolbar=no,directories=no,scrollbars=yes,resizable=yes,location=no";
    var bAutoCenter = true;
    var xPosition = 10;
    var yPosition = 10;
    var xWindowPos;
	var yWindowPos;
    var cxWidth = 460;
    var cyHeight = 310;

	if (bAutoCenter)
		{
		var xScreenCenter = Math.floor(screen.availWidth / 2);
		var yScreenCenter = Math.floor(screen.availHeight / 2);
		xWindowPos = xScreenCenter - Math.floor(cxWidth / 2);
		yWindowPos = yScreenCenter - Math.floor(cyHeight / 2);
		sFeatures = sDefaultFeatures + ",left=" + xWindowPos.toString() + ",top=" + yWindowPos.toString() + ",width=" + cxWidth.toString() + ",height=" + cyHeight.toString();
		}
	else
		{
		xWindowPos = xPosition;
		yWindowPos = yPosition;
		sFeatures = sDefaultFeatures + ",left=" + xWindowPos.toString() + ",top=" + yWindowPos.toString() + ",width=" + cxWidth.toString() + ",height=" + cyHeight.toString();
		}

	//win = window.open("veelgesteldevragen_popup.asp?id="+id,"secWin","width=450,height=300,left=10, top=10,menubar=no, status=yes, toolbar=no, directories=no, scrollbars=no,resizable=no,location=no");
    //win.focus;
    url = "veelgesteldevragen_popup.asp?FaqId="+id

    if (!newwindow.closed && newwindow.location)
	{
		newwindow.location.href = url;
	}
	else
	{
		newwindow=window.open(url,"secWin",sFeatures);
		if (!newwindow.opener) newwindow.opener = self;
	}
	if (window.focus) {newwindow.focus()}
	return false;


}

function selectAll(sender)
{
	var form = sender.form 
	for (var i=0;i<form.length;i++)
	{
		fldObj = form.elements[i];
		if (fldObj.type=='checkbox')
		{
			fldObj.checked = sender.checked;
	   }
	}
}
function GenericPopupPage(id,url) {

    var sDefaultFeatures = "menubar=no,status=yes,toolbar=no,directories=no,scrollbars=yes,resizable=yes,location=no";
    var bAutoCenter = true;
    var xPosition = 10;
    var yPosition = 10;
    var xWindowPos;
	var yWindowPos;
    var cxWidth = 500;
    var cyHeight = 550;

	if (bAutoCenter)
		{
		var xScreenCenter = Math.floor(screen.availWidth / 2);
		var yScreenCenter = Math.floor(screen.availHeight / 2);
		xWindowPos = xScreenCenter - Math.floor(cxWidth / 2);
		yWindowPos = yScreenCenter - Math.floor(cyHeight / 2);
		sFeatures = sDefaultFeatures + ",left=" + xWindowPos.toString() + ",top=" + yWindowPos.toString() + ",width=" + cxWidth.toString() + ",height=" + cyHeight.toString();
		}
	else
		{
		xWindowPos = xPosition;
		yWindowPos = yPosition;
		sFeatures = sDefaultFeatures + ",left=" + xWindowPos.toString() + ",top=" + yWindowPos.toString() + ",width=" + cxWidth.toString() + ",height=" + cyHeight.toString();
		}

	//win = window.open("veelgesteldevragen_popup.asp?id="+id,"secWin","width=450,height=300,left=10, top=10,menubar=no, status=yes, toolbar=no, directories=no, scrollbars=no,resizable=no,location=no");
    //win.focus;
    url = url + "_popup.asp?param="+id

    if (!newwindow.closed && newwindow.location)
	{
		newwindow.location.href = url;
	}
	else
	{
		newwindow=window.open(url,"secWin",sFeatures);
		if (!newwindow.opener) newwindow.opener = self;
	}
	if (window.focus) {newwindow.focus()}
	return false;
}

function GenericContentPage(url) {

    var sDefaultFeatures = "menubar=no,status=yes,toolbar=no,directories=no,scrollbars=yes,resizable=yes,location=no";
    var bAutoCenter = true;
    var xPosition = 10;
    var yPosition = 10;
    var xWindowPos;
	var yWindowPos;
    var cxWidth = 470;
    var cyHeight = 465;

	if (bAutoCenter)
		{
		var xScreenCenter = Math.floor(screen.availWidth / 2);
		var yScreenCenter = Math.floor(screen.availHeight / 2);
		xWindowPos = xScreenCenter - Math.floor(cxWidth / 2);
		yWindowPos = yScreenCenter - Math.floor(cyHeight / 2);
		sFeatures = sDefaultFeatures + ",left=" + xWindowPos.toString() + ",top=" + yWindowPos.toString() + ",width=" + cxWidth.toString() + ",height=" + cyHeight.toString();
		}
	else
		{
		xWindowPos = xPosition;
		yWindowPos = yPosition;
		sFeatures = sDefaultFeatures + ",left=" + xWindowPos.toString() + ",top=" + yWindowPos.toString() + ",width=" + cxWidth.toString() + ",height=" + cyHeight.toString();
		}


	    popper = window.open(url,"thirdWin",sFeatures);
 	    popper.focus;
}
