var xmlHttp
var xmlHttp1
var diven

function makeRequest(page,div){

diven = div;

xmlHttp=GetXmlHttpObject()
 if (xmlHttp==null){
  alert('Webbläsaren stödjer inte HTTP-Begärningar')
  return
 }
xmlHttp.onreadystatechange = stateChanged
xmlHttp.open("GET", page + "&rnd="+ Math.random(), true)
xmlHttp.send(null)
}

function stateChanged() {
 if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") {
  document.getElementById(diven).innerHTML = xmlHttp.responseText;
  document.getElementById('loadern').style.display = 'none';
 } else {
  //document.getElementById('loadern').style.display = 'inline-block';
 }
}




function makeRequest2(page,div){
xmlHttp1=GetXmlHttpObject()
 if (xmlHttp1==null){
  alert('Webbläsaren stödjer inte HTTP-Begärningar')
  return
 }
xmlHttp1.onreadystatechange = stateChanged1
xmlHttp1.open("GET", page + "&rnd="+ Math.random(), true)
xmlHttp1.send(null)
}

function stateChanged1() {
 if (xmlHttp1.readyState==4 || xmlHttp1.readyState=="complete") {
  document.getElementById('mypriv').innerHTML = xmlHttp1.responseText;
  document.getElementById('loadern').style.display = 'none';
 } else {
  document.getElementById('loadern').style.display = 'inline';
 }
}

function getprofile(aID){
var anvID = aID;

xmlHttp5=GetXmlHttpObject()

 if (xmlHttp5==null){
  alert('Webbläsaren stödjer inte HTTP-Begärningar')
  return
 }
xmlHttp5.onreadystatechange = stateChanged5
xmlHttp5.open("GET","databas.asp?d=hamtaprofil&aID="+ anvID +"&rnd="+ Math.random(), true)
xmlHttp5.send(null)
}

function stateChanged5() {
 if (xmlHttp5.readyState==4 || xmlHttp5.readyState=="complete") {
  document.getElementById('submeny8').innerHTML = xmlHttp5.responseText;
 }
}

function GetXmlHttpObject(){
var objXMLHttp=null
if (window.XMLHttpRequest){
objXMLHttp = new XMLHttpRequest()
}
else if (window.ActiveXObject){
objXMLHttp = new ActiveXObject("Microsoft.XMLHTTP")
}
return objXMLHttp
}


