function activate_item(){
 this.className=this.className.replace(/passive/,'active'); // change passive to active
}

function passivate_item(){
 this.className=this.className.replace(/active/,'passive'); // change active to passive
}

function followlink(){
 if(this.getElementsByTagName){
  url=this.getElementsByTagName("a")[0].href;
  window.location=url;
 }
}

function makeMenuActive(){
 if(document.getElementById){
 items=document.getElementById("menu").getElementsByTagName("li"); // Get <li> items in menu
  for(i=0; i<items.length; i++){ // For each <li>
   if(items[i].attachEvent){ // Don't do this for Mozilla
    items[i].className="passiveitem"; // set style for this item
    items[i].onmouseover=activate_item; // add onmouseover
    items[i].onmouseout=passivate_item; // and onmouseout
    subs=items[i].getElementsByTagName("ul"); // Get child <ul>s
    if(subs.length>0){ // If there's a submenu,
     items[i].className="passiveheader"; // the <li> is a 'header';
    } else { // If there's no submenu,
     items[i].onclick=followlink; // allow clicking in entire <li>
    }
   }
  }
 }
}

//window.onload=makeMenuActive; // Voorlopig op pagina, en niet hier, vanwege laadtijd
