function P7_TMenu(b,og) { //v2.5 by Project Seven Development(PVII)
 var i,s,c,k,j,tN,hh;if(document.getElementById){
 //add toggle tweak
 if(!og){P7_TMfull(b);}
 //end tweak
 if(b.parentNode && b.parentNode.childNodes){tN=b.parentNode.childNodes;}else{return;}
 for(i=0;i<tN.length;i++){if(tN[i].tagName=="DIV"){s=tN[i].style.display;
 hh=(s=="block")?"none":"block";if(og==1){hh="block";}tN[i].style.display=hh;}}
 c=b.firstChild;if(c.data){k=c.data;j=k.charAt(0);if(j=='+'){k='-'+k.substring(1,k.length);
 }else if(j=='-'){k='+'+k.substring(1,k.length);}c.data=k;}if(b.className=='p7plusmark'){
 b.className='p7minusmark';}else if(b.className=='p7minusmark'){b.className='p7plusmark';}}
}

function P7_setTMenu(){ //v2.5 by Project Seven Development(PVII)
 var i,d='',h='<style type=\"text/css\">';if(document.getElementById){
 var tA=navigator.userAgent.toLowerCase();if(window.opera){
 if(tA.indexOf("opera 5")>-1 || tA.indexOf("opera 6")>-1){return;}}
 for(i=1;i<20;i++){d+='div ';h+="\n#p7TMnav div "+d+"{display:none;}";}
 document.write(h+"\n</style>");}
}
P7_setTMenu();

function P7_TMopen(){ //v2.5 by Project Seven Development(PVII)
 var i,x,d,hr,ha,ef,a,ag;if(document.getElementById){d=document.getElementById('p7TMnav');
 if(d){hr=window.location.href;ha=d.getElementsByTagName("A");if(ha&&ha.length){
 for(i=0;i<ha.length;i++){if(ha[i].href){if(hr.indexOf(ha[i].href)>-1){
 ha[i].className="p7currentmark";a=ha[i].parentNode.parentNode;while(a){
 if(a.firstChild && a.firstChild.tagName=="A"){if(a.firstChild.onclick){
 ag=a.firstChild.onclick.toString();if(ag&&ag.indexOf("P7_TMenu")>-1){
 P7_TMenu(a.firstChild,1);}}}a=a.parentNode;}}}}}}}
}

function P7_TMall(a){ //v2.5 by Project Seven Development(PVII)
 var i,x,ha,s,tN;if(document.getElementById){ha=document.getElementsByTagName("A");
 for(i=0;i<ha.length;i++){if(ha[i].onclick){ag=ha[i].onclick.toString();
 if(ag&&ag.indexOf("P7_TMenu")>-1){if(ha[i].parentNode && ha[i].parentNode.childNodes){
 tN=ha[i].parentNode.childNodes;}else{break;}for(x=0;x<tN.length;x++){
 if(tN[x].tagName=="DIV"){s=tN[x].style.display;if(a==0&&s!='block'){P7_TMenu(ha[i]);
 }else if(a==1&&s=='block'){P7_TMenu(ha[i]);}break;}}}}}}
}

function P7_TMclass(){ //v2.5 by Project Seven Development(PVII)
 var i,x,d,tN,ag;if(document.getElementById){d=document.getElementById('p7TMnav');
 if(d){tN=d.getElementsByTagName("A");if(tN&&tN.length){for(i=0;i<tN.length;i++){
 ag=(tN[i].onclick)?tN[i].onclick.toString():false;if(ag&&ag.indexOf("P7_TMenu")>-1){
 tN[i].className='p7plusmark';}else{tN[i].className='p7defmark';}}}}}
}

//New full toggle function add-on for TMM
//ver 1.2 fixes an issue in Mac IE5.x
//Ver 1.3 fixes currentmark toggle on root non-trigger links
//Ver 1.4 fixes a recursion issue
function P7_TMfull(tL){ //v1.4 by Project Seven Development(PVII)
 var i,x,pp,pa,d,ha,s,tN,tA,c,k,j,pd,pc,m;
 var tD=new Array(),tAA=new Array();
 if(tL&&tL.parentNode){pp=tL.parentNode;while(pp){
 if(pp.tagName&&pp.tagName=="DIV"){if(pp.id &&pp.id=="p7TMnav"){
 break;}tD[tD.length]=pp;}pp=pp.parentNode;}}
 d=document.getElementById("p7TMnav");tA=d.getElementsByTagName("A");
 for(i=0;i<tA.length;i++){m=true;if(tA[i].onclick){
 ag=tA[i].onclick.toString();if(ag&&ag.indexOf("P7_TMenu")>-1){
 if(tA[i].parentNode && tA[i].parentNode.childNodes){
 for(x=0;x<tD.length;x++){if(tA[i].parentNode==tD[x]){
 m=false;break;}}if(m){tAA[tAA.length]=tA[i];}}}else{
 if(tA[i].className=="p7currentmark"&&tA[i]!=tL){tA[i].className="";}}}}
 for(i=0;i<tAA.length;i++){if(tAA[i].onclick){
 ag=tAA[i].onclick.toString();if(ag&&ag.indexOf("P7_TMenu")>-1){
 if(tAA[i].parentNode && tAA[i].parentNode.childNodes){
 tN=tAA[i].parentNode.childNodes;for(x=0;x<tN.length;x++){
 if(tN[x].tagName=="DIV"){s=tN[x].style.display;if(s=='block'){
 P7_TMenu(tAA[i],5);}}}}}}}
}

function P7_Uberlink(cl,d){
	var i,ob,tA,h=document.location.href;
	if(document.getElementById){
	ob=(d)?document.getElementById(d):document;
	if(ob){
	tA=ob.getElementsByTagName('A');
	for(i=0;i<tA.length;i++){
	if(tA[i].href==h){
	tA[i].className=cl;
}}}}}

/* 
  ------------------------------------------------
  PVII Equal CSS Columns scripts -Version 2
  Copyright (c) 2005 Project Seven Development
  www.projectseven.com
  Version: 2.1.0
  ------------------------------------------------
*/
function P7_colH2(){ //v2.1.0 by PVII-www.projectseven.com
 var i,oh,h=0,tg,el,np,dA=document.p7eqc,an=document.p7eqa;if(dA&&dA.length){
 for(i=1;i<dA.length;i+=2){dA[i+1].style.paddingBottom='';}for(i=1;i<dA.length;i+=2){
 oh=dA[i].offsetHeight;h=(oh>h)?oh:h;}for(i=1;i<dA.length;i+=2){oh=dA[i].offsetHeight;
 if(oh<h){np=h-oh;if(!an&&dA[0]==1){P7_eqA2(dA[i+1].id,0,np);}else{
 dA[i+1].style.paddingBottom=np+"px";}}}document.p7eqa=1;
 document.p7eqth=document.body.offsetHeight;
 document.p7eqtw=document.body.offsetWidth;}
}
function P7_eqT2(){ //v2.1.0 by PVII-www.projectseven.com
 if(document.p7eqth!=document.body.offsetHeight||document.p7eqtw!=document.body.offsetWidth){P7_colH2();}
}
function P7_equalCols2(){ //v2.1.0 by PVII-www.projectseven.com
 var c,e,el;if(document.getElementById){document.p7eqc=new Array();
 document.p7eqc[0]=arguments[0];for(i=1;i<arguments.length;i+=2){el=null;
 c=document.getElementById(arguments[i]);if(c){e=c.getElementsByTagName(arguments[i+1]);
 if(e){el=e[e.length-1];if(!el.id){el.id="p7eq"+i;}}}if(c&&el){
 document.p7eqc[document.p7eqc.length]=c;document.p7eqc[document.p7eqc.length]=el}}
 setInterval("P7_eqT2()",10);}
}
function P7_eqA2(el,p,pt){ //v2.1.0 by PVII-www.projectseven.com
 var sp=10,inc=20,g=document.getElementById(el);np=(p>=pt)?pt:p;
 g.style.paddingBottom=np+"px";if(np<pt){np+=inc;
 setTimeout("P7_eqA2('"+el+"',"+np+","+pt+")",sp);}
}

function popImage(imageURL,imageTitle,pos,AutoClose,CopyRight){
//Safari workaround
if (navigator.userAgent.toLowerCase().indexOf("safari")!=-1){
var f="top=0, left=0, width="+screen.width+",height="+screen.height+" ,scrollbars=yes";
imgWin=window.open(imageURL,'im',f);
}
else{
//Based on browser set correct resize mode
if (parseInt(navigator.appVersion.charAt(0))>=4){
	if (navigator.appName=="Netscape"){
	var f="width="+screen.width+",height="+screen.height;	
	var rs="var iWidth=window.innerWidth;iHeight=window.innerHeight";
	var adj="0";
	}
	if(document.all){
	var f="width=150,height=150";	
	var rs = "var iWidth=document.body.clientWidth;iHeight=document.body.clientHeight;";
		if(typeof window.opera != 'undefined'){ 
		 var adj="window.outerHeight-24";
		 }
		else{
		var adj="32";
		}	 
	} 
}
//
v=pos.substring(0,pos.indexOf("_"));
h=pos.substring(pos.indexOf("_")+1);
f+=",left=0,top=0";
imgWin=window.open('about:blank','',f);
imDoc=imgWin.document;
with (imDoc){
writeln('<html><head><title>Loading...</title>');
writeln('<sc'+'ript>');
writeln('var sdstr=\"\";window.onerror=function(){return true;}');
writeln('function resizeWin(){');
//If the image size is bigger then screen resize window to the screen size
writeln('iW=document.images[0].width;iH=document.images[0].height;sW=screen.availWidth;sH=screen.availHeight;');
writeln('if(iW>=sW || iH>=sH){window.resizeTo(sW,sH);window.moveTo(0,0)}else{')
writeln(rs);
writeln('var v=\"'+v+'\";var h=\"'+h+'\";');
writeln('switch (v){case \"top\":vPos=0;break;case \"middle\":vPos=(sH-iH-'+adj+')/2;break;case \"bottom\":vPos=sH-'+adj+'-iH;break;default: vPos=0;}');
writeln('switch (h){case \"left\":hPos=0;break;case \"center\":hPos=(sW-iW)/2;break;case \"right\":hPos=sW-iW;break;default: hPos=0;}');
writeln('iWidth = document.images[0].width - iWidth;iHeight = document.images[0].height - iHeight;');
writeln('window.resizeBy(iWidth, iHeight);');
writeln('window.moveBy(hPos,vPos)}}');
writeln('function doTitle(){document.title="'+unescape(imageTitle)+'";}'+'</sc'+'ript>');
var cT=(!AutoClose)?"":"onBlur=\"sdstr=setTimeout('window.close(this)',1000)\"";
//Prevent closing in IE
var fL=(!AutoClose)?"":"onfocus=\"clearTimeout(sdstr)\"";
if(!CopyRight){var cr1="";var cr2=""}else{var cr1=" galleryimg=\"no\" title=\"Copyright Protected\" onmousedown=\"window.close()\" ";var cr2="oncontextmenu=\"return false\" "}
writeln('</head><body  leftmargin=\"0\" topmargin=\"0\" marginwidth=\"0\" marginheight=\"0\" bgcolor=\"FFFFFF\" onload="resizeWin();doTitle();self.focus()" '+cT+' '+fL+' '+cr2+'>');
writeln('<div '+fL+' align=\"center\" style=\"width:100%;height:100%;overflow:auto\"><img src="'+imageURL+'" '+cr1+'></div></body></html>');
close();
}
}
}

function insertAdres() {	
	var i = document.formulier.addadres.value;
	    i++;
	var mycurrent_row = document.getElementById("adrestabel").insertRow(-1);
    
	var mycurrent_cell_1 = document.createElement('td'); 
	
	var mycurrent_cell_2 = mycurrent_cell_1.cloneNode(true);	
	var mycurrent_cell_3 = mycurrent_cell_1.cloneNode(true);	
	var mycurrent_cell_4 = mycurrent_cell_1.cloneNode(true);	
	
	input_type_select = document.createElement("<select name=\"type_"+i+"\" class=\"tekstveld2\">");

	//var input_type_select = document.createElement('select');
	//input_type_select.name = 'type_'+i;
	//input_type_select.className = 'pulldown3';
	
	input_option = document.createElement('option'); 
	input_option.text = 'Selecteer type'; 
	input_option.value = ''; 
	input_type_select.options.add(input_option); 
	
	input_option = document.createElement('option'); 
	input_option.text = 'Beide'; 
	input_option.value = 'beide'; 
	input_type_select.options.add(input_option); 

	input_option = document.createElement('option'); 
	input_option.text = 'Factuuradres'; 
	input_option.value = 'factuuradres'; 
	input_type_select.options.add(input_option); 
	
	input_option = document.createElement('option'); 
	input_option.text = 'Bezorgadres'; 
	input_option.value = 'bezorgadres'; 
	input_type_select.options.add(input_option); 
	
	input_adres  = document.createElement("<INPUT TYPE=\"text\" NAME=\"adres_"+i+"\" VALUE=\"\" class=\"tekstveld2\">");
	//input_adres 	= document.createElement('input');
	//input_adres.setAttribute('type', 'text');
	//input_adres.name = 'adres_'+i;
	//input_adres.className = 'tekstveld3';
	
	input_postcode  = document.createElement("<INPUT TYPE=\"text\" NAME=\"postcode_"+i+"\" VALUE=\"\" class=\"tekstveld2\">");
	//input_postcode	= document.createElement('input');
	//input_postcode.setAttribute('type', 'text');
	//input_postcode.name = 'postcode_'+i;
	//input_postcode.className = 'tekstveld3';

	input_plaats  = document.createElement("<INPUT TYPE=\"text\" NAME=\"plaats_"+i+"\" VALUE=\"\" class=\"tekstveld2\">");
	//input_plaats	= document.createElement('input');
	//input_plaats.setAttribute('type', 'text');
	//input_plaats.name = 'plaats_'+i;
	//input_plaats.className = 'tekstveld3';
	
	mycurrent_cell_1.appendChild(input_type_select); 
	mycurrent_cell_2.appendChild(input_adres); 
	mycurrent_cell_3.appendChild(input_postcode); 
	mycurrent_cell_4.appendChild(input_plaats); 

	mycurrent_row.appendChild(mycurrent_cell_1);  
	mycurrent_row.appendChild(mycurrent_cell_2);
	mycurrent_row.appendChild(mycurrent_cell_3);
	mycurrent_row.appendChild(mycurrent_cell_4);
	
	document.formulier.addadres.value = i;

}	


