function focus(champ)
		{
		document.getElementById(champ).focus();
		}

function verif_formulaire()
{	
	var messfinal ="";
	var mess="";
	var fois=0;
	
	if (fois == 0)
	{
		fois++;
		return true;
	
		if (document.form.email.value=='')
		{	
		mess ='- e-mail';
		messfinal+="\n"+mess;
		}
		else
		{
			validationEmail();
		}
		if (document.form.cp.value=='')
		{
		mess='- code postal';
		messfinal+="\n"+mess;
		}
		else
		{
			validationCp();
		}
				
		if (messfinal != "")
		{
			alert("merci de remplir les champs manquants :\n"+messfinal);return false;
		}
		else 
		{
			//document.form.action='mailto:easysun@live.fr?subject=Formulaire express';document.form.submit();}
			window.location.href="../php/deal.php?email="+email+"cp="+cp;			
			//return true;
		}
	}
	else 
	{
	alert("Vos données ont bien été envoyées !");
	return false;
	}
}

	function validationEmail()
	{
		var addemail 	= document.form.email.value;
			var verif 	= /^[a-z0-9._-]+@[a-z0-9.-]{2,}[.][a-z]{2,3}$/;
			if (verif.exec(addemail) == null)
			{
				alert('Votre email est incorrect');				
				messfinal+="\n"+mess;
									
			}
			else
			{		
				return true;
			}	
	}			

	function validationCp()
	{
		var addcp		= document.form.cp.value;
			var verifcp	= /^((0[1-9])|([1-8][0-9])|(9[0-8])|(2A)|(2B))[0-9]{3}$/;
			if (verifcp.exec(addcp)== null)
			{
				alert('Le code postal saisi est incorrect');
				messfinal+="\n"+mess;
									
			}
			else
			{
				return true;
			}
	}		


