//Laddar en sida in i en div. 
function ahah(url, target) {
  document.getElementById(target).innerHTML = ' Laddar sida...';
  if (window.XMLHttpRequest) {
    req = new XMLHttpRequest();
  } else if (window.ActiveXObject) {
    req = new ActiveXObject("Microsoft.XMLHTTP");
  }
  if (req != undefined) {
    req.onreadystatechange = function() {ahahDone(url, target);};
    req.open("GET", url, true);
    req.send("");
  }
}  

function ahahDone(url, target) {
  if (req.readyState == 4) { // only if req is "loaded"
    if (req.status == 200) { // only if "OK"
      document.getElementById(target).innerHTML = req.responseText;
    } else {
      document.getElementById(target).innerHTML=" Dynamic load error:\n"+ req.status + "\n" +req.statusText;
    }
  }
}

function load(name, div) {
	ahah(name,div);
	return false;
}


var Lst;
function selectActive(obj) {
 if (typeof(obj)=='string') obj=document.getElementById(obj);
 if (Lst) Lst.className='';
 obj.className='sidemenuselected';
 Lst=obj;
}

function logMeIn(user,pass) {
	window.open('http://asp.5d.se/scripts/cgiip.exe/WService=wsWeblord/sys/sysdologin.htm?login=' + user + '&password=' + pass,'Weblord','width=1024,height=768');
}


