		var	pop		=	0 ;
		var NavName = navigator.appName.substring(0,3);
		var NavVersion = navigator.appVersion.substring(0,1);

		if (NavName != "Mic" || NavVersion>=4)
		{
			entree = new Date;
			entree = entree.getTime();
		}
		function	fct_confirme()
		{
			document.location	=	"welcome.html" ;
			return fct_identification2() ;
		}
		function fct_blur_nom()
		{
			var d=document.getElementById("nom") ;
			var d2=document.getElementById("nomP") ;
			var d3=document.getElementById("nomDiff") ;
			if	(	d3.value	!=	1	)	{	d2.value = d.value ; }
		}
		function fct_blur_nomP()
		{
			var d=document.getElementById("nom") ;
			var d2=document.getElementById("nomP") ;
			var d3=document.getElementById("nomDiff") ;
			if	(d.value != d2.value	)	{	d3.value = 1 ; } 
			else						{	d3.value = 2 ; }
		}
		function fct_onFocus()
		{
			/*
			if	(	pop	==	0	) ;
			else
			{
				if (pop)	var f=pop.document.getElementById("email") ;
				else			var f=false ;
				if (f) f.focus() ;
			}
			*/
		}

		function fct_ecrire_cookie(nom, valeur)
		{
			document.cookie = nom + "=" + escape(valeur)
		}

		function fct_search()
		{
			document.title ="Chargement en cours..." ;
			fct_ecrire_cookie ( 'search_nom', document.search.search_nom.value ) ;
			fct_ecrire_cookie ( 'search_prenom', document.search.search_prenom.value ) ;
			fct_ecrire_cookie ( 'search_siecle', document.search.search_siecle.value ) ;
			fct_ecrire_cookie ( 'search_branche', document.search.search_branche.value ) ;
			fct_ecrire_cookie ( 'search_sexe', document.search.search_sexe.value ) ;
			document.location= "list.html" ;
			return false;
		}

		function fct_liste_fam(fam)
		{
			document.forms.search.elements.search_nom.value=fam ;
			document.forms.search.elements.search_prenom.value='%' ;
			document.forms.search.submit() ;
		}

		function fct_liste(b_type)
		{
			document.title ="Chargement en cours..." ;
			document.location= "index.php?page=liste_tous&type="+b_type ;
			return false;
		}

		function ZsortIe()
		{
			if (NavName != "Mic" || NavVersion>=4)
			{
				window.statut	=	1 ;
				fin = new Date;
				fin = fin.getTime();
				secondes = (fin-entree) ;
				v_texte	=	'Page chargée en ' + secondes + ' ms' ;
				window.status= v_texte ;
			}
		}

		function	fct_set_resolution	()
		{	
			fct_ecrire_cookie ( 'screenwidth', document.body.clientWidth ) ;
			fct_ecrire_cookie ( 'screenheight', document.body.clientHeight ) ;
		}

		function	fct_set_taille	( width, height)
		{
			screen.width	=	width ;
			screen.height	=	height ;
		}

		function fct_add(option,id,union_id)
		{
			v_location	=	document.location ;
			v_nav	=	navigator.appName ;
			v_url	=	"http://www.ompda.com/index.php?page=" + option + "&id=" + id + "&union_id=" + union_id ;
			document.location	=	v_url ;
		}

		function fct_navigation(page,id,option,union_id)
		{
			document.title ="Chargement en cours..." ;
			if	(	option	==	'add_fils'	||	option	==	'add_fille'	||	option	==	'add_union'	||	option	==	'add_parents'		)
			{
				if	(	option	==	'add_union'		)
				{
					var text = "Indiquez prénom/nom/naissance/décès" ;
				}
				else
				{
					var text = "Indiquez prénom/naissance/décès" ;
				}
				fct_ecrire_cookie ( 'info', prompt ( text, "" ) ) ;
			}
			fct_ecrire_cookie ( 'option', option ) ;
			fct_ecrire_cookie ( 'id', id ) ;
			v=page ;
			if	(	page	==	'repertoire'	||	page	==	'branche'	)	{}
			else
			{
				v=v+"-id" + id ;
				if	(	union_id	>	0	)
				{
					v=v+"-union_id" + union_id ;
				}
			}
			document.location=v+".html" ;
		}

		function fct_set_ip_type(ip,type)
		{
			document.location= "index.php?page=stat&option=set_ip_type&ip=" + ip + "&type=" + type ;
			return false;
		}

		function fct_set_flag_vu(page,type_user,type_stat,flag_vu)
		{
			document.location= "index.php?page=stat&page="+page+"&type_user="+type_user+"&type_stat="+type_stat+"&flag_vu2="+flag_vu ;
			return false;
		}

		function fct_set_ip_vu(ip,vu)
		{
			document.location= "index.php?page=stat&option=set_ip_flag_vu&ip=" + ip + "&flag_vu=" + vu ;
			return false;
		}

		function fct_add_doc(id)
		{
			document.location= "add_doc-id" + id + ".html" ;
			return false;
		}

		function fct_add_individu()
		{
			fct_navigation("fiche",0,option,0)
			return false;
		}
		function fct_modify(mod)
		{
			fct_ecrire_cookie ( 'flag_modify', mod ) ;
			document.location= "list.html" ;
			return false;
		}


		function fct_retour_principale()
		{
			var	s	=	window.opener.location ;
			if	(	s	)
			{
				window.close() ;
				window.opener.location = window.opener.location ;
			}
		}

		function fct_identification()
		{
			fct_ecrire_cookie ( 'mot_de_passe', '' ) ;
			pop	=	window.open( "http://www.ompda.com/login.html","Identification", "width=450,height=250,scrollbars=yes" ) ;
			return false;
		}

		function fct_identification2()
		{
			fct_ecrire_cookie ( 'mot_de_passe', '' ) ;
			document.location	=	'http://www.ompda.com/identification2.html' ;
			window.resizeTo	(	800, 600 ) ;
			/*window.scrollbar	=	yes ;*/
			return false;
		}

		function fct_ident(b_new)
		{
			var email 		= document.ident.email.value ;

			fct_ecrire_cookie ( 'email', email ) ;
			fct_ecrire_cookie ( 'option', 'ident') ;
			if	(	b_new	)
			{
				var newpwd 	= document.ident.newpwd.value ;
				fct_ecrire_cookie ( 'newpwd', newpwd ) ;
			}
			var pwd 		= document.ident.mot_de_passe.value ;
			fct_ecrire_cookie ( 'mot_de_passe', pwd ) ;
			window.document.location= "ident.html" ;
			return false;
		}

		function fct_stat()
		{
			document.location= "index.php?page=stat" ;
			return false;
		}

		function fct_sql()
		{
			document.location= "index.php?page=sql" ;
			return false;
		}

		function fct_inconnu()
		{
			document.location= "index.php?page=list&mode=inconnu" ;
			return false;
		}

		function fct_title()
		{
			document.location= "index.php?page=list&mode=title" ;
			return false;
		}

		function fct_raz()
		{
			document.title ="Chargement en cours..." ;
			fct_ecrire_cookie ( 'search_nom', '' ) ;
			fct_ecrire_cookie ( 'search_prenom', '' ) ;
			fct_ecrire_cookie ( 'search_branche', '' ) ;
			fct_ecrire_cookie ( 'search_sexe', '-1' ) ;
			fct_ecrire_cookie ( 'search_siecle', '' ) ;
			document.location= "list.html" ;
			return false;
		}

		function fct_tout(user_ids)
		{
			document.title ="Chargement en cours..." ;
			if	(	user_ids	==	1	)
			{
				fct_ecrire_cookie ( 'search_nom', '%' ) ;
				fct_ecrire_cookie ( 'search_prenom', '' ) ;
				fct_ecrire_cookie ( 'search_siecle', 0 ) ;
				document.location= "list.html" ;
			}
			else
			{
				document.location= "tous.html" ;
			}
			return false;
		}

		function fct_touti(user_ids)
		{
			document.title ="Chargement en cours..." ;
			if	(	user_ids	==	1	)
			{
				fct_ecrire_cookie ( 'search_nom', '%' ) ;
				fct_ecrire_cookie ( 'search_prenom', '' ) ;
				fct_ecrire_cookie ( 'search_siecle', 0 ) ;
				document.location= "list.html" ;
			}
			else
			{
				document.location= "individus.html" ;
			}
			return false;
		}

		function fct_show_fratrie(page,show_fratrie)
		{	
			document.title ="Chargement en cours..." ;
			fct_ecrire_cookie ( 'show_fratrie', show_fratrie ) ;
			document.location= page ;
		}

		function fct_show_date(page,show_arbre,show_date)
		{	
			document.title ="Chargement en cours..." ;
			fct_ecrire_cookie ( 'show_arbre', show_arbre ) ;
			fct_ecrire_cookie ( 'show_date', document.parametre.show_date.value ) ;
			document.location= page+".html" ;
		}

		function fct_show_conjoint(page,show_conjoint)
		{	
			document.title ="Chargement en cours..." ;
			fct_ecrire_cookie ( 'show_conjoint', show_conjoint ) ;
			document.location= page+".html" ;
		}

		function fct_parametre(page,show_arbre)
		{	
			document.title ="Chargement en cours..." ;
			fct_ecrire_cookie ( 'show_arbre', show_arbre ) ;
			fct_ecrire_cookie ( 'desc_list', document.parametre.desc_list.value ) ;
			fct_ecrire_cookie ( 'nb_gen_asc', document.parametre.nb_gen_asc.value ) ;
			fct_ecrire_cookie ( 'nb_gen_desc', document.parametre.nb_gen_desc.value ) ;
			document.location= page+".html" ;
		}
