function GetParam(name)
{
  var start=location.search.indexOf("?"+name+"=");
  if (start<0) start=location.search.indexOf("&"+name+"=");
  if (start<0) return '';
  start += name.length+2;
  var end=location.search.indexOf("&",start)-1;
  if (end<0) end=location.search.length;
  var result='';
  for(var i=start;i<=end;i++) {
    var c=location.search.charAt(i);
    result=result+(c=='+'?' ':c);
  }
  return unescape(result);
}

function LayerStatus(Link,whichLayer)
{
//	alert ('Style= ' + Style2);
if (document.getElementById)
{
// this is the way the standards work
var style2 = document.getElementById(whichLayer).style;
}
else if (document.all)
{
// this is the way old msie versions work
var style2 = document.all[whichLayer].style;
}
else if (document.layers)
{
// this is the way nn4 works
var style2 = document.layers[whichLayer].style;
}
var zicht=style2.display
//alert ('Display= ' + zicht );
if (zicht=="none"){
	style2.display="block";
	}
else {
//	style2.display="none";
//	window.location=window.location.hash + "?ID=" + whichLayer + "&Display=none";
	window.location=Link + "?ID=" + whichLayer + "&Display=none";
}

//	zicht=style2.display
//alert ('Display= ' + zicht );
//if (zicht=="none")
//	{ window.location=window.location.hash + "?ID=" + whichLayer + "&Display=none"
//	}
}

function toggleLayer(whichLayer,ToDo)
{
if (document.getElementById)
{
// this is the way the standards work
var style2 = document.getElementById(whichLayer).style;
style2.display = style2.display? "":ToDo;
}
else if (document.all)
{
// this is the way old msie versions work
var style2 = document.all[whichLayer].style;
style2.display = style2.display? "":ToDo;
}
else if (document.layers)
{
// this is the way nn4 works
var style2 = document.layers[whichLayer].style;
style2.display = style2.display? "":ToDo;
}
}

function Verberg()
{
	if (location.search.length > 0) {
	soort=location.search.substring(1);
//	alert ('Params:' + soort);
	Laag =GetParam('ID');
	Stijl=GetParam('Display');
	
//	alert ("ID =" + Laag + " Stijl=" + Stijl);
	toggleLayer(Laag,Stijl);
}
}