// JavaScript Document

function leftHeight() {
	var windowWidth;
	var windowHeight;
	
	if(window.addEventListener) {
		windowWidth = window.innerWidth;
		windowHeight = window.innerHeight;
	}
	else {
		windowWidth = document.documentElement.clientWidth ||
		document.body.clientWidth;
		windowHeight = document.documentElement.clientHeight ||
		document.body.clientHeight;
	}
	
	var menyLeft = document.getElementById("menyLeft").offsetHeight;
	
	windowHeight = windowHeight-menyLeft-109;
	
	document.getElementById("menyLogin").style.height = windowHeight + 'px';
}

function change(div) {
	document.getElementById(div).style.backgroundImage = 'url(/grafikk/loader.gif)';
	document.getElementById(div).style.width = '220px';
	document.getElementById(div).style.height = '19px';
}

function showDiv(div) {
	document.getElementById(div).style.display = "block";
}

function hideDiv(div) {
	document.getElementById(div).style.display = "none";
}

function vis_skjul(div)
{
	var el = document.getElementById(div);
	
	if(el.style.display == "" || el.style.display == "block"){
		el.style.display = "none";
	}
	else {
		el.style.display = "block";
	}
}

