function createHTTPHandler(){
    httphandler = false;
    /*@cc_on @*/
    /*@if (@_jscript_version >= 5)
    // JScript gives us Conditional compilation, we can cope with old IE versions.
    // and security blocked creation of the objects.
    try {
      httphandler = new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
      try {
       httphandler = new ActiveXObject("Microsoft.XMLHTTP");
      } catch (E) {
          httphandler = false;
      }
    }
    @end @*/
    if (!httphandler && typeof XMLHttpRequest!='undefined') {
        httphandler = new XMLHttpRequest();
    }
    return httphandler;
}

function fnZoek(x)
{
document.getElementById('divZoek').innerHTML = "<center><img src='../img/loading.gif'></center>";

var XMLHTTPObject = createHTTPHandler(); 
var link = "ajax_zoek.php?zoeken=" + x;
XMLHTTPObject.open('GET', link, true);
XMLHTTPObject.onreadystatechange=function() {
    if (XMLHTTPObject.readyState==4) {
	document.getElementById('divZoek').innerHTML = XMLHTTPObject.responseText;
    }
}
	XMLHTTPObject.setRequestHeader("Cache-Control", "no-cache");
	XMLHTTPObject.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
	XMLHTTPObject.setRequestHeader('Connection', 'close');
	XMLHTTPObject.send(null);
}
