function controle_presence(champ_cache)
	{
	formulaire[champ_cache].value = "enabled";
	} 

function suppression_lien(donnees , reference )
	{
	heure = new Date();
	lien = heure.getTime();

	var effacement = confirm("Etes-vous sure de vouloir supprimer ce lien");

	if( effacement == true)
		{
		self.location = donnees + "?reference="+ reference + "&tc="  + lien;
		}
	} 

function chargement_initial( ref_chatroom , nom_base , nom_chatroom )
	{

	heure = new Date();
	lien = heure.getTime();

	parent.charge_chat.location = "load_chatroom.php3?nom_salle=" + nom_chatroom + "&reference=" + ref_chatroom + "&nom_table=" + nom_base + "&tc=" + lien;
	}

function changement( parametre )
	{
	ascenseur = "yes";
	largeur = 600;
	hauteur = 400;

	var options = "toolbar=yes,location=yes,directories=yes,status=yes,"
	+ "menubar=yes, scrollbars=" + ascenseur + ",resizable=yes,copyhistory=yes,"
	+ "width=" + largeur +  ",height=" + hauteur + ",left=140,top=150";
	window.open( parametre ,"",options);
	} 

function selection_photo( photo )
	{
	top.frame_message.document.formulaire.contenu.value = top.frame_message.document.formulaire.contenu.value  + " " + photo;
	}


function sauver( liste_candidat , parametre,ligne_deux )
	{
	nombre = parametre.nombre_candidat.value;

	index = parametre[ligne_deux].options.length;

	for (var e = 0; e < nombre ; e++) 
		{       
		if ( e < index )
			{
			cellule_choisi = "candidat" + e;

			parametre[cellule_choisi].value = parametre[ligne_deux].options[e].value;
			}
		else
			{
			cellule_choisi = "candidat" + e;

			parametre[cellule_choisi].value = "--";
			}

		}

	liste_candidat.submit();
	}

function ajouter_candidat(parametre,ligne_un,ligne_deux)
	{
	deja_fait = "false";
	i = parametre[ligne_un].selectedIndex;
	texte =parametre[ligne_un].options[i].text;
	index = parametre[ligne_deux].options.length;
	for (var e = 0; e < index; e++) 
		{       	
		if (texte == parametre[ligne_deux].options[e].text)
			{
			deja_fait = "true";
			}
		}
	if ( deja_fait == "false" )
		{
		entree = new Option(texte, parametre[ligne_un].value);
		parametre[ligne_deux].options[index] = entree;

		}
	}

function effacer_candidat(parametre,ligne_deux)
	{
	if ( parametre[ligne_deux].options.length > 0 )
		{
		index = parametre[ligne_deux].selectedIndex;
		parametre[ligne_deux].options[index] = null;

		if ( parametre[ligne_deux].options.length > 1 )
			{
			parametre[ligne_deux].options[0].selected;
			}
		}
	}


function zindows_sortie(information , largeur , hauteur , ascenseur , profil  )
	{
	heure = new Date();
	lien = heure.getTime();

	if ( profil != "" )
		{
		var chemin = information + "?tc=" + lien + "&" + profil; 
		var options = "toolbar=no,location=no,directories=no,status=no,"
		+ "menubar=no, scrollbars=" + ascenseur + ",resizable=no,copyhistory=no,"
		+ "width=" + largeur +  ",height=" + hauteur + ",left=140,top=150";
		window.open( chemin ,"",options);
		}
	}

function selection_page_recherche(donnees , page , fichier_temporaire )
	{

	heure = new Date();
	lien = heure.getTime();

	document.cookie =  "cookie_page=" + page;
	
	self.location = donnees + "?file=" + fichier_temporaire + "&numero_page="+  page + "&tc="  + lien;
	}

function selection_page_courrier(donnees , page , sens_boite , statut_message )
	{

	heure = new Date();
	lien = heure.getTime();

	self.location = donnees + "?direction=" + sens_boite + "&message=" + statut_message + "&numero_page="+  page + "&tc="  + lien;
	}

function selection_page_forum(donnees , page , reference_topic , reference_forum , numero_page )
	{

	heure = new Date();
	lien = heure.getTime();

	self.location = donnees + "?message_forum=" + reference_topic + "&reference=" + reference_forum + "&numero_page=" + numero_page + "&page_message=" + page + "&tc="  + lien;
	}


function zindows_chat( largeur , hauteur , ascenseur , profil  )
	{
	heure = new Date();
	lien = heure.getTime();

	if ( profil != "" )
		{
		var chemin = "image_chat.php3?nom_photo=" + profil + "&tc=" + lien; 
		var options = "toolbar=no,location=no,directories=no,status=no,"
		+ "menubar=no, scrollbars=" + ascenseur + ",resizable=no,copyhistory=no,"
		+ "width=" + largeur +  ",height=" + hauteur + ",left=140,top=150";
		window.open( chemin ,"",options);
		}
	}

function bouclage()
	{
	heure = new Date();
	lien = heure.getTime();
	

	setTimeout("self.location = 'publicite.php3?tc='  + lien",50000); 

	}

function acces_chat(information , largeur , hauteur , ascenseur , numero_salle  )
	{
	heure = new Date();
	lien = heure.getTime();

	var chemin = information + "?salle=" + numero_salle + "&tc=" + lien; 
	var options = "toolbar=no,location=no,directories=no,status=no,"
	+ "menubar=no, scrollbars=" + ascenseur + ",resizable=no,copyhistory=no,"
	+ "width=" + largeur +  ",height=" + hauteur + ",left=140,top=150";
	window.open( chemin ,"",options);
	}

function recharge( reference_forum , reference_message , numero_page , page_message )
	{
	heure = new Date();
	lien = heure.getTime();
	nombre_frame = top.frames.length;


	if ( nombre_frame > 0)
		{
		parent.location = "lecture_topic.php3?message_forum=" + reference_message + "&reference=" + reference_forum + "&numero_page=" + numero_page + "&page_message=" + page_message + "&tc=" + lien + "&nouveau=vrai"; 
		}
	}

function recharge_image()
	{
	heure = new Date();
	lien = heure.getTime();
	nombre_frame = top.frames.length;


	if ( nombre_frame > 0)
		{
		parent.boite_a_image.location = "selection_image.php3?tc=" + lien; 
		}
	}

function rafraichir_photo( salle )
	{
	heure = new Date();
	lien = heure.getTime();
	nombre_frame = top.frames.length;


	if ( nombre_frame > 0)
		{
		parent.photo.location = "affichage_photo_chat.php3?salle=" + salle + "&tc=" + lien; 
		}
	}



function changement_frame()
	{
	heure = new Date();
	lien = heure.getTime();

	document.previsualisation.mon_texte.value = document.formulaire.contenu.value;
	

	document.previsualisation.submit();

	} 

function effacement_sortie(  donnees , sortie  )
	{
	heure = new Date();
	lien = heure.getTime();

	var effacement = confirm("Etes-vous sure de vouloir effacer cette sortie");

	if( effacement == true)
		{
		self.location = donnees + "?reference=" + sortie + "&tc=" + lien ; 
		}
	} 

function supprimer_message( donnees , ref_profil , reference_message , sens_boite , section_retour , numero_page )
	{
	heure = new Date();
	lien = heure.getTime();

	var effacement = confirm("Etes-vous sure de vouloir supprimer ce message");

	if( effacement == true)
		{
		self.location = donnees + "?profil=" + ref_profil + "&reference=" + reference_message + "&direction=" + sens_boite + "&message=" + section_retour + "&numero_page=" + numero_page + "&tc=" + lien ; 
		}
	} 

function selection_page_sondage(donnees , page , fichier_temporaire )
	{

	heure = new Date();
	lien = heure.getTime();


	self.location = donnees + "?file=" + fichier_temporaire + "&numero_page="+  page + "&tc="  + lien;
	}

function selection_page_temoignage(donnees , page , fichier_temporaire )
	{

	heure = new Date();
	lien = heure.getTime();

	
	self.location = donnees + "?file=" + fichier_temporaire + "&numero_page="+  page + "&tc="  + lien;
	}

function zindows_temoignage(information , largeur , hauteur , ascenseur , profil  )
	{
	heure = new Date();
	lien = heure.getTime();


	if ( profil != "" )
		{
		var chemin = information + "?reference=" + profil + "&tc=" + lien; 
		var options = "toolbar=no,location=no,directories=no,status=yes,"
		+ "menubar=no, scrollbars=" + ascenseur + ",resizable=no,copyhistory=no,"
		+ "width=" + largeur +  ",height=" + hauteur + ",left=140,top=150";
		window.open( chemin ,"",options);
		}
	}

function zindows_sondage(information , largeur , hauteur , ascenseur , p  , sondage , nombre  )
	{
	heure = new Date();
	lien = heure.getTime();

	choix = "vide";

	for (var e = 0; e < nombre ; e++) 
		{       	
		if ( p[e].checked == true )
			{
			z = e + 1;
			choix = "selection" + z;
			}
		}


	if ( choix == "vide" )
		{
		alert("Vous devez selectionner une option");
		}
	else
		{

		var chemin = information + "?reference=" + sondage + "&selection=" + choix + "&tc=" + lien; 
		var options = "toolbar=no,location=no,directories=no,status=yes,"
		+ "menubar=no, scrollbars=" + ascenseur + ",resizable=no,copyhistory=no,"
		+ "width=" + largeur +  ",height=" + hauteur + ",left=140,top=150";
		window.open( chemin ,"",options);
		}
	}

function detail( donnees , annonce )
	{
	heure = new Date();
	lien = heure.getTime();

	self.location = donnees  + lien;
	}

function suppression_sondage( donnees, reference , page )
	{
	heure = new Date();
	lien = heure.getTime();

	var effacement = confirm("Etes-vous sure de vouloir effacer ce sondage");

	
	if( effacement == true)
		{
		self.location = donnees + "?reference=" + reference + "&numero_page=" + page + "&tc=" + lien ; 
		}
	}


function suppression_temoignage( donnees, reference , page )
	{
	heure = new Date();
	lien = heure.getTime();

	var effacement = confirm("Etes-vous sure de vouloir effacer ce témoignage");

	
	if( effacement == true)
		{
		self.location = donnees + "?reference=" + reference + "&numero_page=" + page + "&tc=" + lien ; 
		}
	}

function page_recherche(donnees , page_recherche , reste )
	{

	heure = new Date();
	lien = heure.getTime();

	
	self.location = donnees + "?" + lien;
	}

function oublie(donnees , p)
	{

	heure = new Date();
	lien = heure.getTime();

	if  ( ( p.pseudo.value.length == 0) && ( p.email.value.length == 0) )
		{
		alert('Vous devez rentrez au moins un champs');
		}
	else
		{
		self.location = donnees + "?email=" + escape(p.email.value) + "&pseudo=" + escape(p.pseudo.value) + "&tc="  + lien; 
		}
	}

function suivant(donnees , p)
	{

	heure = new Date();
	lien = heure.getTime();

	
	self.location = donnees + "?email=" + escape(p.profil.value) + "&passe=" + escape(p.passe.value) + "&tc=" + lien; 
	}

function ajouter(parametre,ligne_un,ligne_deux,champ_cache)
	{
	var tableau = new Array();  



	deja_fait = "false";
	i = parametre[ligne_un].selectedIndex;
	texte =parametre[ligne_un].options[i].text;
	index = parametre[ligne_deux].options.length;
	for (var e = 0; e < index; e++) 
		{       	
		if (texte == parametre[ligne_deux].options[e].text)
			{
			deja_fait = "true";
			}
		}
	if ( deja_fait == "false" )
		{
		entree = new Option(texte, parametre[ligne_un].value);
		parametre[ligne_deux].options[index] = entree;
		}

	e= 0;
	for (var i = 0; i < parametre[ligne_deux].options.length; i++) 
		{       	
		tableau[e] = parametre[ligne_deux].options[i].value;
		e++;
		}
	tableau_temporaire = tableau.join();
	formulaire[champ_cache].value = tableau_temporaire.replace( /,/g , "|" );

	}

function effacer(parametre,ligne_un,ligne_deux,champ_cache)
	{
	var tableau = new Array();  

	if ( parametre[ligne_deux].options.length > 0 )
		{
		index = parametre[ligne_deux].selectedIndex;
		parametre[ligne_deux].options[index] = null;
		if ( parametre[ligne_deux].options.length > 1 )
			{
			parametre[ligne_deux].options[0].selected;
			}
		}
	e= 0;
	for (var i = 0; i < parametre[ligne_deux].options.length; i++) 
		{       	
		tableau[e] = parametre[ligne_deux].options[i].value;
		e++;
		}
	tableau_temporaire = tableau.join();
	formulaire[champ_cache].value = tableau_temporaire.replace( /,/g , "|" );

	}


function frame_localisation(donnees , nom_continent )
	{

	heure = new Date();
	lien = heure.getTime();

	top.localisation.location = donnees + "?continent=" + nom_continent + "&type=continent&tc=" + lien;
	}

function changement_continent()
	{
	heure = new Date();
	lien = heure.getTime();

	index = select_pays.liste_pays.selectedIndex;
	param = select_pays.liste_pays[index].value;


	if ( (param != "amn_usa") && (param != "amn_can") ) 
		{	
		if ( param.length >2 )
			{
			parent.region.location = "selection_region.php3?pays=" + param + "&" + lien; 
			parent.etat.location  = "vide2.php3?" + lien; 
			parent.ville.location  = "vide2.php3?" + lien; 

			parent.memo.location = "memorisation.php3?data=" + param + "&type=pays&tc=" + lien; 
			}
		else
			{
			parent.region.location = "vide2.php3?" + lien; 
			parent.etat.location  = "vide2.php3?" + lien; 
			parent.ville.location  = "vide2.php3?" + lien; 

			parent.memo.location = "memorisation.php3?data=" + param + "&type=pays&tc=" + lien; 
			}
		}
	else
		{
		if ( param.length >2 )
			{
			parent.etat.location = "selection_region.php3?pays=" + param + "&" + lien; 
			parent.region.location = "vide2.php3?" + lien; 
			parent.ville.location  = "vide2.php3?" + lien; 

			parent.memo.location = "memorisation.php3?data=" + param + "&type=pays&tc=" + lien; 


			}
		else
			{
			parent.etat.location = "vide2.php3?" + lien; 
			parent.region.location = "vide2.php3?" + lien; 
			parent.ville.location = "vide2.php3?" + lien; 

			parent.memo.location = "memorisation.php3?data=" + param + "&type=pays&tc=" + lien; 
			}
		}
	}


function soumettre( p)
	{
	var erreur = "false";

	if(p.passe.value != p.repet_passe.value )
		{
		alert("Vos mots de passe sont different");
		erreur = "true";
		}
	else
		{
		document.formulaire.submit();
		}

	}

function changement_etat()
	{
	heure = new Date();
	lien = heure.getTime();

	index = select_etat.liste_etat.selectedIndex;
	param = select_etat.liste_etat[index].value;

	if ( param.length >2 )
		{
		parent.region.location = "selection_etat.php3?etat=" + param + "&" + lien; 
		parent.ville.location  = "vide.php3?" + lien; 

		parent.memo.location = "memorisation.php3?data=" + param + "&type=etat&tc=" + lien; 
		}
	else
		{
		parent.region.location = "vide.php3?" + lien; 
		parent.ville.location  = "vide.php3?" + lien; 

		parent.memo.location = "memorisation.php3?data=" + param + "&type=etat&tc=" + lien; 
		}
	}

function changement_pays()
	{
	heure = new Date();
	lien = heure.getTime();

	index = select_region.liste_region.selectedIndex;
	param = select_region.liste_region[index].value;

	if ( param.length >2 )
		{

		parent.ville.location = "selection_ville.php3?region="  + param + "&tc=" + lien; 

		parent.memo.location = "memorisation.php3?data=" + param + "&region&tc=" + lien; 

		}
	else
		{
		parent.ville.location = "vide2.php3?tc=" + lien; 

		parent.memo.location = "memorisation.php3?data=" + param + "&region&tc=" + lien; 

		}
	}

function changement_region()
	{
	heure = new Date();
	lien = heure.getTime();

	index = select_region.liste_region.selectedIndex;
	param = select_region.liste_region[index].value;

	if ( param.length >2 )
		{

		parent.memo.location = "memorisation.php3?data=" + param + "&type=ville&tc=" + lien; 
		}

	}

function changement_residence()
	{
	heure = new Date();
	lien = heure.getTime();

	parent.pays.location = "vide2.php3?"  + lien  ; 
	parent.region.location = "vide2.php3?"  + lien  ; 
	parent.etat.location = "vide2.php3?"  + lien  ; 
	parent.ville.location = "vide2.php3?"  + lien  ; 


	index = select_continent.liste_continent.selectedIndex;
	param = select_continent.liste_continent[index].value;
	param_texte = select_continent.liste_continent[index].text;

	parent.pays.location = "selection_pays_deux.php3?data=" + escape(param) +  "&" + lien; 
	parent.resultat.location = "residence.php3?data="  + escape(param) + "&texte=" + param_texte + "&ajout&" + lien; 


	}

function effacer_tout(donnees)
	{
	heure = new Date();
	lien = heure.getTime();

	self.location = donnees + "?" + lien;

	parent.continent.location = "toi_continent.php3?"  + lien  ; 
	parent.pays.location = "vide2.php3?"  + lien  ; 
	parent.region.location = "vide2.php3?"  + lien  ; 
	parent.etat.location = "vide2.php3?"  + lien  ; 
	parent.ville.location = "vide2.php3?"  + lien  ; 
	parent.resultat.location = "residence.php3?suppression_totale&"  + lien  ; 


	}

function selection_page_sondage(donnees , page  )
	{

	heure = new Date();
	lien = heure.getTime();

	
	self.location = donnees + "?numero_page=" + page + "&tc="  + lien;
	}

function changement_toi_continent()
	{
	heure = new Date();
	lien = heure.getTime();

	parent.region.location = "vide2.php3?"  + lien  ; 
	parent.etat.location = "vide2.php3?"  + lien  ; 



	index = select_pays.liste_pays.selectedIndex;
	param = select_pays.liste_pays[index].value;
	param_texte = select_pays.liste_pays[index].text;




	if ( (param != "amn_usa") && (param != "amn_can") )
		{	
		if ( param.length >2 )
			{
			parent.region.location = "selection_region_deux.php3?data=" + param + "&"  +  + lien; 
			parent.ville.location = "vide2.php3?" + lien; 
			parent.resultat.location = "residence.php3?data="  + escape(param) + "&texte=" + param_texte + "&ajout&" + lien; 
			}
		else
			{
			parent.region.location = "vide2.php3?" + lien; 
			parent.ville.location = "vide2.php3?" + lien; 
			}
		}
	else
		{
		if ( param.length >2 )
			{
			parent.etat.location = "selection_region_deux.php3?data=" + param + "&"  +  + lien; 
			parent.region.location = "vide2.php3?" + lien;
			parent.ville.location = "vide2.php3?" + lien; 
			parent.resultat.location = "residence.php3?data="  + escape(param) + "&texte=" + param_texte + "&ajout&" + lien; 
			}
		else
			{
			parent.etat.location = "vide2.php3?" + lien; 
			parent.region.location = "vide2.php3?" + lien;
			parent.ville.location = "vide2.php3?" + lien; 
			}
		}
	}



function changement_toi_etat()
	{
	heure = new Date();
	lien = heure.getTime();


	index = select_etat.liste_etat.selectedIndex;
	param = select_etat.liste_etat[index].value;
	param_texte = select_etat.liste_etat[index].text;


	if ( param.length >2 )
		{
		parent.region.location = "selection_etat_deux.php3?data=" + param + "&"  +  + lien; 
		parent.ville.location = "vide2.php3?" + lien; 
		parent.resultat.location = "residence.php3?data="  + escape(param) + "&texte=" + param_texte + "&ajout&" + lien; 
		}
	else
		{
		parent.region.location = "vide2.php3?" + lien; 
		parent.ville.location = "vide2.php3?" + lien; 
		}
	}


function changement_toi_pays()
	{
	heure = new Date();
	lien = heure.getTime();


	index = select_region.liste_region.selectedIndex;
	param = select_region.liste_region[index].value;
	param_texte = select_region.liste_region[index].text;


	if ( param.length >2 )
		{
		parent.ville.location = "selection_ville_deux.php3?data=" + param + "&"  + lien; 
		parent.resultat.location = "residence.php3?data="  + param + "&texte=" + param_texte + "&ajout&" + lien; 
		}
	else
		{
		parent.ville.location = "vide2.php3?" + lien; 
		}
	}

function changement_toi_region()
	{
	heure = new Date();
	lien = heure.getTime();

	index = select_region.liste_region.selectedIndex;
	param = select_region.liste_region[index].value;
	param_texte = select_region.liste_region[index].text;


	if ( param.length >2 )
		{
		parent.resultat.location = "residence.php3?data="  + param + "&texte=" + param_texte + "&ajout&" + lien; 
		}

	}


function effacer_element( parametre , donnees)
	{
	heure = new Date();
	lien = heure.getTime();

	index = formulaire.residence.selectedIndex;
	texte = formulaire.residence[index].value;


	self.location = donnees + "?"  + lien;

	parent.continent.location = "toi_continent.php3?"  + lien  ; 
	parent.pays.location = "vide2.php3?"  + lien  ; 
	parent.region.location = "vide2.php3?"  + lien  ; 
	parent.etat.location = "vide2.php3?"  + lien  ; 
	parent.resultat.location = "residence.php3?data=" + texte + "&suppression_partielle&"  + lien  ; 


	}

function soumettre_ton_profil( p)
	{
	if( p.redirection.checked)
		{
		p.chaine_redirection.value = "true";
		}

	document.formulaire.submit();
	}

function suppression_profil(donnees , param )
	{
	heure = new Date();
	lien = heure.getTime();

	var effacement = confirm("Etes-vous sure de vouloir effacer votre annonce");

	if ( donnees == "supprimer.php3")
		{
		if( effacement == true)
			{
			self.location = donnees + "?tc="  + lien;
			}
		}
	} 

function soumettre_basique()
	{

	document.formulaire.submit();
	} 

function zindows_detail(information , largeur , hauteur , ascenseur , profil , sexe , annee  )
	{
	heure = new Date();
	lien = heure.getTime();


	if ( profil != "" )
		{
		var chemin = information + "?profil=" + escape(profil) + "&sexe=" + sexe  + "&annee=" + annee + "&niveau=0&tc=" + lien; 
		var options = "toolbar=no,location=no,directories=no,status=yes,"
		+ "menubar=no, scrollbars=" + ascenseur + ",resizable=no,copyhistory=no,"
		+ "width=" + largeur +  ",height=" + hauteur + ",left=140,top=150";
		window.open( chemin ,"",options);
		}
	}

function fermer()
	{
	parent.window.close();
	}

function effacer_champ(p)
	{
	p.description.value = "";
	}

function effacer_message_chat(p)

	{
	p.message_chat.value = "";
	}

function charge_message_chat( objet , salle , derniere_lecture )
	{
	heure = new Date();
	lien = heure.getTime();

	formulaire.texte_chat.value = formulaire.texte_chat.value.replace( /(%27)/g , "\'" );

	top.liste.document.getElementById(objet).innerHTML = formulaire.texte_chat.value ;


	valeur_lien = "load_chatroom.php3?salle=" + salle + "&chat=" + derniere_lecture + "&tc=" + lien;

	setTimeout( "self.location=valeur_lien" ,3000 ); 

	}





