function oppg(index){
		if(index==1){
			document.location.href = "Pilotcompet.html";
		}
		if(index==2){
			document.location.href = "Evalconf.html";
		}
		if(index==3){
			document.location.href = "Valmetier.html";
		}
		if(index==4){
			document.location.href = "recruter.html";
		}
		
		
}

function keepActive() { 
  var tim = 5000;
  if (timeoutId != 0) clearTimeout(timeoutId);
  timeoutId = setTimeout("killMenu()", tim);
}

function closeInABit() {
  var tim = 50;
  if (timeoutId != 0) clearTimeout(timeoutId);
  timeoutId = setTimeout("killMenu()", tim);
}

var activeMenu = 0;
var timeoutId = 0;

function activateMenu(menu) {

 if(document.getElementById) {
  if (activeMenu) hideMenu(activeMenu);
  activeMenu = menu;
  var docMenuID = document.getElementById("menu" + menu);
  var docMId =    document.getElementById("m"+menu);

    docMenuID.style.top  = parseInt(docMId.offsetTop) + parseInt(docMId.offsetHeight);
    docMenuID.style.left = parseInt(docMId.offsetLeft);

// workaround the Mozilla and Netscape 6 positioning problem when margins are used. Mozilla/NS6 
// positions are affected by margin settings for page, IE isn't.  
// Not needed now we run with no margins.
//    if (navigator.userAgent.indexOf('Mozilla/5') != -1) {
//      docMenuID.style.top = parseInt(docMenuID.style.top) + 8;
//      docMenuID.style.left = parseInt(docMenuID.style.left) + 8;
//    }

  docMenuID.style.display = "block";
  docMId.style.backgroundColor = "";
  docMId.style.Color = "";
  if (timeoutId != 0) clearTimeout(timeoutId);
  timeoutId = setTimeout("killMenu()", 5000);

// crudely workaround the IE5 (and IE5.5 and IE6) 'list box always on-top' problem for the software
// download page (software.asp) where the 3 list boxes are called s, h and l
// there's one on the main menu (prefer.inc) called c

if (document.all) {
      if (document.getElementById('s')) {
        var sId = document.getElementById('s');
        sId.style.visibility = "hidden";
      }
  
     if (document.getElementById('h')) {
        var hId = document.getElementById('h');
        hId.style.visibility = "hidden";
     }

     if (document.getElementById('l')) {
        var lId = document.getElementById('l');
        lId.style.visibility = "hidden";
     }
     if (document.getElementById('c')) {
        var cId = document.getElementById('c');
        cId.style.visibility = "hidden";
     }
                   }

}
}


function hideMenu(val) {
  var docMenuID = document.getElementById("menu"+val);
  if (docMenuID)  docMenuID.style.display = "none";
  var docMId =    document.getElementById("m"+val);
//  docMId.style.backgroundColor = "transparent";
  docMId.style.backgroundColor = "";

// crude workaround for the IE5 'list box always on-top' problem for the software
// download page (software.asp) where the 3 list boxes are called s, h and l
// there's one on the main menu (prefer.inc) called c

if (document.all) {
  if (document.getElementById('s')) {
    var sId = document.getElementById('s');
    sId.style.visibility = "visible";
  }

  if (document.getElementById('h')) {
    var hId = document.getElementById('h');
    hId.style.visibility = "visible";
  }
  if (document.getElementById('l')) {
    var lId = document.getElementById('l');
    lId.style.visibility = "visible";
  }
  if (document.getElementById('c') ) {
    var cId = document.getElementById('c');
    cId.style.visibility = "visible";
  }
}

}

function killMenu(e) {
  if (activeMenu) {
    hideMenu(activeMenu);
    activeMenu = 0;
  }  
}

function closeSoon() {
  var tim = 50;
  if (timeoutId != 0) clearTimeout(timeoutId);
  timeoutId = setTimeout("killMenu()", tim);
}

function keepActive() { 
  var tim = 5000;
  if (timeoutId != 0) clearTimeout(timeoutId);
  timeoutId = setTimeout("killMenu()", tim);
}
//end activateMenu ******************************************************

function activateMenu_c(menu,Mtop,Mleft) {

 if(document.getElementById) {
  if (activeMenu) hideMenu(activeMenu);
  activeMenu = menu;
  var docMenuID = document.getElementById("menu" + menu);
  var docMId =    document.getElementById("m"+menu);

    docMenuID.style.top  = parseInt(docMId.offsetTop) + Mtop;
    docMenuID.style.left = parseInt(docMId.offsetLeft) + Mleft;

// workaround the Mozilla and Netscape 6 positioning problem when margins are used. Mozilla/NS6 
// positions are affected by margin settings for page, IE isn't.  
// Not needed now we run with no margins.
//    if (navigator.userAgent.indexOf('Mozilla/5') != -1) {
//      docMenuID.style.top = parseInt(docMenuID.style.top) + 8;
//      docMenuID.style.left = parseInt(docMenuID.style.left) + 8;
//    }

  docMenuID.style.display = "block";
  docMId.style.backgroundColor = "";
  docMId.style.Color = "red";
  if (timeoutId != 0) clearTimeout(timeoutId);
  timeoutId = setTimeout("killMenu()", 5000);

// crudely workaround the IE5 (and IE5.5 and IE6) 'list box always on-top' problem for the software
// download page (software.asp) where the 3 list boxes are called s, h and l
// there's one on the main menu (prefer.inc) called c

if (document.all) {
      if (document.getElementById('s')) {
        var sId = document.getElementById('s');
        sId.style.visibility = "hidden";
      }
  
     if (document.getElementById('h')) {
        var hId = document.getElementById('h');
        hId.style.visibility = "hidden";
     }

     if (document.getElementById('l')) {
        var lId = document.getElementById('l');
        lId.style.visibility = "hidden";
     }
     if (document.getElementById('c')) {
        var cId = document.getElementById('c');
        cId.style.visibility = "hidden";
     }
                   }

}
}