function StartRequest() {
	var xmlHttp;
  try
    {
    // Firefox, Opera 8.0+, Safari
    xmlHttp=new XMLHttpRequest();
    }
  catch (e)
    {
    // Internet Explorer
    try
      {
      xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
      }
    catch (e)
      {
      try
        {
        xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
        }
      catch (e)
        {
        alert("Your browser does not support AJAX!");
        return false;
        }
      }
    }
    return xmlHttp;
}

function GetContents(page) {
	var xmlHttp;
	xmlHttp = StartRequest();
	xmlHttp.onreadystatechange=function(){
		if(xmlHttp.readyState==4){
			document.getElementById('content').innerHTML = xmlHttp.responseText; 
		}
	}
	xmlHttp.open("GET","include/contents.php?p="+page,true); //GET kan een probleem vormen met het beperkt aantal tekens, check evt POST
	xmlHttp.send(null);
}

function CheckForm(TheForm) {
	if(TheForm.elements[0].value == '' || TheForm.elements[1].value == '' || TheForm.elements[2].value == '') {
		alert("Je hebt niet alles ingevuld");
		return false;
	} else {
		return true;
	}
}

function CheckMail(TheForm) {
	if(TheForm.elements[0].value == '') {
		alert("Je moet wel een e-mailadres invullen!");
		return false;
	} else {
		return true;
	}
}
