function SetAllCheckBoxes(FormName, FieldName, CheckValue)
{
	if(!document.forms[FormName])
		return;
	var objCheckBoxes = document.forms[FormName].elements[FieldName];
	if(!objCheckBoxes)
		return;
	var countCheckBoxes = objCheckBoxes.length;
	if(!countCheckBoxes)
		objCheckBoxes.checked = CheckValue;
	else
		// set the check value for all check boxes
		for(var i = 0; i < countCheckBoxes; i++)
			objCheckBoxes[i].checked = CheckValue;
}

function select_all(formname,fieldname) {
	var text_val=eval("document." + formname + "." + fieldname);
	text_val.focus();
	text_val.select();
}

var div = 0;

function toggleIt(div) {
	if (document.getElementById('div_' + div).style.display == 'none'){
	document.getElementById('div_' + div).style.display = 'block';
	}else{
	document.getElementById('div_' + div).style.display = 'none';
	}
}




function hide(div) {
	document.getElementById('div_' + div).style.visibility = 'hidden';
}

function delayedHide(div)
{
  timeoutID = setTimeout("hide('" + div + "');", 1250);
}

function clearTimer()
{
  window.clearTimeout(timeoutID);
}

//hoofdid, tekstid, tekstnone, tekstblock, bgid, bgnone, bgblock 
function toggleHistory(id){
	if(document.getElementById(id).style.display == 'none'){
		document.getElementById(id).style.display = 'block';
		document.getElementById('showhide').innerHTML = 'minder';
		document.getElementById('arrow').style.backgroundPosition='0 -75px';
	}else{
		document.getElementById(id).style.display = 'none';
		document.getElementById('showhide').innerHTML = 'meer';
		document.getElementById('arrow').style.backgroundPosition='0 15px';
	}
}

function show(div) {
	document.getElementById('div_' + div).style.visibility = 'visible';
}

function showhide(div,url,width) {
	if (document.getElementById('div_' + div).style.display == 'none'){

	document.getElementById('div_' + div).style.display = 'block';
	document.getElementById('head_' + div).className='header_' + width + '_closed';
	setsession_open(div,url);

	}else{

	document.getElementById('div_' + div).style.display = 'none';
	document.getElementById('head_' + div).className='header_' + width + '_open';
	setsession_close(div,url);

	}	


}

function toggleUitslag(div) {
	if (document.getElementById('div_' + div).style.display == 'none'){
	document.getElementById('div_' + div).style.display = 'block';
	document.getElementById('verbergen').style.display = 'block';
	document.getElementById('tonen').style.display = 'none';
	
	}else{
	document.getElementById('div_' + div).style.display = 'none';
	document.getElementById('verbergen').style.display = 'none';
	document.getElementById('tonen').style.display = 'block';
	}	
}

function show_contactinfo(div) {
	if (document.getElementById('contact_' + div).style.display == 'none'){
		document.getElementById('contact_' + div).style.display = 'block';
		document.getElementById('switch_contact_' + div).className='info_close';
	}else{
		document.getElementById('contact_' + div).style.display = 'none';
		document.getElementById('switch_contact_' + div).className='info_open';
	}	


}

var xmlHttp;

function setsession_open(div,url)
{

xmlHttp=GetXmlHttpObject()

if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request");
 return;
 } 

//var url="index.php";
url=url+"?menu"+div+"=open";
url=url+"&sid="+Math.random();
xmlHttp.onreadystatechange=stateChanged ;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}

function setsession_close(div,url)
{

xmlHttp=GetXmlHttpObject()

if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request");
 return;
 } 

//var url="index.php";
url=url+"?menu"+div+"=close";
url=url+"&sid="+Math.random();
xmlHttp.onreadystatechange=stateChanged ;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}

function stateChanged() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
 /*document.getElementById("livesearch").
 innerHTML=xmlHttp.responseText;
 document.getElementById("livesearch").
 style.border="1px solid #A5ACB2";
*/
 } 
}

function GetXmlHttpObject()
{
var xmlHttp=null;
try
 {
 // Firefox, Opera 8.0+, Safari
 xmlHttp=new XMLHttpRequest();
 }
catch (e)
 {
 // Internet Explorer
 try
  {
  xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttp;
}

function openInNewWindow(o)
{
   o.target = '_blank';
}

//links downloads, contacts en hyperlinks
function linksOnMouseOver(Img,Link){
	document.getElementById(Link).style.textDecoration='underline';
	document.getElementById(Img).style.border='1px solid #b1b1b1'
}

function linksOnMouseOut(Img,Link){
	document.getElementById(Link).style.textDecoration='none';
	document.getElementById(Img).style.border='1px solid #d1d1d1'
}

