/*--------------------------------------------------------------------------*/
/*	Programmeur	:	Joel Maheux					(jmaheux@logicon.ca)		*/
/*	Module	:	2.2 - Pour nous joindre										*/
/*	Dernière modification	:	31 janvier 2002								*/
/*--------------------------------------------------------------------------*/


//	Fonction qui valide le contenu du formulaire "Pour nous écrire"
function Valider (Formulaire)
{

	//	Déclaration du message d'erreur
	MSG_ERREUR = "One or more fields have not been completed or the data entered is not in a valid format. Thank you.";
	
	//	Validation du nom
	if (Formulaire.txtNom.value.length == 0)
	{
		alert ("Please indicate your first name and last name.");
		return false;
	}
	
	//	Validation du prénom
	if (Formulaire.txtPrenom.value.length == 0)
	{
		alert ("Please indicate your first name and last name.");
		return false;
	}
	
	//	Validation du prénom
	if (Formulaire.txtTelephone.value.length == 0)
	{
		alert ("Please enter the telephone number associated to your Télébec phone service. If you have no phone service with us, indicate a phone number where we can reach you.");
		return false;
	}
	
	//	Validation du courriel
	if (Valider_email (Formulaire.txtCourriel.value) == 0)
	{
		alert ("The email address you entered is not a valid format. Please make sure that it contains a name, the ' @ ' symbol, and the domain name (ex:  name@domainname.qc.ca).");
		return false;
	}
	
	//	Validation du choix
	if ((Formulaire.optChoix[0].checked == false) && (Formulaire.optChoix[1].checked == false) && (Formulaire.optChoix[2].checked == false) && (Formulaire.optChoix[3].checked == false) && (Formulaire.optChoix[4].checked == false) && (Formulaire.optChoix[5].checked == false) && (Formulaire.optChoix[6].checked == false) && (Formulaire.optChoix[8].checked == false))
	{
		alert ("Please check the reason of your request.");
		return false;
	}
	
	//	Validation du commentaire
	if (Formulaire.txtCommentaires.value.length == 0)
	{
		alert ("Please give us all the details related to your request in the comments zone.");
		return false;
	}
	
	return true;
	
}