// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults

function validateEmailAndSend(formId) {
	reg = new RegExp("^.*@.*\..*$",'g');
	checkEmail = window.document.forms[formId].email.value;
	if (!reg.test(checkEmail))
	{
		alert("L'adresse email est invalide ou innexistante. Nous ne pouvons pas envoyer le message.");
		return false;
	} else
		window.document.forms[formId].submit();
}