//Biblioth\u00E8que utilis\u00E9e pour la Mailing List//-------------------------------------------------------------------------------------------------// v\u00E9rification des champs  avant envoie du formulaire en fonction du // type de validation et de la langue//-------------------------------------------------------------------------------------------------function ValidationForm(validationtype) {	if ((validationtype=='all') || (validationtype=='mail')) 		if ( document.getElementById('ml_email') != null )  // champ email			if  ( document.getElementById('ml_email').value == "" ) {					switch (PageLang){					case "fr" :  alert( "L'adresse mail est un champ obligatoire.") ;					break;					case "en" :   alert( "Mail address is a mandatory field.") ;					break;							default : alert( "L'adresse mail est un champ obligatoire.") ;				}				document.getElementById('ml_email').focus();					return false;			}			else {				vat =  document.getElementById('ml_email').value.indexOf("@",1);				vpoint =  document.getElementById('ml_email').value.indexOf(".",vat+1);				if ((vat <= -1)||( document.getElementById('ml_email').value.length <=2)||(vpoint <= 1)) {					switch (PageLang){					case "fr" :  alert( "Veuillez saisir une adresse e-mail valide!") ;					break;					case "en" :   alert( "Input a real e-mail") ;					break;							default : alert( "Veuillez saisir une adresse e-mail valide!") ;					}				document.getElementById('ml_email').focus();					return false;				}			}	if ((validationtype=='all') || (validationtype=='pwd')) 		if ( document.getElementById('ml_pwd') != null )   // test champ password			if  ( document.getElementById('ml_pwd').value == "" ) {				switch (PageLang){					case "fr" :  alert( "Le mot de passe est un champ obligatoire.") ;					break;					case "en" :  alert( "The password is a mandatory field.") ;					break;					default :  	alert( "Le mot de passe est un champ obligatoire.") ;									}	 			document.getElementById('ml_pwd').focus();				return false;			}	return true;	}//-------------------------------------------------------------------------------------------------// OuvrirMailing()  pour ouvrir une fiche mailing en \u00E9dition pour // modification des pr\u00E9f\u00E9rences//-------------------------------------------------------------------------------------------------function OuvrirMailing() {	if ( ValidationForm('all') == true )		document.location.href=DBase+'wUsingMailingList?OpenAgent&lang='+PageLang+'&mail='+document.getElementById('ml_email').value+'&pwd='+document.getElementById('ml_pwd').value;}//-------------------------------------------------------------------------------------------------// FinMailing()  pour desinscription//-------------------------------------------------------------------------------------------------function FinMailing() {	if ( ValidationForm('all') == true ){		document.location.href=DBase+'wUsingMailingList?OpenAgent&lang='+PageLang+'&mail='+document.getElementById('ml_email').value+'&pwd='+document.getElementById('ml_pwd').value+'&unsubscribe';	}}//-------------------------------------------------------------------------------------------------// ForgotPassword()  pour renvoyer le mot de passe oubli\u00E9 par l'utilisateur//-------------------------------------------------------------------------------------------------function ForgotPassword() {	if ( ValidationForm('mail') == true ){		document.location.href=DBase+'wUsingMailingList?OpenAgent&lang='+PageLang+'&mail='+document.getElementById('ml_email').value+'&pwd='+document.getElementById('ml_pwd').value+'&forgotpwd';	}}
