
// verifie si l'adresse email est au bon format
// a : chaine adresse email

function verifMail(a) {

	testm = false ;
	
	for (var j=1 ; j<(a.length) ; j++) {		//pour chaque caractre
	
		if (a.charAt(j)=='@') {				// cherche l'@
			if (j<(a.length-4)){					// 4 caractère après le @
				for (var k=j ; k<(a.length-2) ; k++) {
					if (a.charAt(k)=='.') testm = true;		 // un point
				}
			}
		}
	}
	
	if (testm==false) alert('Votre adresse e-mail est incorrecte.');
	
	return testm ;

}
