	var DHTML = (document.getElementById || document.all || document.layers);
	var keuze = ""
	var supported = (document.getElementById || document.all);

	if (supported)
	{
		document.write("<STYLE TYPE='text/css'>");
		document.write(".para {display: none; background: #FBDA98; padding: 10px}");
		document.write("</STYLE>");
	}

	function kies(name)
	{
		if (!DHTML) return;
		if (name)
		{
			var x = getObjid(name);
			x.className = 'current'
			if ((keuze != name) && (keuze != ""))
			{
				var y = getObjid(keuze);
				y.className = ''
			}
			keuze = name
		}
	}


	function schrijf(i)
	{
		if (document.getElementById)
		{
			if (document.getElementById('antwoord'+i).style.display == 'none' || document.getElementById('antwoord'+i).style.display == '')
			{
				document.getElementById('antwoord'+i).style.display = 'block';
			}
			else
			{
				document.getElementById('antwoord'+i).style.display = 'none';
			}
		}
		else if (document.all)
		{
			if (document.all['antwoord'+i].style.display == 'none' || document.all['antwoord'+i].style.display == '')
			{
				document.all['antwoord'+i].style.display = 'block';
			}
			else
			{
				document.all['antwoord'+i].style.display = 'none';
			}
		}
	}


	function getObj(name)
	{
		if (document.getElementById)
		{
			return document.getElementById(name).style;
		}
		else if (document.all)
		{
			return document.all[name].style;
		}
		else if (document.layers)
		{
			return document.layers[name];
		}
		else return false;
	}

	function getObjid(name)
	{
		if (document.getElementById)
		{
		return document.getElementById(name);
		}
		else if (document.all)
		{
		return document.all[name];
		}
		else if (document.layers)
		{
		return document.layers[name];
		}
		else return false;
	}


	function vervangdisplay(string,text,by)
	{
		// Replaces text with by in string
    		var strLength = string.length, txtLength = text.length;
    		if ((strLength == 0) || (txtLength == 0)) return string;
    		var i = string.indexOf(text);
    		if ((!i) && (text != string.substring(0,txtLength))) return string;
    		if (i == -1) return string;
    		var newstr = string.substring(0,i) + by;    		
		if (i+txtLength < strLength)
		{
			newstr += vervangdisplay(string.substring(i+txtLength,strLength),text,by);
		}
		return newstr;
	}

	
	function vervang(string,text,by)
    {
		// Replaces text with by in string;
		var strLength = string.length, txtLength = text.length;
		if ((strLength == 0) || (txtLength == 0)) return string;
		var i = string.indexOf(text);
		if ((!i) && (text != string.substring(0,txtLength))) return string;
		if (i == -1) return string;
		var newstr = string.substring(0,i) + by;
		if (i+txtLength < strLength)
		{
			newstr += vervang(string.substring(i+txtLength,strLength),text,by);
		}
		return newstr;
    }
	
	function printpage()
	{
        newwindow2=window.open('','name','height=400,innerHeight=400,width=550,innerWidth=550,scrollbars=yes,resizable');
		var tmp = newwindow2.document;
		var x = getObjid('main');
		
        if (x.innerHTML)
        {
			var y = x.innerHTML;
			var vervangen = '<P><INPUT class=knop onclick=javascript:history.back() type=button value=Terug name=btnterug></P>';
			var vervangwaarde = '';
			if (y.indexOf(vervangen) > -1)
			{
				y = y.replace(vervangen,vervangwaarde);
			}
			var vervangen = '<P><INPUT class=knop onclick=javascript:history.back() value=Terug type=button name=btnterug></P>';
			var vervangwaarde = '';
			if (y.indexOf(vervangen) > -1)
			{
				y = y.replace(vervangen,vervangwaarde);
			}
			y = vervang(y," class=para","");
			y = vervang(y,' style="DISPLAY: none"',"");
			tmp.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">' + '\n');
			tmp.write('<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">' + '\n' + '<head>' + '\n' + '<title>Print</title>' + '\n');
			tmp.write('<link rel="stylesheet" type="text/css" href="/Sites/PRPG/css/PRPG.css" />' + '\n');
			tmp.write('<link rel="stylesheet" type="text/css" media="print" href="/Sites/PRPG/css/print.css" />' + '\n');
			//tmp.write('<link rel="stylesheet" type="text/css" media="print" href="../css/print.css" />' + '\n');
			tmp.write('<style type="text/css">' + '\n' + '<!--' + '\n' + ' img { VISIBILITY: hidden; display: none }' + '\n' + ' .para { display: block }' + '\n' + ' .knopdisabled { VISIBILITY: hidden; display: none } ' + '\n' + '-->' + '\n' + '</style>' + '\n');
			tmp.write('<style type="text/css" media="print">' + '\n' + '<!--' + '\n' + ' .knop2 { VISIBILITY: hidden; display: none } ' + '\n' + '-->' + '\n' + '</style>' + '\n');
			//tmp.write('</head>' + '\n' + '<body style="background: #fff; margin-top: 10px">' + '\n');
			tmp.write('</head>' + '\n' + '<body style="background: #fff; margin: 10px; padding: 0; height: auto; text-align: left;">' + '\n');
			//tmp.write('<div id="content" style="margin: 0 auto; position: relative; text-align: left; width: 100%">' + '\n');
			tmp.write('<p><input type="button" class="knop2" value="Print deze pagina" onClick="javascript:window.print()" />' + '\n');
			tmp.write('&nbsp;&nbsp;<input type="button" class="knop2" value="Sluit venster" onClick="javascript:self.close()" /></p>' + '\n');
			tmp.write(y);
			//tmp.write('</div>' + '\n');
			tmp.write('</body>' + '\n' + '</html>');
			tmp.close();
        }
	}

	function openvenster(url)
	{
		w=460;
		h=300;
		t=60;
		l=220;
		msgWindow = window.open('','disclaimer','height='+h+',innerHeight='+h+',width='+w+',innerWidth='+w+',screenX='+l+',screenY='+t+',top='+t+',left='+l+',resizable');
		msgWindow.focus();
		msgWindow.location.href = url;
	}
	
	function submitzoek(zoekterm,checked1,zoekgebied1,checked2,zoekgebied2,checked3,zoekgebied3)
	{
		var zoekstring = zoekterm;
		var zoekgebied = zoekgebied3;
		if (checked1 == true)
		{
			zoekgebied = zoekgebied1;
		}
		if (checked2 == true)
		{
			zoekgebied = zoekgebied2;
		}
		/*if (checked3 == true)
		{
			zoekgebied = zoekgebied3;
		}*/
		var zoekgebied1 = zoekgebied1;
		var zoekgebied2 = zoekgebied2;
		var zoekgebied3 = zoekgebied3;
		location.href = '/index.aspx?ChapterID=13145&ContentID=' + zoekgebied + '&SearchString=' + zoekstring;
	}



