//
//*-------------------------------------------------------------------------------------------*
//*-- Fonction permettant d'ouvrir une popup centrée en fontion de la taille donnée			--*
//*-- options: toolbar=no,location=no,directories=no,menuBar=no,scrollbars=no,resizable=no	--*
//*-------------------------------------------------------------------------------------------*
//
function openpopup(urlpage,largeur,hauteur,options)
{
	var top=(screen.height-hauteur)/2;
	var left=(screen.width-largeur)/2;
	fen = window.open(urlpage,"_blank","top="+top+",left="+left+",width="+largeur+",height="+hauteur+","+options);
}
function submit_formulaire()
{
	setTimeout('document.formulaire.submit()',1000);
}
function OpenPopup(formulaire)
{
	if (formulaire.ListeUrl.selectedIndex != 0)
		{
		window.open(formulaire.ListeUrl.options[formulaire.ListeUrl.selectedIndex].value,'fenetre','top=0,left=0');
	 	}
}
//
function verifEMail(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; 
				} 
			} 
		} 
	} 
	return testm ; 
}

function verifMail(theForm)
{
	if (theForm.email.value == "")
	{
		alert("Tapez une valeur pour le champ \"E-mail\".");
		theForm.email.focus();
		return (false);
	}
	else if (verifEMail(theForm.email.value)==false)
	{
		alert("Champ \"E-mail\" incorrect.");
		theForm.email.focus();
		return (false);
	}
  	else 
	{
		submit();
	}
}
