var sErreur_FR = 'Veuillez entrer une adresse courriel valide afin de vous inscrire.';
var sSucces_FR = 'Merci! Votre adresse courriel sera ajoutée.';
var sErreur_EN = 'Please provide a valid e-mail address.';
var sSucces_EN = 'Thank you! Your e-mail address has been received.';

function isEmail(string)
{
	return (string.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) != -1);
}

function validerFormulaire(sErr, sSucc)
{
	var oCourriel = document.inscription.listecourriel;
	if ((oCourriel.value==null) || (oCourriel.value==""))
	{
		alert(sErr);
		oCourriel.focus();
		return(false);
	}
	if (isEmail(oCourriel.value) == false)
	{
		alert(sErr);
		oCourriel.value = "";
		oCourriel.focus();
		return(false);
	}
	alert(sSucc);
	return(true);
 }

