function createRequestObject() {
           var req;
           if(window.XMLHttpRequest){
                  req = new XMLHttpRequest();
           } else if(window.ActiveXObject) {
                  req = new ActiveXObject("Microsoft.XMLHTTP");
           } else {
                  req = NULL;
                  alert('Probleem met het aanmaken van hetXMLHttpRequest object');
           }
           return req;
}

var http = createRequestObject();
function login_box() {
       http.open('get', '/ajax/login.ajax.php');
       http.onreadystatechange = handleResponse_loginbox;
       http.send(null);
}
function handleResponse_loginbox() {
       if(http.readyState == 4 && http.status == 200){
          if(http.responseText) {
             document.getElementById("loginbox").innerHTML = http.responseText;
          }
       }
}

