function validateRegistration() {
	var nbrOfErrors = 0;
	nonEmptyFields = ['#childName', '#parentName', '#email', '#phone1', '#birthDate', '#summerAddress'];
	for ( var i in nonEmptyFields ) {
		var field = nonEmptyFields[i];
		if ( $(field).val().replace(/\s/g,"") == "" ) {
			fieldColor(field, 'red');
			nbrOfErrors++;
		} else {
			fieldColor(field, 'green');
		}
	}
	var validEmail =  /^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
	if ( ! validEmail.test($('#email').val()) ) {
		fieldColor('#email', 'red');
		nbrOfErrors++;
	} else {
		fieldColor('#email', 'green');
	}
	var validBirthDate = /^([0-9]{6}|[0-9]{8})$/i;
	if ( ! validBirthDate.test($('#birthDate').val()) ) {
		fieldColor('#birthDate', 'red');
		nbrOfErrors++;
	} else {
		fieldColor('#birthDate', 'green');
	}
	if ( nbrOfErrors > 0 ) {
		return false;
	}
	return true;
}

function fieldColor(field, color) {
	$(field).css('border', '1px solid '+color);
}
