var uls=new Array();

function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      if (oldonload) {
        oldonload();
      }
      func();
    }
  }
}

addLoadEvent(function() {getSubMenus();});

function getSubMenus()
	{
	var struct=document.getElementById("navigationstruct");
	var count=struct.childNodes.length;
	for(var x=0;x<count;x++) 
		{
		uls.push(x);
		}
	}
	

	
function showSubmenu(n)
	{
	for(var x=0;x<uls.length;x++) 
		{
		if (x!=n && document.getElementById("mainmenu_"+String(x))) {document.getElementById("mainmenu_"+String(x)).className="";}
		else if (x==n && document.getElementById("mainmenu_"+String(n))) {document.getElementById("mainmenu_"+String(n)).className="hoverItem";}
		if (x!=n && document.getElementById("submenu_"+String(x))) {document.getElementById("submenu_"+String(x)).style.display="none";}
		else if (x==n && document.getElementById("submenu_"+String(n))) {document.getElementById("submenu_"+String(n)).style.display="block";}
		}

	
	}
	
function hideSubmenu(n)
	{
	for(var x=0;x<uls.length;x++) 
		{
		if (document.getElementById("mainmenu_"+String(x))) {document.getElementById("mainmenu_"+String(x)).className="";}
		if (document.getElementById("submenu_"+String(x))) {document.getElementById("submenu_"+String(x)).style.display="none";}
		}
	//if (x!=n && document.getElementById("mainmenu_"+String(n))) {document.getElementById("mainmenu_"+String(n)).className="";}
	//if (x!=n && document.getElementById("submenu_"+String(n))) {document.getElementById("submenu_"+String(n)).style.display="none";}
	}

/*horloges*/
function hilightHorloge(el)
	{
	el.className="hoverHorloge";
	}
function unhilightHorloge(el)
	{
	el.className="eenhorloge";
	}
function goHorlogeDetail(n)
	{
	document.location="horlogedetail.html?h="+String(n);
	}
function showSorteerDiv()
	{
	document.getElementById("sorteerDiv").style.display="block";
	}
function hideSorteerDiv()
	{
	document.getElementById("sorteerDiv").style.display="none";
	}
function showHorlogeGroot(url)
	{
	document.getElementById("horlogegrootImg").src=url;
	document.getElementById("horlogegrootImg").width=638;
	document.getElementById("horlogegrootImg").height=424;
	}	

