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 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 charger3( )
	{
	heure = new Date();
	lien = heure.getTime();

	top.frame_smiley.location= "selection_smiley.php3?tc=" + lien;
	self.location= "upload_smiley.php3?tc=" + lien;

	}

function selection_page_detail_moteur(donnees , page , ftemp , page_detail , ref_annonce , nom_table )
	{

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

	self.location = donnees + "?file=" + ftemp + "&nom_table="+ nom_table + "&page_commentaire="+ page + "&numero_page="+ page_detail + "&reference="+ ref_annonce + "&tc="  + lien;
	}


function selection_page_moteur(donnees , page , temp )
	{

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

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

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

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

	}

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

	close();
	}

function fenetre_photo(information , photo , largeur , hauteur  )
	{
	var chemin = information; 
	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;

	document.cookie =  "cookie_photo=" + photo;
	
	window.open( chemin ,"",options);
	}


function selection_page_detail(donnees , page , categorie , page_detail , ref_annonce , nom_table )
	{

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

	self.location = donnees + "?catanu=" + categorie + "&nom_table="+ nom_table + "&page_commentaire="+ page + "&numero_page="+ page_detail + "&reference="+ ref_annonce + "&tc="  + lien;
	}

function selection_page_annuaire(donnees , page , categorie  )
	{

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

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

function effacer_commentaire( donnees , com , reference , nom_table , categorie_parent , page , page_commentaire )
	{
	heure = new Date();
	lien = heure.getTime();

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

	if( effacement == true)
		{
		self.location = donnees +  "?opinion_article=" + com + "&reference=" + reference + "&nom_table=" + nom_table + "&catanu=" + categorie_parent + "&page_commentaire=" + page_commentaire  + "&numero_page=" + page + "&tc=" + lien;
		}
	} 

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

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

	top.frame_galerie.location= "selection_image.php3?reference=" + reference_annonce + "&tc=" + lien;
	self.location= "upload_fichier.php3?reference=" + reference_annonce + "&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 filtre_gestion( parametre , ref_categorie , public_vise )
	{
	heure = new Date();
	lien = heure.getTime();

	document.cookie =  "cookie_adulte=" + parametre;

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


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

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

	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; 
		}
	}


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

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

	if ( donnees == "supprimer.php3")
		{
		if( effacement == true)
			{

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

function suivant(donnees , p)
	{

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


	self.location = donnees + "?email=" + escape(p.email.value)  + "&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 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 = "vide.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 frame_localisation(donnees , nom_continent )
	{

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

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

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

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 soumettre_basique()
	{
	document.formulaire.submit();
	} 

function soumettre()
	{
	document.formulaire_commentaire.submit();
	} 


