// copyright hansmooiman.nl 2007-2000.

function pullpage(modus,eurl,espan) {

var xmlhttp=null;
 if(window.XMLHttpRequest)
  { xmlhttp = new XMLHttpRequest(); }
  else if(window.ActiveXObject) {
    var ie_versions = ["MSXML2.XMLHttp.5.0", "MSXML2.XMLHttp.4.0","MSXML2.XMLHttp.3.0", "MSXML2.XMLHttp","Microsoft.XMLHttp"];

    for(var i=0; i <ie_versions.length; i++) {
      try {
        xmlhttp = new ActiveXObject(ie_versions[i]);
      }
      catch (error) {}
    }
}


xmlhttp.onreadystatechange = function()
{



if(xmlhttp.readyState==4) {
if(xmlhttp.status==200)
{
document.getElementById(espan).innerHTML="" +  xmlhttp.responseText;
Effect.BlindDown('zoeken', { duration: 5.0 });

}
else
{
document.getElementById(espan).innerHTML="Error: returned status code " +  xmlhttp.status + " " +  xmlhttp.statusText;
}
}
}

xmlhttp.open("GET", eurl, true);
xmlhttp.setRequestHeader("Content-Type", "text/html; charset=iso-8859-1");
if(window.XMLHttpRequest)
xmlhttp.send(null);
else if (window.ActiveXObject)
xmlhttp.send();
}


				function submitSearch(theForm) {
			
				var poststr = 'q='+theForm; 
				if (theForm.length>=0) {
        pullpage(3,'http://www.hansmooiman.nl/include/ajax/zoek.php?'+poststr,'zoekresultaat');
        }
				}
