function showhide(id)
{
	if($(id).style.display == null || $(id).style.display == "none")
	{
		//$(id).style.display = "block";
		$(id).setStyle({"display":"block"});
	}
	else
	{
		//$(id).style.display = "none";
		$(id).setStyle({"display":"none"});
	}
}


var state1 = 'block'; 
var state2 = 'block'; 
var state3 = 'block'; 

window.onload = function() {writeElementFunctions();}

function showhide1(layer_ref) { 

if (state1 == 'block') { 
state1 = 'none'; 
} 
else { 
state1 = 'block'; 
} 
if (document.all) { //IS IE 4 or 5 (or 6 beta) 
eval( "document.all." + layer_ref + ".style.display = '" + state1 + "'"); 
} 
if (document.layers) { //IS NETSCAPE 4 or below 
document.layers[layer_ref].display = state1; 
} 
if (document.getElementById &&!document.all) { 
hza = document.getElementById(layer_ref); 
hza.style.display = state1; 
} 
}

function showhide2(layer_ref) { 

if (state2 == 'block') { 
state2 = 'none'; 
} 
else { 
state2 = 'block'; 
} 
if (document.all) { //IS IE 4 or 5 (or 6 beta) 
eval( "document.all." + layer_ref + ".style.display = '" + state2 + "'"); 
} 
if (document.layers) { //IS NETSCAPE 4 or below 
document.layers[layer_ref].display = state2; 
} 
if (document.getElementById &&!document.all) { 
hza = document.getElementById(layer_ref); 
hza.style.display = state2; 
} 
}

function showhide3(layer_ref) { 

if (state3 == 'block') { 
state3 = 'none'; 
} 
else { 
state3 = 'block'; 
} 
if (document.all) { //IS IE 4 or 5 (or 6 beta) 
eval( "document.all." + layer_ref + ".style.display = '" + state3 + "'"); 
} 
if (document.layers) { //IS NETSCAPE 4 or below 
document.layers[layer_ref].display = state3; 
} 
if (document.getElementById &&!document.all) { 
hza = document.getElementById(layer_ref); 
hza.style.display = state3; 
} 
}

function writeElementFunctions(){
	var overigeinfo = document.getElementById("overigeinfo");
	
	if (overigeinfo != null){
		overigeinfo.onclick=function() {showhide1('showhide1');}
	}
	
	var ingekomenstukken = document.getElementById("ingekomenstukken");

	if (ingekomenstukken != null){
		ingekomenstukken.onclick=function() {showhide2('showhide2');}
	}
	
	var notulen = document.getElementById("notulen");
	
	if (notulen != null){	
		notulen.onclick=function() {showhide3('showhide3');}
	}
}
