function verifFormInfosGen(a)
{
	var civilite=document.form1.civilite_etudiant.value;
	var nom=document.form1.nom_etudiant.value;
	var prenom=document.form1.prenom_etudiant.value;
	var codepostal=document.form1.code_postal_etudiant.value;
	var ville=document.form1.ville_etudiant.value;
	var region=document.form1.region_candidat.value;
	var niveau=document.form1.niveau_etudes_etudiant.value;
	
	if(!(document.form1.sipassword))

	{
		if(civilite==""||nom==""||prenom==""||codepostal==""||ville==""||region==""||niveau=="")
		{
			alert("Vous n'avez pas rempli tous les champs obligatoires");
			return false;
		}
		else 
		{
			if (verifMail(a))
			{
				return true;
			}
			else
			{
				return false;
			}
		}
	}
	else
	{
		var login=document.form1.login_etudiant.value;
		var password=document.form1.password_etudiant.value;
		if(civilite==""||nom==""||prenom==""||codepostal==""||ville==""||region==""||niveau==""||login==""||password=="")
		{
			alert("Vous n'avez pas rempli tous les champs obligatoires");
			return false;
		}
		else 
		{
			if (verifMail(a))
			{
				return true;
			}
			else
			{
				return false;
			}
		}
	}
}

/*************************************/
function verifMail(a) 
{
	testm = false ;
	for (var j=1 ; j<(a.length) ; j++) 
	{
		if (a.charAt(j)=='@') 
		{ 
			if (j<(a.length-4))
			{ 
				for (var k=j ; k<(a.length-2) ; k++) 
				{ 
					if (a.charAt(k)=='.') testm = true; 
				} 
			} 
		} 
	} 
	
	if (testm==false) alert('Votre adresse e-mail est incorrecte.'); 
	return testm ; 
}

function verifLongeurChaine(a)
{
	//testm = false ;
	if(a.length < 35)
	{
		testm = true; 
	}else 
	{
		testm = false ;
	}
	if (testm==false) alert("Le message de bienvenue ne peut excéder 35 caractères !");
	return testm ; 
}
