// JavaScript Document

function FocusText(BoxName) {
	if (BoxName.value == BoxName.defaultValue) {
		BoxName.value = '';
	}
}
function BlurText(BoxName) {
	if (BoxName.value == '') {
		BoxName.value = BoxName.defaultValue;
	}
}

function valide_email(vmail) {

   var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
   if(reg.test(vmail) == false) {
      alert('Votre adresse email n\'est pas valide.');
   }
   else
   {
	d = new Date();

	mois = String(d.getMonth() + 1);
	if (mois.length==1) {mois = "0" + mois;}
		document.form_nl.date_sous.value = d.getDate()+"/"+mois+"/"+d.getFullYear();
		document.form_nl.action = "newsletter/enreg_newsletter.asp";
		document.form_nl.submit();   
	}
}

if (window.location.search!="") {
	tmp_nl = window.location.search.split("?");
	if (tmp_nl.length > 0) {
		if (tmp_nl[1]=="-1") {
			alert("Vous êtes déjà inscrit avec cet email.");
		}
		else
		{
			if (tmp_nl[1]=="1") {
				alert("Votre inscription a été validée.");
			}
		}
	}
}




 
 