<!--

var maakOptieSelectie = function(oArrId, aNaam, labelNaam, vraagTitel, vervolgId){
//	alert(oArrId + "\n\n" + aNaam + "\n\n" + labelNaam + "\n\n" + vraagTitel + "\n\n" + vervolgId)
	var a = eval(aNaam)
	var afb
	var l = a.length
	var t = 0
	var ImageTestString = a.join("_")
	var imagesAanwezig = false
	if(ImageTestString.search(/\.gif/gi) != -1){
		imagesAanwezig = true
	}
	if(ImageTestString.search(/\.jpg/gi) != -1){
		imagesAanwezig = true
	}
	if(l == 1){
		var HTML = ""
		selecteerOptie(oArrId, aNaam, 0, labelNaam, vervolgId)
	}else{
		if(imagesAanwezig){
			var HTML = "<table celpadding=0 cellspacing=0 border=0 width=100%><tr><td align=left class=selectieTitel><b>" + vraagTitel + "</b></td><td align=right><a href=javascript:sluitOptie(" + vervolgId + ")>sluiten</a></td></tr></table><hr style'color:#000000;height:1px;' size='1' noshade><table celpadding=0 cellspacing=0 border=0><tr>"
			for(var i=0;i<l;i++){
				t = t + 1
				afb = a[i][3]
				if(typeof afb == "undefined"){
					afb = "spacer.gif"
				}
				HTML += "<td align='middle' valign='top' nowrap class='OptieTxt' style='padding-right:15px;padding-bottom:5px;'>"
				HTML += "<table celpadding=0 cellspacing=0 border=0 width=116>"
				HTML += "<tr><td valign=top width=105><A href=javascript:selecteerOptie(" + oArrId + ",'" + aNaam + "'," + i + ",'" + labelNaam + "'," + vervolgId + ")><img src='Images/" + afb + "' alt='' width='105' height='114' border='0' class='Optie'></A></td><td valign=top width=11><A href=javascript:toonUitvergroting('" + aNaam + "'," + i + ",'" + labelNaam + "')><img src='Images/icon_vergroot.gif' alt='Klik hier om deze afbeelding te vergroten' width='11' height='11' border='0'></A></td></tr>"
				HTML += "<tr><td colspan=2><A href=javascript:selecteerOptie(" + oArrId + ",'" + aNaam + "'," + i + ",'" + labelNaam + "'," + vervolgId + ") style='line-height:15px;'>" + a[i][1] + "</A></td></tr>"
				HTML += "</table>"
				HTML += "</td>"
				if(t == 4){
					t = 0
					HTML += "</tr><tr>"
				}
			}
			HTML += "</tr></table>"
		}else{
			var HTML = "<table celpadding=0 cellspacing=0 border=0 width=100%><tr><td align=left class=selectieTitel><b>" + vraagTitel + "</b></td><td align=right><a href=javascript:sluitOptie(" + vervolgId + ")>sluiten</a></td></tr></table><hr style'color:#000000;height:1px;' size='1' noshade><table celpadding=0 cellspacing=0 border=0 width=100%>"
			
			for(var i=0;i<l;i++){
				HTML += "<tr><td class='OptieTxt' nowrap style=width:100%;><A href=javascript:selecteerOptie(" + oArrId + ",'" + aNaam + "'," + i + ",'" + labelNaam + "'," + vervolgId + ")>" + a[i][1] + "</A></td></tr>"
			}
			HTML += "</table>"
		}
	}

	if(HTML != ""){
		document.getElementById("optieDiv").innerHTML = HTML
		if(!imagesAanwezig){
			document.getElementById("optieDiv").style.height = "200px"
		}else{
			document.getElementById("optieDiv").style.height = ""
		}
		document.getElementById("optieDiv").style.display = "block"
	}else{
		optieArray[oArrId][3] = a[0][2]
	}
}
var sluitOptie = function(vervolgId){
	document.getElementById("optieDiv").style.display = "none"
	if(vervolgId != null){
		if(eval(optieArray[vervolgId][0]).length != 0){
			startBestekOptie (vervolgId, optieArray)
		}
	}
}
var toonUitvergroting = function(aNaam, arrId){
	var a = eval(aNaam)

	var fotoDivHTML = ""
	var afb = a[arrId][4]
	if(typeof afb == "undefined"){
		afb = "spacer.gif"
	}
	fotoDivHTML += "<table cellpadding=0 cellspacing=0 border=0>"
	fotoDivHTML += "<tr>"
	fotoDivHTML += "<td align=left style='border-bottom:1px solid #6B6B6B;padding-bottom:3px;padding-top:3px;'>&nbsp;<b>" + a[arrId][1] + "</b></td>"
	fotoDivHTML += "<td align=right style='border-bottom:1px solid #6B6B6B;padding-bottom:3px;padding-top:3px;'><A href='javascript://' onClick='this.style.display = \"none\"'>sluiten</A>&nbsp;</td>"
	fotoDivHTML += "</tr>"
	fotoDivHTML += "<tr>"
	fotoDivHTML += "<td colspan=2><img src='Images/" + afb + "' alt='' width='300' height='300' border='0' class='OptieImg'></td>"
	fotoDivHTML += "</tr>"
	fotoDivHTML += "</table>"

	document.getElementById("fotoDiv").innerHTML = fotoDivHTML
	document.getElementById("fotoDiv").style.display = "block"
}

var displayImage = function(myimage, title){
	html = "<HTML><HEAD><TITLE>" + title + "</TITLE>"
	 + "</HEAD><BODY LEFTMARGIN=0 " 
	 + "MARGINWIDTH=0 TOPMARGIN=0 MARGINHEIGHT=0><CENTER>" 
	 + "<IMG SRC='" + myimage + "' BORDER=0 NAME=image " 
	 //+ "onload='window.resizeTo(document.image.width + 12, document.image.height + 31)'>"
	 + "onload='window.resizeTo(document.image.width + 12, document.image.height + 71)'>"
	 + "</CENTER>" 
	 + "</BODY></HTML>";
	popup=
	window.open
	 ('','image',
	 'toolbar=0,location=0,directories=0,menuBar=0,scrollbars=0,status=0,resizable=1');
	popup.document.open();
	popup.document.write(html);
	popup.document.focus();
	popup.document.close()
};
// -->