var http = false;
var lkurl = "http://www.liberalakvinnor.se/";
try {
	http = new ActiveXObject("msxml2.XMLHTTP");
	} catch (e) {
		try {
			http = new ActiveXObject("Mircosoft.XMLHTTP");
		} catch (e) {
			http = false;
		}
 }
 
if(!http && typeof XMLHttpRequest != 'undefined') {
	http = new XMLHttpRequest();
}


function show(div) {
	document.getElementById(div).style.display = "block";
}

function hide(div) {
	document.getElementById(div).style.display = "none";
}

function getPage(page, tlvl, oid) {
	if(oid != "press") {
		var ran_unrounded=Math.random()*5543543534543534;
		url = lkurl+"getmenu.php?main=0&oid="+oid+"&tlvl="+tlvl+"&r="+ran_unrounded;
		http.open("get", url);
		 http.onreadystatechange = function() {
			
		 if ((http.readyState == 4) && (http.status == 200)) {
				document.getElementById("sub").style.display = "block";
					if(http.responseText == "") {
						document.getElementById("sub").innerHTML = "<font color=white class=smeny>O</font>";
					} else {
						document.getElementById("sub").innerHTML = http.responseText; 
					}
			  } 
			 else {
				document.getElementById("sub").style.display = "block";
				document.getElementById("sub").innerHTML = "<font color=white class=smeny>O</font>"; 
			 }
		} 
	} else {
		document.getElementById("sub").innerHTML = "<a class=\"smeny\" href=\"" + lkurl + "Press\"> Pressmedelanden</a>&nbsp;&nbsp;&nbsp;&nbsp;<a class=\"smeny\" href=\"" + lkurl + "Artiklar\"> Artiklar</a>&nbsp;&nbsp;&nbsp;&nbsp;<a class=\"smeny\" href=\"" + lkurl + "Media\"> LK i media</a>&nbsp;&nbsp;&nbsp;&nbsp;<a class=\"smeny\" href=\"" + lkurl + "Pressbilder\"> Pressbilder</a>&nbsp;&nbsp;&nbsp;&nbsp;<a class=\"smeny\" href=\"" + lkurl + "Profil\"> Profil</a>";
	}
		 http.send(null); 
}
