		
		
		var app, os, ver, agt;
		app = navigator.appName;
		os = navigator.userAgent;
		ver = parseInt(navigator.appVersion)
		agt = navigator.userAgent.toLowerCase();
		
		ns4 = (app == "Netscape" && ver >= 4 && ver < 5)? 1:0
		ns5 = (app == "Netscape" && ver >= 5)? 1:0
		ie = (app == "Microsoft Internet Explorer" && ver == 4)? 1:0
		ie5 = (app == "Microsoft Internet Explorer" && ver == 4 && (agt.indexOf("msie 5.")!=-1))? 1:0
		ie6 = (app == "Microsoft Internet Explorer" && ver == 4 && (agt.indexOf("msie 6.")!=-1))? 1:0
		var is_opera = (agt.indexOf("opera") != -1);
	   var is_opera2 = (agt.indexOf("opera 2") != -1 || agt.indexOf("opera/2") != -1);
	   var is_opera3 = (agt.indexOf("opera 3") != -1 || agt.indexOf("opera/3") != -1);
	   var is_opera4 = (agt.indexOf("opera 4") != -1 || agt.indexOf("opera/4") != -1);
	   var is_opera5 = (agt.indexOf("opera 5") != -1 || agt.indexOf("opera/5") != -1);
		var is_opera6 = (agt.indexOf("opera 6") != -1 || agt.indexOf("opera/6") != -1);
	   var is_operaup = (is_opera && !is_opera2 && !is_opera3 && !is_opera4 && !is_opera5);
		pc = (os.indexOf("Win") != -1)? 1:0
		iefamily = (ie5 || ie6)? 1:0
		iepc = (iefamily) && (pc)? 1:0
		iemac = (iefamily) && (!pc)? 1:0
		browser = (iefamily) || (ns5) || (is_operaup)? 1:0
		
		if(!browser){
			// if users with non-standard-browsers should be redirected to infopage
			// document.location.href = "oldbrowser.htm"
		}	
		if(iemac) document.writeln('<style type="text/css" media="screen"> @import url(/home/lo/home.nsf/lo_macfix.css); </style>')
		
		rnd = Math.floor(Math.random()*8)+1		
		
		function getTop(){
			if (document.getElementById("center"))
				return document.getElementById("center").offsetTop;
			else
				return document.getElementById("leftColumn").offsetTop;
			}
		function getHeight(obj){return document.getElementById(obj).offsetHeight;}
		
		function setupPage(){
			topVal = getTop();
			if (document.getElementById("center"))
			{
				heightVal = getHeight("center")+30;
				leftheightVal = getHeight("left")+30;
				rightheightVal = getHeight("right")+30;
				if(leftheightVal > rightheightVal) tmpVal = leftheightVal;
				else tmpVal = rightheightVal;
				if(heightVal <= tmpVal){ 
					document.getElementById("pagefooter").style.top = topVal + tmpVal + "px";
				} else {
					fixH = heightVal + 20;
					document.getElementById("pagefooter").style.top = topVal + fixH + "px";
				}     
			} else if (document.getElementById("leftColumn"))
			{
				document.getElementById("rightColumn").style.top = topVal + "px";
				heightVal = getHeight("leftColumn")+30;
				rightheightVal = getHeight("rightColumn")+30;
				if(heightVal > rightheightVal)
					document.getElementById("pagefooter").style.top = topVal + heightVal + "px";
				else
					document.getElementById("pagefooter").style.top = topVal + rightheightVal + "px";
			}
			document.onmousemove = checkStatus;
			if (!ie) document.captureEvents(Event.MOUSEMOVE);
		} 
		
		function seeker()
		{
			if(document.getElementById("searchquery").value == "Sök här")
				{
					document.getElementById("searchquery").value = "";
					document.forms.SearchLO.submit();
				}
				else
				{
					document.forms.SearchLO.submit();
				}
		}
		
		window.onresize = function(e) 
		{
			setupPage();
		}
		
		onload = setupPage; 
