﻿//	Mouseover for undermeny i bunnen av siden
function mouseOver(id){
	var element = document.getElementById('element'+id);
	var href = document.getElementById('href'+id);

		element.style.visibility = 'visible';
		element.style.height = '92px';
		element.style.overflow = 'visible';
}

function mouseOut(id){
	var element = document.getElementById('element'+id);
	var href = document.getElementById('href'+id);

		element.style.visibility = 'hidden';
		element.style.height = '0px';					
		element.style.overflow = 'hidden';
}	




// Suckerfish
startList = function() {
if (document.all&&document.getElementById) {
navRoot = document.getElementById("nav");
for (i=0; i<navRoot.childNodes.length; i++) {
node = navRoot.childNodes[i];
if (node.nodeName=="LI") {
node.onmouseover=function() {
this.className+=" over";
  }
  node.onmouseout=function() {
  this.className=this.className.replace(" over", "");
   }
   }
  }
 }
}
window.onload=startList;



//	Klikk for å få vise underpunkter i dropdown
	var idt=new Array('show1', 'show2', 'show3', 'show4', 'show5', 'show6', 'show7', 'show8', 'show9');

function changeme(id){	
	hideallidt();
	showdivt(id);
}

function hideallidt(){
	//loop through the array and hide each element by id
	for (var i=0;i<idt.length;i++){
		hidedivt(idt[i]);
	}		  
}

function hidedivt(id) {
	//safe function to hide an element with a specified id
	if (document.getElementById(id)) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'none';
	}
	else {
		if (document.layers) { // Netscape 4
			document.id.display = 'none';
		}
		else { // IE 4
			document.all.id.style.display = 'none';
		}
	}
}

function showdivt(id) {
	//safe function to show an element with a specified id
		  
	if (document.getElementById(id)) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'block';
	}
	else {
		if (document.layers) { // Netscape 4
			document.id.display = 'block';
		}
		else { // IE 4
			document.all.id.style.display = 'block';
		}
	}
}
