/**
 *		validateContactEmail()
 *
 *		Validatie van het e-mail veld in het contact formulier.
 **/
function validateContactEmail()
{
	// Get email
	var strEmail = $( "#idInput_Email" ).val();
	
	if ( strEmail.length == 0 )
	{
		alert( "Vul alstublieft uw e-mailadres in." );
		$( "#idInput_Email" ).get( 0 ).focus();
		return false;
	}
	
	if ( ! isValidEmailAddress( strEmail ) )
	{
		alert( "Het ingevulde e-mailadres is onjuist." );
		$( "#idInput_Email" ).get( 0 ).focus();
		return false;
	}

	// Valid
	return true;
}



/**
 *		isValidEmailAddress()
 *		---------------------
 *
 *		Controleert de syntax van een emailadres.
 *
 *
 *		@param			String		Emailadres
 *		@return			Boolean		Validatie resultaat
 *
 *		@author			Dennis Siemensma
 *		@since			25-01-2008
 **/
function isValidEmailAddress( strEmailAddress ) {
	return strEmailAddress.match( /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/ );
}
