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 recherche(donnees , param )
	{
	heure = new Date();
	lien = heure.getTime();

	if( param.length > 0)
		{
		self.location = donnees + "?search=" + param + "&tc=" + lien;
		}

	}

function suppression_discussion_forum( donnees , reference_topic , section , numero_page , fichier_retour , nom_table )
	{
	heure = new Date();
	lien = heure.getTime();

	var effacement = confirm("Etes-vous sure de vouloir supprimer cette discussion");

	if( effacement == true)
		{
		self.location = fichier_retour + "?page=" + donnees + "&reference_topic=" + reference_topic + "&section=" + section + "&page_topic=" + numero_page + "&nom_table=" + nom_table + "&tc=" + lien ; 
		}
	} 


function copie_section_forum( donnees , section , fichier_retour )
	{
	heure = new Date();
	lien = heure.getTime();

	parent.apres.location = fichier_retour + "?page=" + donnees + "&section=" + section + "&tc=" + lien ; 
	}

function copie_discussion_forum( donnees  , reference_topic , section , numero_page , fichier_retour )
	{
	heure = new Date();
	lien = heure.getTime();

	parent.apres.location = fichier_retour + "?page=" + donnees + "&reference_topic=" + reference_topic + "&section=" + section + "&page_topic=" + numero_page + "&tc=" + lien ; 

	}

function copie_message_forum( donnees , reference_message  , reference_topic , section , numero_page , fichier_retour , nom_table )
	{
	heure = new Date();
	lien = heure.getTime();

	parent.apres.location = fichier_retour + "?page=" + donnees + "&reference=" + reference_message + "&reference_topic=" + reference_topic + "&section=" + section + "&page_topic=" + numero_page + "&nom_table=" + nom_table + "&tc=" + lien ; 

	}

function suppression_message_forum( donnees , reference_message , reference_topic , section , numero_page , fichier_retour , nom_table )
	{
	heure = new Date();
	lien = heure.getTime();

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

	if( effacement == true)
		{
		self.location = fichier_retour + "?page=" + donnees + "&reference=" + reference_message + "&reference_topic=" + reference_topic + "&section=" + section + "&page_topic=" + numero_page + "&nom_table=" + nom_table + "&tc=" + lien ; 
		}
	} 


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

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

	self.location = "index.php3?page=" + donnees + "&direction=" + sens_boite + "&message=" + statut_message + "&numero_page="+  page + "&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 = "index.php3?page=" + donnees + "&profil=" + ref_profil + "&reference=" + reference_message + "&direction=" + sens_boite + "&message=" + section_retour + "&numero_page=" + numero_page + "&tc=" + lien ; 
		}
	} 

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

	var effacement = confirm("Etes-vous sure de vouloir fermer votre compte");

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


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_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_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 = "vide.php3?tc=" + lien; 

		parent.memo.location = "memorisation.php3?data=" + param + "&region&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  = "vide.php3?" + lien; 
			parent.ville.location  = "vide.php3?" + lien; 

			parent.memo.location = "memorisation.php3?data=" + param + "&type=pays&tc=" + lien; 
			}
		else
			{
			parent.region.location = "vide.php3?" + lien; 
			parent.etat.location  = "vide.php3?" + lien; 
			parent.ville.location  = "vide.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 = "vide.php3?" + lien; 
			parent.ville.location  = "vide.php3?" + lien; 

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


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

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

function frame_localisation(donnees , nom_continent )
	{

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

	top.localisation.location = donnees + "?continent=" + nom_continent + "&type=continent&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 recharge(repertoire)
	{
	heure = new Date();
	lien = heure.getTime();
	nombre_frame = top.frames.length;

	parent.boite_a_image.location = "selection_image.php3?file=" + repertoire + "&tc=" + lien; 
	self.location = "upload_photo_forum.php3?file=" + repertoire + "&tc=" + lien; 
	}


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

	parent.boite_a_image.location = "selection_image_gestion.php3?file=" + repertoire + "&tc=" + lien; 
	self.location = "upload_photo_forum_gestion.php3?file=" + repertoire + "&tc=" + lien; 
	}

function selection_photo( photo )
	{
	parent.frame_message.document.getElementsByName("contenu")[0].value = parent.frame_message.document.getElementsByName("contenu")[0].value  + " " + photo;
	}

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

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

	document.previsualisation.submit();

	} 

function page_topic(donnees , page )
	{

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


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

function page_sujet(donnees , page , section )
	{

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


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

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

	var chemin = information + "&" + 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 suppression_user(donnees , utilisateur ,  forum , page , page_user , pseudo )
	{
	heure = new Date();
	lien = heure.getTime();

	if( pseudo  == "admin" )
		{
		alert("Vous ne pouvez pas supprimer ce profil");
		}
	else	
		{
		var effacement = confirm("Etes-vous sure de vouloir supprimer cet utilisateur");

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

function suppression_forum(donnees , forum ,  table , page , repertoire )
	{
	heure = new Date();
	lien = heure.getTime();

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

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

function suppression_photo(donnees , nom_photo ,  page_galerie , page  , forum )
	{
	heure = new Date();
	lien = heure.getTime();

	var effacement = confirm("Etes-vous sure de vouloir supprimer cette photo");

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

function fenetre_photo(information , photo , largeur , hauteur  )
	{
	var chemin = information + "?nom_photo=" + photo; 
	var ascenseur = "yes"; 
	
	var options = "toolbar=no,location=no,directories=no,status=no,"
	+ "menubar=no, scrollbars=" + ascenseur + ",resizable=no,copyhistory=no,"
	+ "width=" + largeur +  ",height=" + hauteur;


	window.open( chemin ,"",options);
	}

function page_galerie(donnees , page , page_forum , repertoire )
	{

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


	self.location = donnees + "?numero_page=" + page_forum + "&reference=" + repertoire + "&page_galerie=" + page + "&tc="  + lien;
	}

function changement_statut(donnees , ref_annonce , forum , page , section  )
	{
	heure = new Date();
	lien = heure.getTime();

	self.location = "changement_groupement.php3?statut=" + donnees + "&data=" + ref_annonce + "&reference=" + forum + "&section=" + section + "&numero_page=" + page + "&tc=" + lien;
	} 


function suppression_section(donnees , reference_section , forum ,  page , section )
	{
	heure = new Date();
	lien = heure.getTime();

	var effacement = confirm("Etes-vous sure de vouloir supprimer cette section");

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

function page_forum(donnees , page )
	{

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


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


function page_recherche(donnees , page , fichier_temporaire )
	{

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


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

function oublie(donnees , p)
	{

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

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

function pourvoter( parametre , refsite , refcat )
	{
	heure = new Date();
	lien = heure.getTime();


	self.location = "voter.php3?catanu=" + refcat + "&reference=" + refsite + "&point=" + parametre +  "&tc=" + lien; 
	}

function ajout_liens(fichier,information,permis,internaute)
	{
	heure = new Date();
	lien = heure.getTime();

	if( permis == "vrai" )
		{
		if( information != "root" )
			{
			document.cookie =  "cookie_parametre=" + information + "&" + internaute ;
	
			self.location = fichier + "?catanu=" + information + "&adulte=" + internaute + "&tc=" + lien;
			}
		else
			{
			alert("Vous ne pouvez pas inscrire un site à ce niveau");
			}
		}
	else
		{
		alert("Vous ne pouvez pas inscrire un site à ce niveau");
		}
	}

function ajout_categorie( donnees , information , permis , internaute )
	{
	heure = new Date();
	lien = heure.getTime();


	if( permis == "vrai" )
		{
		self.location = donnees + "?catanu=" + information + "&adulte=" + internaute + "&"  + lien;
		}
	else
		{
		alert("Vous ne pouvez pas inscrire une categorie à ce niveau");
		}
	}

function filtre( parametre , ref_categorie , public_vise )
	{
	heure = new Date();
	lien = heure.getTime();

	if( parametre == "off" )
		{
		texte = "ATTENTION : SECTION STRICTEMENT RESERVE AUX ADULTES ! ! !\n\n" 
		      + "Le contenu de cette section, ainsi que les contenus vers lesquels pointent les liens de cette section sont interdits aux enfants. "
		      + "Ils peuvent choquer certaines sensibilités. \n\n Pour accéder à cette section cliquez sur OK \n\n"
		      + "SI VOUS ETES MINEUR, CLIQUEZ SUR ANNULER.";


		var vers_adulte = confirm(texte);
	
		if( vers_adulte == true)
			{
			document.cookie =  "cookie_adulte=" + parametre;
	
			if( public_vise  == "adu" )
				{
				ref_categorie = "root";
				}

			if( ref_categorie.length > 0 )
				{
				self.location = "index.php3?catanu=" + ref_categorie + "&tc=" + lien; 
				}
			}
		}
	else
		{
		document.cookie =  "cookie_adulte=" + parametre;

		if( public_vise  == "adu" )
			{
			ref_categorie = "root";
			}

		if( ref_categorie.length > 0 )
			{
			self.location = "index.php3?catanu=" + ref_categorie + "&tc=" + lien; 
			}

		}
	}s

function soumettre_basique()
	{
	document.formulaire.submit();
	} 

