var brver,dh,wd,hg;
//näistä voi säädellä menun sijaintia
var toppiIE=21,toppiNS=21,leftiNS=-55,leftiIE=-40;



	function init(IEonloadADD) {
		if (document.all && opera == false) {
			// tässä tavataan IE
			var add = 0;
			//if (IEonloadADD) add=IEonloadADD;
			wd = document.body.clientWidth;
			hg = document.body.scrollTop;
			document.all.popavaa.style.left=wd+leftiIE+add;
			document.all.popavaa.style.top=hg+toppiIE;
			document.all.popup.style.left=wd+leftiIE+add-143;
			document.all.popup.style.top=hg+toppiIE;
			//document.all
			//alert("ie");
			//alert(wd);
			//alert(document.body.scrollTop);
		}
		else if (document.layers) {
			// tässä kohdataan netscape (ei 6)
			wd = window.innerWidth;
			hg = nshd; // from scroll_ns.js			
			document.layers.popavaa.left=wd+leftiNS;
			document.layers.popavaa.top=hg+toppiNS;
			document.layers.popup.left=wd+leftiNS-140;
			document.layers.popup.top=hg+toppiNS;
			//document.layers.position.
			//alert("ns");
			//alert(hg);
		}
		else if (document.getElementById || opera == true) {
			//tämä kummajainen on NS 6.0 ja OPERA
			wd = window.innerWidth;
			hg = nshd; // from scroll_ns.js
			//alert(document.getElementById("popup").style.left);			
			document.getElementById("popavaa").style.left=wd+leftiNS;
			document.getElementById("popavaa").style.top=hg+toppiNS;
			document.getElementById("popup").style.left=wd+leftiNS-143;
			document.getElementById("popup").style.top=hg+toppiNS;
			//document.layers.position.
			//alert(document.getElementById("popup").style.left);
			//alert(hg);
		}
	}
		
	function reload() {
		if (document.layers) {
			self.location.href=self.location.href;
		}
	}	
	function popup() {
		if (document.all) {
			document.all.popup.style.visibility = "visible";
		}
		else if (document.layers) {
			document.layers.popup.visibility = "show";
		}
		else if (document.getElementById) {
			document.getElementById("popup").style.visibility = "visible";
			//alert("haloo, onko ketään kotona vai ollaanko taas ullakolla");
		}
	}
	function hide_pop() {
		if (document.all) {
			document.all.popup.style.visibility = "hidden";
		}
		else if (document.layers) {
			document.layers.popup.visibility = "hide";
		}
		else if (document.getElementById) {
			document.getElementById("popup").style.visibility = "hidden";
		}				
	}
	function test() {
		alert("test");
	}
	
