/**
*	Validates the contact form
*	Show 1 error at a time
**/
function checkForm_nl() {
	
	var errors = new Array();

	if (!CheckNotEmpty('name')  && errors.length == 0) { 
	
		errors.push(CreateValidationErrorObject('name', 'U heeft geen naam ingevuld', 'input'));		
	}
	
	if (!CheckNotEmpty('firstname')  && errors.length == 0) { 
	
		errors.push(CreateValidationErrorObject('firstname', 'U heeft geen voornaam ingevuld', 'input'));		
	}
	
	if (!CheckNotEmpty('emailaddress')  && errors.length == 0) { 
	
		errors.push(CreateValidationErrorObject('emailaddress', 'U heeft geen emailadres ingevuld', 'input'));		
	}
	
	if (!CheckValidEmail('emailaddress')  && errors.length == 0) { 
	
		errors.push(CreateValidationErrorObject('emailaddress', 'U heeft geen geldig emailadres ingevuld', 'input'));		
	}
	
	
	if (!CheckNotEmpty('question')  && errors.length == 0) { 
	
		errors.push(CreateValidationErrorObject('question', 'U heeft geen vraag ingevuld', 'input'));		
	}
		
	if (errors.length == 0)
	{	
		/*subject="VPRO-lid worden";
		processForm(subject, formname);
		
		clearForm(true);
		scroll(0,0);
		*/
		
		//submit form
		return true;
	}
	else
	{	
		
		// Validation failed
		ShowValidationErrors(errors);
		
		return false;
	}

}


function checkForm_en() {
	
	var errors = new Array();

	if (!CheckNotEmpty('name')  && errors.length == 0) { 
	
		errors.push(CreateValidationErrorObject('name', 'Title is required', 'input'));		
	}
	
	if (!CheckNotEmpty('firstname')  && errors.length == 0) { 
	
		errors.push(CreateValidationErrorObject('firstname', 'Firstname is required', 'input'));		
	}
	
	if (!CheckNotEmpty('emailaddress')  && errors.length == 0) { 
	
		errors.push(CreateValidationErrorObject('emailaddress', 'Email is required', 'input'));		
	}
	
	if (!CheckValidEmail('emailaddress')  && errors.length == 0) { 
	
		errors.push(CreateValidationErrorObject('emailaddress', 'Please use a valid email address', 'input'));		
	}
	
	
	if (!CheckNotEmpty('question')  && errors.length == 0) { 
	
		errors.push(CreateValidationErrorObject('question', 'Question is required', 'input'));		
	}
		
	if (errors.length == 0)
	{	
		/*subject="VPRO-lid worden";
		processForm(subject, formname);
		
		clearForm(true);
		scroll(0,0);
		*/
		
		//submit form
		return true;
	}
	else
	{	
		
		// Validation failed
		ShowValidationErrors(errors);
		
		return false;
	}

}
