function controleChamp(champ)
{
	if(isNaN(champ.value))
	{
		alert('ce champ ne peut être que numérique')
		champ.focus();
		return false;
	}
	return true;
}

/*
ouverture popup pour les details d'un inscrit
*/
function OuvrirPopup(page,nom,option) {
       window.open(page,nom,option);
    }

/*
validation données avant desinscription
*/
function desinscription(form,idchamp)
{
	if(document.getElementById(idchamp).value.length==0)
	{
		alert('Veuillez donner une adresse email');
		document.getElementById(idchamp).focus();
	}
	else
	{
		document.form.method="post";
		document.form.action="index.php?menu=desinscription";
		document.form.submit();
	}
}
/*
validation données avant enregistrement
*/
function submitForm()
{
	if(document.getElementById("prenom").value.length==0 || document.getElementById("nom").value.length==0 || document.getElementById("adresse1").value.length==0 || document.getElementById("ufr").value.length==0 || document.getElementById("section").value.length==0 || document.getElementById("promotion").value.length==0 || document.getElementById("email").value.length==0 || document.getElementById("password").value.length==0)
	{
		alert('Veuillez remplir tous les champs obligatoires');
		//document.getElementById(idchamp).focus();
	}
	else
	{
		document.form1.method="post";
		document.form1.action="index.php?menu=inscription&req=enregistrer";
		document.form1.submit();
	}
}

//controle formulaire
function controleFormContact()
{
	if( (document.form.e_mail.value.length==0)||(document.form.sujet.value.length==0)||(document.form.message.value.length==0))
	{
		alert("Veuillez remplir tous les champs");
		return false;
	}
	else
	{
		return true;
	}
}
	
/*
function controleForm()
{
	if( (document.form1.prenom.length==0) || document.form1.nom.length==0) || document.form1.adresse1.length==0) || document.form1.ufr.length==0) || document.form1.section.length==0) || document.form1.promotion.length==0) )
	{
		alert('Vérifiez que tous les champs obligatoires sont bien remplis');
		return false;
	}
	else
	{
		return true;
	}
}*/
