var curentPage;

menuOn = new Image();
menuOn.src = "images/menuOn.gif";
menuOff = new Image();
menuOff.src = "images/menuOff.gif";

function menu(page){
	curentPage = page;
	eval("document.menu0" + page + ".src = menuOn.src;");
}

// popuppscript

function popup(url, name, w, h) {
	var posY = (screen.availHeight/2)-210;
	var posX = ((screen.availWidth-12)/2)-275;
	ImgDisplay = window.open(url, name, 'width='+w+',height='+h+',scrollbars=no,left='+posX+',top='+posY);
}

// popuppscript end



// funktion för att växla miljöpolicylager

var focusPart = "";

if (navigator.appName == "Microsoft Internet Explorer") {
	var divRef="document.all.";
	var styleRef=".style";
	var showRef="visible";
	var hideRef="hidden";
} 
else if (document.getElementById) {
	var divRef = "document.getElementById('";
	var styleRef = "').style";
	var showRef="visible";
	var hideRef="hidden";
} 
else if (document.layers) {
	var divRef="document.holder.document.";
	var styleRef="";
	var showRef="show";
	var hideRef="hide";
}

function swapContent(part) {
	if (focusPart == "") {
		eval(divRef + part + styleRef + ".visibility=" + 'showRef');
		focusPart=part;
	} else {
		eval(divRef + focusPart + styleRef + ".visibility=" + 'hideRef');
		eval(divRef + part + styleRef + ".visibility=" + 'showRef');
		focusPart=part;
	}
}