// JavaScript Document
// JavaScript Document
function verifSelectionContacts()
{
	if (document.mail_form.champ1.value == "")
	{
		alert("Veuillez preciser votre civilite");
		return false;
	}
	
	if (document.mail_form.champ2.value == "")
	{
		alert("Veuillez preciser votre nom");
		return false;
	}
	if (document.mail_form.zone_email.value == "")
	{
		alert("Veuillez preciser votre courrier electronique");
		return false;
	}

	invalidChars = " /:,;'"

	for (i=0; i<invalidChars.length; i++)
	{	// does it contain any invalid characters?
		badChar = invalidChars.charAt(i);

		if (document.mail_form.zone_email.value.indexOf(badChar,0) > -1)
		{
			alert("Votre adresse e-mail contient des caracteres invalides. Veuillez verifier.");
			document.mail_form.zone_email.focus();
			return false;
		}
	}

	atPos = document.mail_form.zone_email.value.indexOf("@",1);			// there must be one "@" symbol
	if (atPos == -1)
	{
		alert('Votre adresse e-mail ne contient pas le signe "@". Veuillez verifier.');
		document.mail_form.zone_email.focus();
		return false;
	}

	if (document.mail_form.zone_email.value.indexOf("@",atPos+1) != -1)
	{	// and only one "@" symbol
		alert('Il ne doit y avoir qu\'un signe "@". Veuillez vrifier.')
		document.mail_form.zone_email.focus();
		return false;
	}

	periodPos = document.mail_form.zone_email.value.indexOf(".",atPos);

	if (periodPos == -1)
	{					// and at least one "." after the "@"
		alert('Vous avez oublie le point "." apres le signe "@". Veuillez verifier.');
		document.mail_form.zone_email.focus();
		return false;
	}

	if (periodPos+3 > document.mail_form.zone_email.value.length)
	{		// must be at least 2 characters after the 
		alert('Il doit y avoir au moins deux caractres apres le signe ".". Veuillez verifier.');
		document.mail_form.zone_email.focus();
		return false;
	}
} // Fin de la fonction

function verifSelectionContactsCN()
{
	if (mail_form.champ1.value == "")
	{
		alert("请详细填写您的性别");
		return false;
	}
	if (mail_form.champ2.value == "")
	{
		alert("请详细填写您的姓");
		return false;
	}
	if (mail_form.zone_email.value == "")
	{
		alert("请详细填写您的电子邮件");
		return false;
	}

	invalidChars = " /:,;'"

	for (i=0; i<invalidChars.length; i++)
	{	// does it contain any invalid characters?
		badChar = invalidChars.charAt(i);

		if (mail_form.zone_email.value.indexOf(badChar,0) > -1)
		{
			alert("请检查您的电子邮件");
			mail_form.zone_email.focus();
			return false;
		}
	}

	atPos = mail_form.zone_email.value.indexOf("@",1);			// there must be one "@" symbol
	if (atPos == -1)
	{
		alert('请检查您的电子邮件');
		mail_form.zone_email.focus();
		return false;
	}

	if (mail_form.zone_email.value.indexOf("@",atPos+1) != -1)
	{	// and only one "@" symbol
		alert('请检查您的电子邮件');
		mail_form.zone_email.focus();
		return false;
	}

	periodPos = mail_form.zone_email.value.indexOf(".",atPos);

	if (periodPos == -1)
	{					// and at least one "." after the "@"
		alert('请检查您的电子邮件');
		mail_form.zone_email.focus();
		return false;
	}

	if (periodPos+3 > mail_form.zone_email.value.length)
	{		// must be at least 2 characters after the 
		alert('请检查您的电子邮件');
		mail_form.zone_email.focus();
		return false;
	}
} // Fin de la fonction
