function setActiveMenu(url){
   menuobject = document.getElementsByTagName('li');
   for(var j=0; j<menuobject.length; j++){
      menuAObject = menuobject[j].getElementsByTagName('a');
      for(var s=0; s<menuAObject.length; s++){
         if(menuAObject[s] == url) {
            menuAObject[s].className+=' active';
	 }
      }
   }
}

function SetMenuActive() {
	setActiveMenu(self.location.href);
   	longstring = self.location.href;

   	brokenstring = longstring.split('/'); 
	url="";

      	for(x=0; x < (brokenstring.length-1);x++) {
        	url = url+brokenstring[x]+"/";
      	}   
      	setActiveMenu(url);
}
 

function SetResolutions() {

	if (self.innerWidth)
	{
		frameWidth = self.innerWidth;
		frameHeight = self.innerHeight;
	}
	else if (document.documentElement && document.documentElement.clientWidth)
	{
		frameWidth = document.documentElement.clientWidth;
		frameHeight = document.documentElement.clientHeight;
	}
	else if (document.body)
	{
		frameWidth = document.body.clientWidth;
		frameHeight = document.body.clientHeight;
	}
	else return;
	
	nObj = document.getElementById("body");
	
	//alert(document.body.clientHeight+" "+frameHeight);

	
	//alert(document.getElementById('holder').getPropertyValue("height")));
	if(document.body.clientHeight<frameHeight) {
	
		document.body.style.height=frameHeight+"px";
		
	}
}

function IE6FIX() {
	document.getElementById('logo').src='http://www.grotekerkdriebergen.nl/images/logo.jpg';	
}


window.onload = function() {
	SetMenuActive();
	SetResolutions(); 
	IE6FIX();

}

window.onresize = function() {
SetResolutions(); 

}
