/* Calls searchForLIs for both menu's. This replaces the csshover.htc functionality in the menu's */

function parseLists() {
	if (document.all&&document.getElementById) {
		menuRoot = document.getElementById("hoofdmenu");
		searchForLIs(menuRoot);
 	} 	
}

/* Recursive function. Searches the childs of the passed object for LI's or UL's. 
   When found they are passed to this function again. LI's are also given 2 events (mouseover / mouseout). */

function searchForLIs(objectReference) {
	for (var i=0; i < objectReference.childNodes.length; i++) {
		node = objectReference.childNodes[i];
		switch (node.nodeName) {
			case "LI": {
				node.onmouseover = function() {
					this.className += " over";
  				}
  				node.onmouseout = function() {
  					this.className = this.className.replace(" over", "");
   				}				
				searchForLIs(node);	
				break;
			}
			case "UL": {
				searchForLIs(node);
				break;
			}		
		}
	}
	return;
}


function getStyle( layer ) {
	if( document.getElementById ) {
		return document.getElementById( layer ).style
	} else if( document.all ) {
		return document.all[layer].style
	} else {
		return document[layer]
	}
}






/* fietsen: data & detail */
function show() {

  if( getStyle('afbeelding').display=='block') {
   getStyle('afbeelding').display='none'
   getStyle('data').display='block'
  } else {
   getStyle('afbeelding').display='block'
   getStyle('data').display='none'
  }
}
