http = null;  // global

function createHTTPHandler()
{
    httphandler = false;
    // branch for native XMLHttpRequest object
    if(window.XMLHttpRequest) 
    {
      try 
      {
      httphandler = new XMLHttpRequest();
        } catch(e) 
        {
      httphandler = false;
        }
    // branch for IE/Windows ActiveX version
    } 
    else if(window.ActiveXObject) 
    {
          try 
          {
            httphandler = new ActiveXObject("Msxml2.XMLHTTP");
          } catch(e) 
          {
            try 
            {
                httphandler = new ActiveXObject("Microsoft.XMLHTTP");
            } catch(e) 
            {
                httphandler = false;
            }
      }
    }
    return httphandler;
}


/////////////////////////////////////////////////////////////////////////////
// gebruik van Ajax

function handleHttpResponse()
{

	if (http.readyState == 1 || http.readyState=="loading") 
	 { 
	   document.getElementById('content').innerHTML = "";    
	 } 

  if(http.readyState == 4)
  {
	document.getElementById('content').innerHTML = http.responseText;
  }
}

function navigeer(pagina)
{
  http = createHTTPHandler();
  url = "?pagina=" + pagina;
  http.open("GET", url, true);
  http.onreadystatechange =  handleHttpResponse;
  http.send(null);
}

