	tailleMaxTexteDiscussion = 20480;
	messsageTexteDiscussion = "Attention votre Commentaire est trop volumineux, veuillez réduire votre texte de manière à ne pas dépasser " + (tailleMaxTexteDiscussion - 200) + " caractères.";

	function animertextegauche1(){
		if(!isNull(document.getElementById("styl_textsurimage_g1"))){document.getElementById("styl_textsurimage_g1").className= "styl_textsurimage_g11";}
		if(!isNull(document.getElementById("image_soiree"))){document.getElementById("image_soiree").style.cursor='pointer';}
	}
	function retablirtextegauche1(){
		if(!isNull(document.getElementById("styl_textsurimage_g1"))){document.getElementById("styl_textsurimage_g1").className= "styl_textsurimage_g1";}
		if(!isNull(document.getElementById("image_soiree"))){document.getElementById("image_soiree").style.cursor='auto';}
	}

	function animertextegauche2(){
		if(!isNull(document.getElementById("styl_textsurimage_g2"))){document.getElementById("styl_textsurimage_g2").className= "styl_textsurimage_g22";}
		if(!isNull(document.getElementById("image_consert"))){document.getElementById("image_consert").style.cursor='pointer';}
	}
	function retablirtextegauche2(){
		if(!isNull(document.getElementById("styl_textsurimage_g2"))){document.getElementById("styl_textsurimage_g2").className= "styl_textsurimage_g2";}
		if(!isNull(document.getElementById("image_consert"))){document.getElementById("image_consert").style.cursor='auto';}
	}

	function animertextegauche3(){
		if(!isNull(document.getElementById("styl_textsurimage_g3"))){document.getElementById("styl_textsurimage_g3").className= "styl_textsurimage_g33";}
		if(!isNull(document.getElementById("image_danse"))){document.getElementById("image_danse").style.cursor='pointer';}
	}
	function retablirtextegauche3(){
		if(!isNull(document.getElementById("styl_textsurimage_g3"))){document.getElementById("styl_textsurimage_g3").className= "styl_textsurimage_g3";}
		if(!isNull(document.getElementById("image_danse"))){document.getElementById("image_danse").style.cursor='auto';}
	}

	function animertextegauche4(){
		if(!isNull(document.getElementById("styl_textsurimage_g4"))){document.getElementById("styl_textsurimage_g4").className= "styl_textsurimage_g44";}
		if(!isNull(document.getElementById("image_chigoma"))){document.getElementById("image_chigoma").style.cursor='pointer';}
	}
	function retablirtextegauche4(){
		if(!isNull(document.getElementById("styl_textsurimage_g4"))){document.getElementById("styl_textsurimage_g4").className= "styl_textsurimage_g4";}
		if(!isNull(document.getElementById("image_chigoma"))){document.getElementById("image_chigoma").style.cursor='auto';}
	}

    // Supprime les espaces inutiles en début et fin de la chaîne passée en paramètre.
    function trim(aString){
        if(aString == null){ 
            return null;
        }else{
            var leString = '' + aString + '';
            return leString.replace(/^\s+/g, '').replace(/\s+$/g, '');
        }
    }

    // Supprime les espaces inutiles en début de la chaîne passée en paramètre.
    function ltrim(aString) {
        if(aString == null){ 
            return null;
        }else{
            var leString = '' + aString + '';
            return leString.replace(/^\s+/g, '');
        }
    }

    // Supprime les espaces inutiles en fin de la chaîne passée en paramètre.
    function rtrim(aString) {
        if(aString == null){ 
            return null;
        }else{
            var leString = '' + aString + '';
            return leString.replace(/\s+$/g, '');
        }
    }

    function chaineVide(texte){
        if(isNull(document.getElementById(texte))){
            return (1 == 1);
        }else{
            return (trim(document.getElementById(texte).value) == '');
        }
    }

    function getValeurChamp(nomduchamp){
        if(isNull(document.getElementById(nomduchamp))){
            return "";
        }else{
            return trim(document.getElementById(nomduchamp).value);
        }
    }

    function setValeurChamp(nomduchamp, valeur){
        if(!isNull(document.getElementById(nomduchamp))){
            document.getElementById(nomduchamp).value = valeur;
        }
    }

    function setSelectOptionValue(id_select, num_index_option, valeur){
        if(!isNull(document.getElementById(id_select))){
            document.getElementById(id_select).options[num_index_option].value = valeur;
        }
    }

    function selectionnerSelectOption(id_select, num_index_option){
        if(!isNull(document.getElementById(id_select)) && isNumeric(num_index_option)){        
            document.getElementById(id_select).options[num_index_option].selected = true;
        }
    }

    function setClasseName(id_champ, classe_name){
        if(!isNull(document.getElementById(id_champ))){
            document.getElementById(id_champ).className = classe_name;
        }
    }

    function isNull(variable){
        return variable == null;
    }

    function vide(texte){
        return (texte == "");
    }

	function validerChampsInscription(){
	 	champ1 = "nom";
		champ2 = "prenom";
		champ3 = "voie";
		champ4 = "codepostal";
		champ5 = "ville";
		champ6 = "email";
		champ7 = "telephone1";
		champ8 = "imagecriptee";
		champ9 = "login";
		champ10 = "motdepasse";
		champ11 = "remotdepasse";

		if(chaineVide(champ1) || chaineVide(champ2) || chaineVide(champ3) || chaineVide(champ4) || chaineVide(champ5) || chaineVide(champ6) || chaineVide(champ7) || chaineVide(champ8) || chaineVide(champ9) || chaineVide(champ10) || chaineVide(champ11)){
			alert(getMessage("champsobligatoires"));
		}else{
			if(getValeurChamp(champ10) != getValeurChamp(champ11)){
				alert(getMessage("motdepasseidentique"));
			}else{
				var email = getValeurChamp(champ6);
				if(!validerEmail(email)){
					alert(getMessage("emailvalide"));
				}else{
					document.formInscription.submit();
				}
			}
		}
	}

	function validerChampsDiscution(){
	 	var champ3			= "titrediscussion";
		var oEditor			= FCKeditorAPI.GetInstance("commentairediscussion") ;
		var contenuChamp4	= oEditor.GetHTML();
		var champ5			= "imagecripteediscussion";

		if(chaineVide(champ3) || trim(contenuChamp4) == "" || chaineVide(champ5)){
			alert(getMessage("champsobligatoires"));
		}else{
			if(contenuChamp4.length > tailleMaxTexteDiscussion){
				alert(messsageTexteDiscussion);
			}else{
				document.formForumDiscussion.submit();
			}
		}
	}

	function validerEmail(email){
		var expressionReg = new RegExp(/^[^@]+@(([\w\-]+\.){1,4}[a-zA-Z]{2,4}|(([01]?\d?\d|2[0-4]\d|25[0-5])\.){3}([01]?\d?\d|2[0-4]\d|25[0-5]))$/);
		var mailRes = expressionReg.exec(email);
		return(mailRes != null);
	}
    
    function validerSiteWeb(siteweb){
        return (siteweb.substring(0, 7) == 'http://') && (trim(siteweb) != 'http://');
    }

	function confirmerSortie(repRacine){
		var url = repRacine + "/php/sys/reset.php";
		if(confirm(getMessage("confirmquitter"))){
			window.location.replace(url);
		}
	}
/*
	function fileSize(fileSpec){
		var isSize = null;
		var fso = CreateObject("Scripting.FileSystemObject");
		var contentFile = fso.GetFile(fileSpec);
		isSize = contentFile.Size;
		fileSize = isSize;
		
		return fileSize;
	}
*/

	function validerChargement(nomformulaire, activite, dateevenement, lieu, fichier, typeAffiche, typedecommande, idannonce){	
		if(typedecommande == "modifier"){
			document.formchargerAnnonce.typeannonce.value = typeAffiche;
			document.formchargerAnnonce.typedecommandefinale.value = "validermodifs";
			document.formchargerAnnonce.idannonce.value = idannonce;
		}
		$OK = (1 == 0); /* FALSE */
		if(typeAffiche == "chargerpetiteannonce"){
			if(chaineVide('categorie') || chaineVide('telephone1') || chaineVide('titre') || chaineVide('details')){
				alert(getMessage("champsobligatoires"));
				$OK = (1 == 0); /* FALSE */
			}else{
				$OK = (1 == 1); /* TRUE */	
			}
		}else{
			if(chaineVide(activite) || chaineVide(dateevenement) || chaineVide(lieu)){
				alert(getMessage("champsobligatoires"));
				$OK = (1 == 0); /* FALSE */
			}else{
				if(global_verif_nomFichierDeux != "" && global_verif_nomFichierDeux != "succes"){
					if(global_verif_nomFichierDeux == "en_cours"){
						alert("Attention la deuxième affiche est en cours de chargement.");
						$OK = (1 == 0); /* FALSE */
					}else{
						if(confirm("Attention le chargement de votre deuxième affiche à echoué, voulez-vous quand même continuer ?")){							
							$OK = (1 == 1); /* TRUE */
							if(!isNull(document.getElementById("chargerFicAnnonceDeuxCache"))){document.getElementById("chargerFicAnnonceDeuxCache").value = "";}
						}else{
							$OK = (1 == 0); /* FALSE */
						}
					}
				}else{
					if(global_verif_nomFichierTrois != "" && global_verif_nomFichierTrois != "succes"){
						if(global_verif_nomFichierTrois == "en_cours"){
							alert("Attention la troisième affiche est en cours de chargement.");
							$OK = (1 == 0); /* FALSE */
						}else{
							if(confirm("Attention le chargement de votre troisième affiche à echoué, voulez-vous quand même continuer ?")){
								$OK = (1 == 1); /* TRUE */
								if(!isNull(document.getElementById("chargerFicAnnonceTroisCache"))){document.getElementById("chargerFicAnnonceTroisCache").value = "";}
							}else{
								$OK = (1 == 0); /* FALSE */
							}
						}
					}else{
						if(global_verif_nomFichier != "succes"){
							if(global_verif_nomFichier == "en_cours"){
								alert("Attention la première affiche est en cours de chargement.");
								$OK = (1 == 0); /* FALSE */
							}else{
								if(global_verif_nomFichier == "supprime" && formchargerAnnonce.radioaffiche1[1].checked){
									$txt_msg = "Attention la première affiche est obligatoire.";
									alert($txt_msg);
									$OK = (1 == 0); /* FALSE */
								}else{
									if(global_verif_nomFichier == "" && formchargerAnnonce.radioaffiche1[1].checked){
										$txt_msg = "Attention la première affiche est obligatoire.";
										alert($txt_msg);
										$OK = (1 == 0); /* FALSE */
									}else{
										if(formchargerAnnonce.radioaffiche1[1].checked){
											$txt_msg = "Attention la première affiche est obligatoire, or son chargement à échoué.";
											alert($txt_msg);
											$OK = (1 == 0); /* FALSE */
										}else{
											$OK = (1 == 1); /* TRUE */
										}
									}
								}
							}
						}else{
							$OK = (1 == 1); /* TRUE */
						}
					}
				}
			}
		}
	   
		if($OK){
			if(!dateBienFormatee(getValeurChamp(dateevenement)) && typeAffiche != "chargerpetiteannonce"){
				alert(getMessage("datemalformate"));
			}else{
				if(!isNull(document.getElementById("nouvNomChrgAnnonce"))){document.getElementById("nouvNomChrgAnnonce").value = global_nouveau_nomFichier;}
				if(!isNull(document.getElementById("nouvNomChrgAnnonceDeux"))){document.getElementById("nouvNomChrgAnnonceDeux").value = global_nouveau_nomFichierDeux;}
				if(!isNull(document.getElementById("nouvNomChrgAnnonceTrois"))){document.getElementById("nouvNomChrgAnnonceTrois").value = global_nouveau_nomFichierTrois;}
				switch(typeAffiche){
					case 'chargersoiree':
						document.formchargerAnnonce.action="../../chargersoiree.html";
					break;
					case 'chargerconcert':
						document.formchargerAnnonce.action="../../chargerconcert.html";
					break;
					case 'chargerchigoma':
						document.formchargerAnnonce.action="../../chargerchigoma.html";
					break;
					case 'chargergaboussi':
						document.formchargerAnnonce.action="../../chargergaboussi.html";
					break;
					case 'chargermourengue':
						document.formchargerAnnonce.action="../../chargermourengue.html";
					break;
					case 'chargervoule':
						document.formchargerAnnonce.action="../../chargervoule.html";
					break;
					case 'chargerrombou':
						document.formchargerAnnonce.action="../../chargerrombou.html";
					break;
					case 'chargerpatrossi':
						document.formchargerAnnonce.action="../../chargerpatrossi.html";
					break;
					case 'chargermariage':
						document.formchargerAnnonce.action="../../chargermariage.html";
					break;
					case 'chargerautretraditionnel':
						document.formchargerAnnonce.action="../../chargerautrerevenementtraditionnel.html";
					break;
					case 'chargerdahira':
						document.formchargerAnnonce.action="../../chargerdahira.html";
					break;
					case 'chargermoulidi':
						document.formchargerAnnonce.action="../../chargermoulidi.html";
					break;
					case 'chargerdeba':
						document.formchargerAnnonce.action="../../chargerdeba.html";
					break;
					case 'chargermaoulida':
						document.formchargerAnnonce.action="../../chargermaoulida.html";
					break;
					case 'chargerautrereligieux':
						document.formchargerAnnonce.action="../../chargerautreevenementreligieux.html";
					break;
					case 'chargerpetiteannonce':
						document.formchargerAnnonce.action="../../chargerpetiteannonce.html";
					break;
					default:
						document.formchargerAnnonce.action="../../chargersoiree.html";
					break;
				}
				
				if(!isNull(document.getElementById("chargement_en_cours"))){document.getElementById("chargement_en_cours").className = "visible";}
				
				if(!isNull(document.getElementById(nomformulaire))){document.getElementById(nomformulaire).submit();}
			}
		}
	}

	function isNull(variable){
		return variable == null;
	}


	function validerCreerAffiche(typeAffiche, typedecommande, idannonce){
		var organisateurs;
		var ville;
		var salle;
		var datemanif;
		var heuredebut;
		var prix;
		var contacts;



		categorie 			= getValeurChamp("categorie");
		telephone1 			= getValeurChamp("telephone1");
		titre 				= getValeurChamp("titre");
		details 			= getValeurChamp("details");

		organisateurs		= getValeurChamp("organisateurs");

		artistes			= getValeurChamp("artistes");
		invites				= getValeurChamp("invites");

		lieu 				= getValeurChamp("lieu");
		salle 				= getValeurChamp("salle");
		datemanif 			= getValeurChamp("datemanif");
		heuredebut 			= getValeurChamp("heuredebut");

		entree_1 			= getValeurChamp("entree_1");
		entree_2 			= getValeurChamp("entree_2");

		prix 				= getValeurChamp("prix");
		contacts 			= getValeurChamp("contacts");

		if(typedecommande == "modifier"){
			document.formcreerannonce.typeannonce.value = typeAffiche;
			document.formcreerannonce.typedecommandefinale.value = "validermodifs";
			document.formcreerannonce.idannonce.value = idannonce;
		}

		if(typeAffiche == "creersoiree"){
			if(estCoche('gratuit')){prix = "gratuit";}
			if(vide(organisateurs) || vide(lieu) || vide(salle) || vide(datemanif) || vide(heuredebut) || vide(prix) || vide(contacts)){
				alert(getMessage("champsobligatoires"));
			}else{
				if(dateBienFormatee(datemanif)){
					document.formcreerannonce.action="../../creersoiree.html";
					document.formcreerannonce.submit();
				}else{
					alert(getMessage("datemalformate"));
				}
			}
		}
		if(typeAffiche == "creerconcert"){
			if(estCoche('gratuit')){prix = "gratuit";}
			if(vide(organisateurs) || vide(artistes) || vide(lieu) || vide(salle) || vide(datemanif) || vide(heuredebut) || vide(prix) || vide(contacts)){
				alert(getMessage("champsobligatoires"));
			}else{
				if(dateBienFormatee(datemanif)){
					document.formcreerannonce.action="../../creerconcert.html";
					document.formcreerannonce.submit();
				}else{
					alert(getMessage("datemalformate"));
				}
			}
		}
		if(typeAffiche == "creerchigoma"){
			if(estCoche('gratuit')){prix = "gratuit";}
			if(vide(organisateurs) || vide(artistes) || vide(invites) || vide(lieu) || vide(salle) || vide(datemanif) || vide(heuredebut) || vide(prix) || vide(contacts)){
				alert(getMessage("champsobligatoires"));
			}else{
				if(dateBienFormatee(datemanif)){
					document.formcreerannonce.action="../../creerchigoma.html";
					document.formcreerannonce.submit();
				}else{
					alert(getMessage("datemalformate"));
				}
			}
		}
		if(typeAffiche == "creergaboussi"){
			if(estCoche('gratuit')){prix = "gratuit";}
			if(vide(organisateurs) || vide(artistes) || vide(lieu) || vide(salle) || vide(datemanif) || vide(heuredebut) || vide(prix) || vide(contacts)){
				alert(getMessage("champsobligatoires"));
			}else{
				if(dateBienFormatee(datemanif)){
					document.formcreerannonce.action="../../creergaboussi.html";
					document.formcreerannonce.submit();
				}else{
					alert(getMessage("datemalformate"));
				}
			}
		}
		if(typeAffiche == "creermourengue"){
			if(estCoche('gratuit')){prix = "gratuit";}
			if(vide(organisateurs) || vide(invites) || vide(lieu) || vide(salle) || vide(datemanif) || vide(heuredebut) || vide(prix) || vide(contacts)){
				alert(getMessage("champsobligatoires"));
			}else{
				if(dateBienFormatee(datemanif)){
					document.formcreerannonce.action="../../creermourengue.html";
					document.formcreerannonce.submit();
				}else{
					alert(getMessage("datemalformate"));
				}
			}
		}
		if(typeAffiche == "creervoule"){
			if(estCoche('gratuit')){prix = "gratuit";}
			if(vide(organisateurs) || vide(invites) || vide(lieu) || vide(salle) || vide(datemanif) || vide(heuredebut) || vide(prix) || vide(contacts)){
				alert(getMessage("champsobligatoires"));
			}else{
				if(dateBienFormatee(datemanif)){
					document.formcreerannonce.action="../../creervoule.html";
					document.formcreerannonce.submit();
				}else{
					alert(getMessage("datemalformate"));
				}
			}
		}
		if(typeAffiche == "creerrombou"){
			if(estCoche('gratuit')){prix = "gratuit";}
			if(vide(organisateurs) || vide(artistes) || vide(invites) || vide(lieu) || vide(salle) || vide(datemanif) || vide(heuredebut) || vide(prix) || vide(contacts)){
				alert(getMessage("champsobligatoires"));
			}else{
				if(dateBienFormatee(datemanif)){
					document.formcreerannonce.action="../../creerrombou.html";
					document.formcreerannonce.submit();
				}else{
					alert(getMessage("datemalformate"));
				}
			}
		}
		if(typeAffiche == "creerpatrossi"){
			if(estCoche('gratuit')){prix = "gratuit";}
			if(vide(organisateurs) || vide(invites) || vide(lieu) || vide(salle) || vide(datemanif) || vide(heuredebut) || vide(prix) || vide(contacts)){
				alert(getMessage("champsobligatoires"));
			}else{
				if(dateBienFormatee(datemanif)){
					document.formcreerannonce.action="../../creerpatrossi.html";
					document.formcreerannonce.submit();
				}else{
					alert(getMessage("datemalformate"));
				}
			}
		} 
		if(typeAffiche == "creermariage"){
			if(estCoche('gratuit')){prix = "gratuit";}
			if(vide(organisateurs) || vide(invites) || vide(lieu) || vide(salle) || vide(datemanif) || vide(heuredebut) || vide(prix) || vide(contacts)){
				alert(getMessage("champsobligatoires"));
			}else{
				if(dateBienFormatee(datemanif)){
					document.formcreerannonce.action="../../creermariage.html";
					document.formcreerannonce.submit();
				}else{
					alert(getMessage("datemalformate"));
				}
			}
		}
		if(typeAffiche == "creerautretraditionnel"){
			if(estCoche('gratuit')){prix = "gratuit";}
			if(vide(organisateurs) || vide(lieu) || vide(salle) || vide(datemanif) || vide(heuredebut) || vide(prix) || vide(contacts) || vide(titre)){
				alert(getMessage("champsobligatoires"));
			}else{
				if(dateBienFormatee(datemanif)){
					document.formcreerannonce.action="../../creerautrerevenementtraditionnel.html";
					document.formcreerannonce.submit();
				}else{
					alert(getMessage("datemalformate"));
				}
			}
		}
		if(typeAffiche == "creerdahira"){
			if(estCoche('gratuit')){prix = "gratuit";}
			if(vide(organisateurs) || vide(invites) || vide(lieu) || vide(salle) || vide(datemanif) || vide(heuredebut) || vide(prix) || vide(contacts)){
				alert(getMessage("champsobligatoires"));
			}else{
				if(dateBienFormatee(datemanif)){
					document.formcreerannonce.action="../../creerautrerevenementtraditionnel.html";
					document.formcreerannonce.submit();
				}else{
					alert(getMessage("datemalformate"));
				}
			}
		}
		if(typeAffiche == "creermoulidi"){
			if(estCoche('gratuit')){prix = "gratuit";}
			if(vide(organisateurs) || vide(invites) || vide(lieu) || vide(salle) || vide(datemanif) || vide(heuredebut) || vide(prix) || vide(contacts)){
				alert(getMessage("champsobligatoires"));
			}else{
				if(dateBienFormatee(datemanif)){
					document.formcreerannonce.action="../../creermoulidi.html";
					document.formcreerannonce.submit();
				}else{
					alert(getMessage("datemalformate"));
				}
			}
		}
		if(typeAffiche == "creerdeba"){
			if(estCoche('gratuit')){prix = "gratuit";}
			if(vide(organisateurs) || vide(invites) || vide(lieu) || vide(salle) || vide(datemanif) || vide(heuredebut) || vide(prix) || vide(contacts)){
				alert(getMessage("champsobligatoires"));
			}else{
				if(dateBienFormatee(datemanif)){
					document.formcreerannonce.action="../../creerdeba.html";
					document.formcreerannonce.submit();
				}else{
					alert(getMessage("datemalformate"));
				}
			}
		}
		if(typeAffiche == "creermaoulida"){
			if(estCoche('gratuit')){prix = "gratuit";}
			if(vide(organisateurs) || vide(invites) || vide(lieu) || vide(salle) || vide(datemanif) || vide(heuredebut) || vide(prix) || vide(contacts)){
				alert(getMessage("champsobligatoires"));
			}else{
				if(dateBienFormatee(datemanif)){
					document.formcreerannonce.action="../../creermaoulida.html";
					document.formcreerannonce.submit();
				}else{
					alert(getMessage("datemalformate"));
				}
			}
		}
		if(typeAffiche == "creerautrereligieux"){
			if(estCoche('gratuit')){prix = "gratuit";}	 
			if(vide(organisateurs) || vide(lieu) || vide(salle) || vide(datemanif) || vide(heuredebut) || vide(prix) || vide(contacts) || vide(titre)){
				alert(getMessage("champsobligatoires"));
			}else{
				if(dateBienFormatee(datemanif)){
					document.formcreerannonce.action="../../creerautreevenementreligieux.html";
					document.formcreerannonce.submit();
				}else{
					alert(getMessage("datemalformate"));
				}
			}
		}
		if(typeAffiche == "creerpetiteannonce"){
			if(vide(categorie) || vide(telephone1) || vide(titre) || vide(details)){
				alert(getMessage("champsobligatoires"));
			}else{
				document.formcreerannonce.action="../../creerpetiteannonce.html";
				document.formcreerannonce.submit();
			}
		}

	}



	function estCoche(radionBouton){
		if(!isNull(document.getElementById(radionBouton))){
			if(isNull(document.getElementById(radionBouton))){
				return (0 == 1);
			}else{
				return(document.getElementById(radionBouton).checked);
			}
		}
	}

	function dateBienFormatee(ladate){
		return (ladate.charAt(2) == ladate.charAt(5) && ladate.charAt(5) == "/") && ladate.length == 10;
	}
	/*
	function validerCreerPetiteAnnonce(){
		var nom;
		var categorie;
		var telephone1;
		var titre;
		var details;

		nom 		= document.getElementById("nom").value;
		categorie 	= document.getElementById("categorie").value;
		telephone1 	= document.getElementById("telephone1").value;
		titre 		= document.getElementById("titre").value;
		details 	= document.getElementById("details").value;

		if(vide(nom) || vide(categorie) || vide(telephone1) || vide(titre) || vide(details)){
			alert(getMessage("champsobligatoires"));
		}else{
			document.creerpetiteannonce.submit();
		}
	}
	*/

	function getMessage(typemessage){
		var tabMessage = new Array();

		tabMessage["champsobligatoires"] = "Tous les champs précédés d'une étoile doivent être renseignés.";
		tabMessage["confirmquitter"] = "Etes vous certain de vouloir quitter cette page ?";
		tabMessage["emailvalide"] = "Veuillez saisir un e-mail valide, SVP !";
        tabMessage["sitewebvalide"] = "Veuillez saisir un site web valide, ou laissez vide le champ, SVP !";
		tabMessage["motdepasseidentique"] = "Les mots de passes doivent être identiques.";
		tabMessage["datemalformate"] = "Attention la date doit être au format JJ/MM/AAAA exp: 18/12/2008";
		tabMessage["confirmmodif"] = "Êtes-vous certain de vouloir modifier cet élement ?";
		tabMessage["confirmsuppr"] = "Êtes-vous certain de vouloir supprimer définitivement cet élement ?";
		tabMessage["confirmsupprdiscussion"] = "Êtes-vous certain de vouloir supprimer définitivement cette discussion ?";
		tabMessage["confirmmodifecutil"] = "Êtes-vous certain de vouloir modifier votre état civil ?";
		tabMessage["confirmmodifiputil"] = "Êtes-vous certain de vouloir modifier vos infos pratiques ?";
		tabMessage["confirmmodifmdputil"] = "Êtes-vous certain de vouloir modifier votre mot de passe ?"; 
		tabMessage["confirmsupprutil"] = "Êtes-vous certain de vouloir supprimer définitivement cet utilisateur ?";	
		tabMessage["confirmsupprstatall"] = "Attention cette action va supprimer définitivement toutes les lignes des statistiques, voulez-vous continuer ?";
		tabMessage["supprficuploaded"] = "Êtes-vous certain de vouloir supprimer definitivement ce fichier du serveur ?";
        tabMessage["confirmsupprasso"] = "Êtes-vous certain de vouloir supprimer dévinitivement cette association ?";

		return(tabMessage[typemessage]);
	}

	 function isSoiree(typeevenement){
		var isThis; 
		isThis = (typeevenement == "creersoiree");  
		
		return(isThis);
	}

	function isConcert(typeevenement){
		var isThis; 
		isThis = (typeevenement == "creerconcert");  
		
		return(isThis);
	}

	function isChigoma(typeevenement){
		var isThis; 
		isThis = (typeevenement == "creerchigoma");  
		
		return(isThis);
	}

	function isGaboussi(typeevenement){
		var isThis; 
		isThis = (typeevenement == "creergaboussi");  
		
		return(isThis);
	}

	function isVoule(typeevenement){
		var isThis; 
		isThis = (typeevenement == "creervoule");  
		
		return(isThis);
	}

	function isAutreTraditionnel(typeevenement){
		var isThis; 
		isThis = (typeevenement == "creerautretraditionnel");  
		
		return(isThis);
	}

	function isDahira(typeevenement){
		var isThis; 
		isThis = (typeevenement == "creerdahira");  
		
		return(isThis);
	}
	
	function isReunion(typeevenement){
		var isThis; 
		isThis = (typeevenement == "creerreunion");  
		
		return(isThis);
	}

	function isMoulidi(typeevenement){
		var isThis; 
		isThis = (typeevenement == "creermoulidi");  
		
		return(isThis);
	}

	function isDeba(typeevenement){
		var isThis; 
		isThis = (typeevenement == "creerdeba");  
		
		return(isThis);
	}

	function isMaoulida(typeevenement){
		var isThis; 
		isThis = (typeevenement == "creermaoulida");  
		
		return(isThis);
	}

	function isRombou(typeevenement){
		var isThis; 
		isThis = (typeevenement == "creerrombou");  
		
		return(isThis);
	}

	function isPatrossi(typeevenement){
		var isThis; 
		isThis = (typeevenement == "creerpatrossi");  
		
		return(isThis);
	}
	
	function isMariage(typeevenement){
		var isThis; 
		isThis = (typeevenement == "creermariage");  
		
		return(isThis);
	}

	function isAutreReligieux(typeevenement){
		var isThis; 
		isThis = (typeevenement == "creerautrereligieux");  
		
		return(isThis);
	}

	function afficher(element){
		if(!isNull(document.getElementById(element))){
			document.getElementById(element).style.visibility='visible';
			if(thisIsMozila()){
				document.getElementById(element).style.display='table-row';
			}else{
				document.getElementById(element).style.display='block';
			}
		}
	}

	function cacher(element){
		if(!isNull(document.getElementById(element))){
			document.getElementById(element).style.visibility='hidden';
			document.getElementById(element).style.display='none';
		}
	}

	function getOS(){
		var OSName;

		if (navigator.appVersion.indexOf("Win")!=-1) OSName="Windows";
		if (navigator.appVersion.indexOf("Mac")!=-1) OSName="MacOS";
		if (navigator.appVersion.indexOf("X11")!=-1) OSName="UNIX";
		if (navigator.appVersion.indexOf("Linux")!=-1) OSName="Linux";

		return(OSName);
	}

	function thisIsWindows(){
		return getOS() == "Windows";
	}

	function getNavigateur(){
		var navigateur;
		navigateur = navigator.appName; //"Netscape")
  		navigateur = navigator.appName; //"Microsoft Internet Explorer")

		return(navigateur);
	}

	function thisIsMozila(){
		return(getNavigateur() == "Netscape");
	}

	function thisIsMIE(){
		return(getNavigateur() == "Microsoft Internet Explorer");
	}

	function modifierAnnonce(id_annonce, type_activite){
		document.formModifSuppr.identifiantevenement.value =  id_annonce;
		document.formModifSuppr.typedecommande.value = "modifier";
		document.formModifSuppr.typedevenement.value =  type_activite;

		if(confirm(getMessage("confirmmodif"))){
			switch(type_activite){
				case 'chargersoiree':
					document.formModifSuppr.action="../../chargersoiree.html";
				break;
				case 'creersoiree':
					document.formModifSuppr.action="../../creersoiree.html";
				break;
				case 'chargerconcert':
					document.formModifSuppr.action="../../chargerconcert.html";
				break;
				case 'creerconcert':
					document.formModifSuppr.action="../../creerconcert.html";
				break;
				case 'chargerchigoma':
					document.formModifSuppr.action="../../chargerchigoma.html";
				break;
				case 'creerchigoma':
					document.formModifSuppr.action="../../creerchigoma.html";
				break;
				case 'chargergaboussi':
					document.formModifSuppr.action="../../chargergaboussi.html";
				break;
				case 'creergaboussi':
					document.formModifSuppr.action="../../creergaboussi.html";
				break;
				case 'chargermourengue':
					document.formModifSuppr.action="../../chargermourengue.html";
				break;
				case 'creermourengue':
					document.formModifSuppr.action="../../creermourengue.html";
				break;
				case 'chargervoule':
					document.formModifSuppr.action="../../chargervoule.html";
				break;
				case 'creervoule':
					document.formModifSuppr.action="../../creervoule.html";
				break;
				case 'chargerrombou':
					document.formModifSuppr.action="../../chargerrombou.html";
				break;
				case 'creerrombou':
					document.formModifSuppr.action="../../creerrombou.html";
				break;
				case 'chargerpatrossi':
					document.formModifSuppr.action="../../chargerpatrossi.html";
				break;
				case 'creerpatrossi':
					document.formModifSuppr.action="../../creerpatrossi.html";
				break;
				case 'creermariage':
					document.formModifSuppr.action="../../creermariage.html";
				break;
				case 'chargermariage':
					document.formModifSuppr.action="../../chargermariage.html";
				break;
				case 'chargerautretraditionnel':
					document.formModifSuppr.action="../../chargerautrerevenementtraditionnel.html";
				break;
				case 'creerautretraditionnel':
					document.formModifSuppr.action="../../creerautrerevenementtraditionnel.html";
				break;
				case 'chargerdahira':
					document.formModifSuppr.action="../../chargerdahira.html";
				break;
				case 'creerdahira':
					document.formModifSuppr.action="../../creerdahira.html";
				break;
				case 'chargermoulidi':
					document.formModifSuppr.action="../../chargermoulidi.html";
				break;
				case 'creermoulidi':
					document.formModifSuppr.action="../../creermoulidi.html";
				break;
				case 'chargerdeba':
					document.formModifSuppr.action="../../chargerdeba.html";
				break;
				case 'creerdeba':
					document.formModifSuppr.action="../../creerdeba.html";
				break;
				case 'chargermaoulida':
					document.formModifSuppr.action="../../chargermaoulida.html";
				break;
				case 'creermaoulida':
					document.formModifSuppr.action="../../creermaoulida.html";
				break;
				case 'chargerautrereligieux':
					document.formModifSuppr.action="../../chargerautreevenementreligieux.html";
				break;
				case 'creerautrereligieux':
					document.formModifSuppr.action="../../creerautreevenementreligieux.html";
				break;
				case 'chargerpetiteannonce':
					document.formModifSuppr.action="../../creerpetiteannonce.html";
				break;
				default:
					document.formModifSuppr.action="../../creersoiree.html";
				break;
			}

			document.formModifSuppr.submit();
		}
	}

	function supprimerAnnonce(id_annonce, type_activite){
		document.formModifSuppr.identifiantevenement.value =  id_annonce;
		document.formModifSuppr.typedecommande.value = "supprimer";
		document.formModifSuppr.typedevenement.value =  type_activite;

		if(confirm(getMessage("confirmsuppr"))){
			document.formModifSuppr.submit();
		}
	}

	function modifierPetiteAnnonce(id_annonce, type_activite){
		document.formModifSuppr.identifiantevenement.value =  id_annonce;
		document.formModifSuppr.typedecommande.value = "modifier";
		document.formModifSuppr.typedevenement.value =  type_activite;

		if(confirm(getMessage("confirmmodif"))){
			if(type_activite == 'chargerpetiteannonce'){
				document.formModifSuppr.action="../../creerpetiteannonce.html";
			}else{
				if(type_activite == 'creerreunion'){
					document.formModifSuppr.action="../../creerreunion.html";
				}
			}
			document.formModifSuppr.submit();
		}
	}

	function supprimerPetiteAnnonce(id_annonce, type_activitepa){
		document.formModifSuppr.identifiantevenement.value =  id_annonce;
		document.formModifSuppr.typedecommande.value = "supprimer";
		document.formModifSuppr.typedevenement.value =  type_activitepa;

		if(confirm(getMessage("confirmsuppr"))){
			document.formModifSuppr.submit();
		}
	}

	function allerverspagesaisie(repracine){
		window.location.replace(repracine + "/creerannonce.html");
	}

	function allerverspagelogon(repracine){
		window.location.replace(repracine + "/logon.html");
	}

	function validerEnvoieEmail(){
		champ1 = "sujet";
		champ2 = "nomexpediteur";
		champ3 = "mailexpediteur";
		champ4 = "message";

		if(chaineVide(champ1) || chaineVide(champ2) || chaineVide(champ3) || chaineVide(champ4)){
			alert(getMessage("champsobligatoires"));
		}else{
			if(!validerEmail(getValeurChamp("mailexpediteur"))){
				alert(getMessage("emailvalide"));
			}else{
				document.formail.submit();
			}
		}

	}

	function validerMotDePasseOuvlie(){
		champ1 = "login";
		champ2 = "nom";
		champ3 = "prenom";

		if(chaineVide(champ1) || chaineVide(champ2) || chaineVide(champ3)){
			alert(getMessage("champsobligatoires"));
		}else{
			document.formMotdePasseOublie.submit();
		}
	}

	function imprimerCettePage(){
		window.print();
	}

	function afficherLaPhoto(image){
		//alert(image);	//document.getElementById("cadrePrincipalePhotoAlbum").className="imagePrincipaleDalbum";
		if(!isNull(document.getElementById('cadrePrincipalePhotoAlbum'))){document.getElementById('cadrePrincipalePhotoAlbum').style.backgroundImage="url('"+image+"')";}
	}

	function setSizeCadresAnnoncePetiteAnnonce(){
		var cadreA;
		var cadrePA;
		var tailleHauteurCadreA;
		var tailleHauteurCadrePA;

		cadreA 	= document.getElementById('id_espaceannoncescoprs');
		cadrePA = document.getElementById('id_cadreprincipalepetiteannonce');

		//tailleHauteurCadreA 	= cadreA.offsetWidth;
		tailleHauteurCadreA 	= cadreA.offsetHeight;
		tailleHauteurCadrePA 	= cadrePA.offsetHeight;

		/** Si la taille de la hauteur du cadre Petite annonce est plus grande que celle du cadre annonce **/
		if(tailleHauteurCadrePA > tailleHauteurCadreA){
			cadreA.style.height = tailleHauteurCadrePA + "px";
		}
		/** Si la taille de la hauteur du cadre Petite annonce est plus petite que celle du cadre annonce **/
		if(tailleHauteurCadrePA < tailleHauteurCadreA){
			cadrePA.style.height = tailleHauteurCadreA + "px";
		}

		//alert("PA : " + tailleHauteurCadrePA + ", A : " + tailleHauteurCadreA);
	}

	function  validerModifEtatCivUtil(){
		champ1 = "civilite";
		champ2 = "nom";
		champ3 = "prenom";
		champ4 = "voie";
		champ5 = "codepostal";
		champ6 = "ville";

		if(chaineVide(champ1) || chaineVide(champ2) || chaineVide(champ3) || chaineVide(champ4) || chaineVide(champ5) || chaineVide(champ6)){
			alert(getMessage("champsobligatoires"));
		}else{
			if(confirm(getMessage("confirmmodifecutil"))){
				document.formModifEtatCivUtil.submit();
			}
		}
	}

	function  validerModifInfosPratiqueUtil(){
		champ1 = "email";
		champ2 = "telephone1";

		if(chaineVide(champ1) || chaineVide(champ2)){
			alert(getMessage("champsobligatoires"));
		}else{
			if(confirm(getMessage("confirmmodifiputil"))){
				document.formModifInfPatiqUtil.submit();
			}
		}
	}

	function  validerModifMdPUtil(){
		champ1 = "motdepasse";
		champ2 = "remotdepasse";

		if(chaineVide(champ1) || chaineVide(champ2)){
			alert(getMessage("champsobligatoires"));
		}else{
			if(getValeurChamp(champ1) == getValeurChamp(champ2)){
				if(confirm(getMessage("confirmmodifmdputil"))){
					document.formModifMotDePasseUtil.submit();
				}
			}else{
				alert(getMessage("motdepasseidentique"));
				setValeurChamp(champ1);
				setValeurChamp(champ2);
			}
		}
	}

	function validerEcrireAtous(){
		var champ1 			= "sujet";
		var oEditor 		= FCKeditorAPI.GetInstance("ContenuEmail") ;
		var contenuDuMail	= oEditor.GetHTML() ;

		if(chaineVide(champ1) || trim(contenuDuMail) == ""){
			alert(getMessage("champsobligatoires"));
		}else{
			if(document.getElementById('fichier_attache_choisi').checked == true && trim(document.getElementById('fichier_attache').value) == ""){
				alert("Attention vous n'avez pas sélectionné le fichier à attacher !");
			}else{
				document.formecrireatous.submit();
			}
		}
	}
	
	function cocherFichierAttache(){
		if(document.getElementById('fichier_attache').value != ""){
			document.getElementById('fichier_attache_choisi').checked = true;
		}else{
			document.getElementById('fichier_attache_choisi').checked = false;
		}
	}

	function redirigerVers(chemin){
		window.location.replace(chemin);
	}

	function confirmerSupprimer(id_util, num_affichage){
		if(confirm(getMessage("confirmsupprutil"))){ 
			document.formModifSupprUtil.typedecommande.value = 'supprimer';
			document.formModifSupprUtil.identifiantutilisateur.value = id_util;
			document.formModifSupprUtil.numeroaffichageutilisateur.value = num_affichage; 
			
			document.formModifSupprUtil.submit();
		}
	}

	function confirmerSupprimerDiscussion(id_discussion, num_affichage){
		if(confirm(getMessage("confirmsupprdiscussion"))){ 
			document.formModifSupprDiscussion.typedecommande.value = 'supprimer';
			document.formModifSupprDiscussion.identifiantdiscussion.value = id_discussion;
			document.formModifSupprDiscussion.numeroaffichagediscussion.value = num_affichage; 
			
			document.formModifSupprDiscussion.submit();
		}
	}
	
	function confirmerSupprStatistique(id_stat){
		if(id_stat == "all"){ 
			if(confirm(getMessage("confirmsupprstatall"))){ 
				document.formModifSupprStat.typedecommande.value = 'supprimer';
				document.formModifSupprStat.identifiantStatConnect.value = id_stat;
				
				document.formModifSupprStat.submit();
			}
		}else{
			if(confirm(getMessage("confirmsuppr"))){ 
				document.formModifSupprStat.typedecommande.value = 'supprimer';
				document.formModifSupprStat.identifiantStatConnect.value = id_stat;
				
				document.formModifSupprStat.submit();
			}
		}
	}

	function validerPetiteAnnonce(type_petite_annonce, dateaffichage, typecommande, idevenement){		   
		if(typecommande == 'modifier'){
			document.formchargerAnnonce.typedecommandefinale.value = "validermodifs"; 
			document.formchargerAnnonce.idannonce.value = idevenement;
		}
		
		if(chaineVide('dateEvenement') || chaineVide('telephone1') || chaineVide('titre') || chaineVide('details')){
			alert(getMessage("champsobligatoires")); 
		}else{
			if(!dateBienFormatee(getValeurChamp('dateEvenement'))){
				alert(getMessage("datemalformate")); 
			}else{
				document.formchargerAnnonce.action="../../creerpetiteannonce.html";
				document.formchargerAnnonce.submit();
			}
		} 
	}
	
	function validerReunion(nomformulaire, dateaffichage, activite, lieu, fichier, typeAffiche, typedecommande, idannonce){
		if(typedecommande == 'modifier'){
			document.formchargerAnnonce.typedecommandefinale.value = "validermodifs"; 
			document.formchargerAnnonce.idannonce.value = idannonce;
		}
		if(chaineVide('dateEvenement') || chaineVide('categorie') || chaineVide('telephone1') || chaineVide('details')){
			alert(getMessage("champsobligatoires")); 
		}else{ 
			if(!dateBienFormatee(getValeurChamp('dateEvenement'))){
				alert(getMessage("datemalformate")); 
			}else{
				document.formchargerAnnonce.action="../../creerreunion.html";
				document.formchargerAnnonce.submit(); 
			}
		}
	}
	
	function activerCharger(numeroCase){
		nomCaseNormalCharger = "case_browse_normal_" + numeroCase;
		nomCaseGrisCharger = "case_browse_gris_" + numeroCase;
		if(!isNull(document.getElementById(nomCaseNormalCharger))){document.getElementById(nomCaseNormalCharger).className = "invisible";}
		if(!isNull(document.getElementById(nomCaseGrisCharger))){document.getElementById(nomCaseGrisCharger).className = "visible";}
		if(numeroCase == "deux"){
			if(!isNull(document.getElementById("chargerFicAnnonceDeuxCache"))){document.getElementById("chargerFicAnnonceDeuxCache").value = global_chargerFicAnnonceDeuxCache_tmp;}
			global_chargerFicAnnonceDeuxCache_tmp = "";
			
		}
		if(numeroCase == "trois"){			
			if(!isNull(document.getElementById("chargerFicAnnonceTroisCache"))){document.getElementById("chargerFicAnnonceTroisCache").value = global_chargerFicAnnonceTroisCache_tmp;}
			global_chargerFicAnnonceTroisCache_tmp = "";
		}
	}
	
	function desactiverCharger(numeroCase){
		if((numeroCase == "un" && global_verif_nomFichier != "succes") || (numeroCase == "deux" && global_verif_nomFichierDeux != "succes") || (numeroCase == "trois" && global_verif_nomFichierTrois != "succes")){
			nomCaseNormalCharger = "case_browse_normal_" + numeroCase;
			nomCaseGrisCharger = "case_browse_gris_" + numeroCase;
			if(!isNull(document.getElementById(nomCaseNormalCharger))){document.getElementById(nomCaseNormalCharger).className = "visible";}
			if(!isNull(document.getElementById(nomCaseGrisCharger))){document.getElementById(nomCaseGrisCharger).className = "invisible";}
		}
		if(numeroCase == "deux"){
			global_chargerFicAnnonceDeuxCache_tmp = document.getElementById("chargerFicAnnonceDeuxCache").value;
			if(!isNull(document.getElementById("chargerFicAnnonceDeuxCache"))){document.getElementById("chargerFicAnnonceDeuxCache").value = "";}
		}
		if(numeroCase == "trois"){			
			global_chargerFicAnnonceTroisCache_tmp = document.getElementById("chargerFicAnnonceTroisCache").value;
			if(!isNull(document.getElementById("chargerFicAnnonceTroisCache"))){document.getElementById("chargerFicAnnonceTroisCache").value = "";}
		}
	}
	
	function activer(idElement){
		if(!isNull(document.getElementById(idElement))){document.getElementById(idElement).disabled = true;}	
	}
	
	function desactiver(idElement){
		if(!isNull(document.getElementById(idElement))){document.getElementById(idElement).disabled = false;}	
	}
	
	function cacher_infos_aides(){
		alert("OK");
	}
	
	function afficher_infos_aides(){
		if(!isNull(document.getElementById("infos_aides"))){document.getElementById("infos_aides").className= "lienv";}
		if(!isNull(document.getElementById("infos"))){document.getElementById("infos").className= "lienv_none";}
	}
	
	function cacher_infos_aides(){
		if(!isNull(document.getElementById("infos_aides"))){document.getElementById("infos_aides").className= "lienv_none";}
		if(!isNull(document.getElementById("infos"))){document.getElementById("infos").className= "lienv";}
	}
	
	function cestUneImage(ext){
		extention = trim(ext.replace("\n", ""));
		return(extention.toUpperCase() == "PNG" || extention.toUpperCase() == "GIF" || extention.toUpperCase() == "BMP" || extention.toUpperCase() == "JPEG" || extention.toUpperCase() == "JPG");
	}
	
	function afficherLelement(idelem){
		if(!isNull(document.getElementById(idelem))){document.getElementById(idelem).className = "afficher";}
	}
	
	function cacherLelement(idelem){
		if(!isNull(document.getElementById(idelem))){document.getElementById(idelem).className = "cacher";}
	}
	
	function lanceLaRechercheDutilisateur(){
		document.formRechercherUtil.submit();
	}
	
	function egaliserLaHauteurDesDiv(cadreUn, cadreDeux){
		var hauteurDeux = document.getElementById(cadreDeux).offsetHeight;
		var hauteurUn = document.getElementById(cadreUn).offsetHeight;
		if(hauteurDeux > hauteurUn){
			document.getElementById(cadreUn).style.height = ""+hauteurDeux+"px";
		}
		if(hauteurDeux < hauteurUn){
			document.getElementById(cadreDeux).style.height = ""+hauteurUn+"px";
		}
	}

    function ajouterLigneDansLeTableau(id_tableau, num_ligne){
        /* Création de la ligne */
        tr = document.createElement ("tr");                                                     

        /* Création de la première cellule */ 
        td1  = document.createElement ("td");
        input1 = document.createElement("input");
        input1.className = "styl_champsaisiemembre_obligatoire";
        input1.type = "text";
        input1.id = 'nom_' + num_ligne;
        input1.name = 'nom_' + num_ligne; 
        td1.appendChild (input1); 

        /* Création de la deuxième cellule */ 
        td2  = document.createElement ("td");
        input2 = document.createElement("input");
        input2.className = "styl_champsaisiemembre_obligatoire";
        input2.type = "text";
        input2.id = 'prenom_' + num_ligne;
        input2.name = 'prenom_' + num_ligne; 
        td2.appendChild (input2);

        /* Création de la troisième cellule */ 
        td3  = document.createElement ("td");
        input3 = document.createElement("input");
        input3.className = "styl_champsaisiemembre";
        input3.type = "text";
        input3.id = 'surnom_' + num_ligne;
        input3.name = 'surnom_' + num_ligne; 
        td3.appendChild (input3);
        
        /* Création de la quatrième cellule */ 
        td4  = document.createElement ("td");
        input4 = document.createElement("input");
        input4.className = "styl_champsaisiemembre_obligatoire";
        input4.type = "text";
        input4.id = 'fonction_' + num_ligne;
        input4.name = 'fonction_' + num_ligne; 
        td4.appendChild (input4);
        
        /* Création de la cinquième cellule */ 
        td5  = document.createElement ("td");
        input5 = document.createElement("input");
        input5.className = "styl_champsaisiemembre_obligatoire";
        input5.type = "text";
        input5.id = 'numero_telephone_un_' + num_ligne;
        input5.name = 'numero_telephone_un_' + num_ligne; 
        td5.appendChild (input5);
        
        /* Création de la sixième cellule */ 
        td6  = document.createElement ("td");
        input6 = document.createElement("input");
        input6.className = "styl_champsaisiemembre";
        input6.type = "text";
        input6.id = 'email_un_' + num_ligne;
        input6.name = 'email_un_' + num_ligne; 
        td6.appendChild (input6);
        
        /* Création de la septième cellule */ 
        td7  = document.createElement ("td");
        input7 = document.createElement("input");
        input7.className = "styl_champsaisiemembre";
        input7.type = "text";
        input7.id = 'numero_telephone_deux_' + num_ligne;
        input7.name = 'numero_telephone_deux_' + num_ligne; 
        td7.appendChild(input7);
        
        /* Création de la huitème cellule */ 
        td8  = document.createElement ("td");
        input8 = document.createElement("input");
        input8.className = "styl_champsaisiemembre";
        input8.type = "text";
        input8.id = 'email_deux_' + num_ligne;
        input8.name = 'email_deux_' + num_ligne; 
        td8.appendChild(input8);

        /* On assemble les cellules a la ligne */
        tr.appendChild(td1);
        tr.appendChild(td2);
        tr.appendChild(td3);
        tr.appendChild(td4);
        tr.appendChild(td5);
        tr.appendChild(td6);
        tr.appendChild(td7);
        tr.appendChild(td8);
        
        /* On assemble la ligne au tableau */
        /* **************** Version tout type de navigateur **************** */
        byId(id_tableau).getElementsByTagName('tbody')[0].appendChild(tr);
        /* **************** Version Autre navigateur que Internet Explorer **************** *
         document.getElementById(id_tableau).appendChild(tr);
         * **************** Fin de la version navigateur que Internet Explorer **************** */
    }
    
    function supprimerLaDerniereLigneDuTableau(id_tableau, num_ligne){
        if(num_ligne <= 0){
            alert('Vous ne pouvez pas supprimer la ligne des libellés.'); 
            ++num_ligne_actuelle_tableau_membre;   
        }else{
            document.getElementById(id_tableau).deleteRow(num_ligne);
        }
    }
  

    function byId(elmId){
        var elm = document.getElementById(elmId);
        if(elm == null){
            elm = document.getElementsByName(elmId)[0];
        }
        /* alert(elm.innerHTML); */
        return elm;
    }
    
    function getNomNavigateur(){
        return navigator.appName;
    }
    
    function valider_ajout_association(num_ligne){
        setValeurChamp('num_ligne_actuelle', num_ligne);  
        var objectifs       = FCKeditorAPI.GetInstance("objectifs") ;
        if(chaineVide('intitule') || trim(objectifs) == '' || chaineVide('ville')){
            alert(getMessage('champsobligatoires'));
        }else{
            if((!validerEmail(getValeurChamp('email_un')) && !chaineVide('email_un')) || (!validerEmail(getValeurChamp('email_deux')) && !chaineVide('email_deux'))){
                alert(getMessage("emailvalide"));
            }else{
                 if(!validerSiteWeb(getValeurChamp('site_web')) && !chaineVide('site_web')){
                     alert(getMessage("sitewebvalide"));
                 }else{
                    var ok_obl = true;
                    var ok_mail = true;
                    for(i=1; i<=num_ligne; i++){
                        if(chaineVide('nom_' + num_ligne) || chaineVide('prenom_' + num_ligne) || chaineVide('fonction_' + num_ligne) || chaineVide('numero_telephone_un_' + num_ligne)){
                            ok_obl = false;
                        }else{
                            if((!validerEmail(getValeurChamp('email_un_' + num_ligne)) && !chaineVide('email_un_' + num_ligne)) || (!validerEmail(getValeurChamp('email_deux_' + num_ligne)) && !chaineVide('email_deux_' + num_ligne))){ 
                                ok_mail = false;
                            }    
                        }    
                    }
                    if(ok_obl){
                         if(ok_mail){
                            document.form_association.submit();
                         }else{
                            alert(getMessage("emailvalide"));    
                         }
                    }else{
                        alert(getMessage('champsobligatoires'));
                    }
                }
            }
        }
    }
    
    function valider_modification_association(num_ligne){
        setValeurChamp('num_ligne_actuelle', num_ligne);         
        var oEditor = FCKeditorAPI.GetInstance("objectifs") ;
        var objectifs       = oEditor.GetHTML();
        if(chaineVide('intitule') || trim(objectifs) == '' || chaineVide('ville')){
            alert(getMessage('champsobligatoires'));
        }else{
            if((!validerEmail(getValeurChamp('email_un')) && !chaineVide('email_un')) || (!validerEmail(getValeurChamp('email_deux')) && !chaineVide('email_deux'))){
                alert(getMessage("emailvalide"));
            }else{
                 if(!validerSiteWeb(getValeurChamp('site_web')) && !chaineVide('site_web')){
                     alert(getMessage("sitewebvalide"));
                 }else{ 
                    var ok_obl = true;
                    var ok_mail = true;
                    for(i=1; i<=num_ligne; i++){
                        if(chaineVide('nom_' + num_ligne) || chaineVide('prenom_' + num_ligne) || chaineVide('fonction_' + num_ligne) || chaineVide('numero_telephone_un_' + num_ligne)){
                            ok_obl = false;
                        }else{
                            if((!validerEmail(getValeurChamp('email_un_' + num_ligne)) && !chaineVide('email_un_' + num_ligne)) || (!validerEmail(getValeurChamp('email_deux_' + num_ligne)) && !chaineVide('email_deux_' + num_ligne))){ 
                                ok_mail = false;
                            }    
                        }    
                    }
                    if(ok_obl){
                         if(ok_mail){
                            setValeurChamp('typedecommande', 'miseajour');
                            document.form_association.submit();
                         }else{
                            alert(getMessage("emailvalide"));    
                         }
                    }else{
                        alert(getMessage('champsobligatoires'));
                    }
                }
            }
        }
    }
    
    function modifier_lassociation(id_association){
        setValeurChamp('id_association', id_association);
        setValeurChamp('typedecommande', 'modifier');
        
        document.form_modification_association.submit();   
    }
    
    function supprimer_lassociation(id_association){
        setValeurChamp('id_association', id_association);
        setValeurChamp('typedecommande', 'supprimer');
        
        if(confirm(getMessage('confirmsupprasso'))){
            document.form_supprimer_association.submit();    
        }
    }

    function garder_logo(){
        var val_now = global_nouveau_nomFichier;
        global_nouveau_nomFichier = getValeurChamp('logoCache');
        setValeurChamp('logoCache', val_now);
        cacher('chrgmt_logo'); 
        afficher('img_logo');
    }

    function ecraser_logo(){
        var val_now = global_nouveau_nomFichier;
        global_nouveau_nomFichier = getValeurChamp('logoCache');
        setValeurChamp('logoCache', val_now);
        cacher('img_logo'); 
        afficher('chrgmt_logo');         
    }











