function checkBoeking()
{
	var strError = '';
	
	if (trim($F('txtNaam')) == '') strError += ' - Vul een naam in<br />';
	if (trim($F('txtGemeente')) == '') strError += ' - Vul een gemeente in<br />';
	if (trim($F('txtTelefoon')) == '' && trim($F('txtEmail')) == '') strError += ' - Vul een telefoonnummer of een e-mail adres in<br />';
	if ($F('chkEmail') == null && $F('chkTelefoon') == null) strError += ' - Selecteer een manier waarop wij u mogen contacteren<br />';
	
	if (trim($F('txtAankomst')) == '') strError += ' - Vul de aankomstdatum in<br />';
	if (trim($F('txtVertrek')) == '') strError += ' - Vul de vertrekdatum in<br />';
	if (trim($F('txtVolwassenen')) == '') strError += ' - Vul het aantal volwassenen in<br />';
	if (trim($F('txtKinderen')) == '') strError += ' - Vul het aantal kinderen in in<br />';
	if (trim($F('txtKinderen')) != '0' && trim($F('txtLeeftijd')) == '') strError += ' - Vul de leeftijd van de kinderen in<br />';
	
	if (trim($F('txtCheck')) == '') strError += ' - Vul de anti-spam check in<br />';
	
	if (strError == '')
	{
		return true;
	}
	else
	{
		$('pError').style.display = 'block';
		$('divErrors').style.display = 'block';
		$('divErrors').innerHTML = '<strong>De volgende fouten zijn gevonden:</strong><br />' + strError;
		document.location = '#error';
		return false;
	}
}

function trim(value)
{
  value = value.replace(/^\s+/,''); 
  value = value.replace(/\s+$/,'');
  return value;
}
