// hierarchie.class.js (v1.0)
// Feuille de scripts JavaScript - Rubrique Etat des lieux
// Copyright 1999-2004 Versus Studio

// Scripts de définition des classes utilisées dans la rubrique Etat des lieux


// *
// *  Classe Hierarchie : gestion de la hierarchie en cours
// *
// *
// *

function Hierarchie( listeChapitres_P ) {
	this.page_courante   = '' ; 
	this.listeChapitres  = listeChapitres_P ;
	// Initialisation des données membres
	this.indiceCurrentChapitre = '' ;
	this.currentChapitre = new Array() ;
	this.currentNiveau1  = new Array() ;
	this.currentNiveau2  = new Array() ;
	this.currentNiveau3  = new Array() ;
	this.currentNiveau4  = new Array() ;
}

// Actualisation de la hierarchie
Hierarchie.prototype.Actualise = function( page_courante ) {
	var i ;
	for( i=0 ; i<this.listeChapitres.length ; i++ ) {
		//alert("Recherche dans le chapitre numéro "+ i +" de la liste !") ;
		//this.currentNiveau1 = 'coucou' ;
		if( this.listeChapitres[ i ].Actualise( page_courante , this.currentNiveau1 , this.currentNiveau2 , this.currentNiveau3 , this.currentNiveau4 ) ) {
			this.currentChapitre[0] = this.listeChapitres[ i ] ;
			this.indiceCurrentChapitre = i ;
			break ;
		}
	}
	this.page_courante = page_courante ;
	// Redirection si l'on est pas arrivé à se situer dans la hierarchie
	var strPageTEMP = '' ;
	if( this.currentChapitre.length == 0 ) {
		//alert("Impossible de trouver la page courante") ;
		// Récupération de la première page affichable du document
		for( i=0 ; i<this.listeChapitres.length ; i++ ) {
			//alert("Recherche de la première page dans le chapitre numéro "+i+" !") ;
			strPageTEMP = this.listeChapitres[ i ].GetPremierePage() ;
			//alert( strPageTEMP ) ;
			if( strPageTEMP != '' ) break ;
		}
		// Redirection
		if( strPageTEMP != '' ) {
			//alert("Redirection vers : '" + strPageTEMP + "' "'"'"'"'"'") ;
			window.location.href = strPageTEMP ;
		} else {
			//alert("Redirection vers : '" + cst_accueil + "' "'"'"'"'"'") ;
			window.location.href = cst_accueil ;
		}
	}
}

// Méthode d'affichage de la liste déroulante des Chapitres
Hierarchie.prototype.AfficheChapitre = function() {
	var i ;
	//document.writeln('<div style="position: relative">') ;
	//document.writeln('<div id="'+cst_nom_div_chapitre+'" style="width: 340px; overflow: hidden" >') ;
	document.writeln('<select name="'+ cst_nom_frm_chapitre +'" onChange="ChangementChapitre()" style="width: 340px;">') ;
	for( i=0 ; i<this.listeChapitres.length ; i++ ) {
		this.listeChapitres[ i ].AfficheChapitre( i ) ;
	}
	document.writeln('</select>') ;
	//document.writeln('</div>') ;
	//document.writeln('</div>') ; 
}

// Méthode d'affichage du pdf d'un chapitre 
Hierarchie.prototype.AffichePdfChapitre = function() { 
	if( this.currentChapitre.length == 0 ) { 
		document.writeln('&nbsp;') ; 
	} else { 
		this.currentChapitre[0].AffichePdfChapitre() ; 
	} 
} 

// Méthode d'affichage de la liste déroulante des Niveaux1 
Hierarchie.prototype.AfficheNiveau1 = function() { 
	if( this.currentChapitre.length == 0 ) { 
		document.writeln('&nbsp;') ; 
	} else { 
		this.currentChapitre[0].AfficheNiveau1() ; 
	} 
} 

// Méthode d'affichage de la liste déroulante des Niveaux2 
Hierarchie.prototype.AfficheNiveau2 = function() { 
	if( this.currentNiveau1.length == 0 ) { 
		document.writeln('&nbsp;') ; 
	} else { 
		this.currentNiveau1[0].AfficheNiveau2() ; 
	} 
} 

// Méthode d'affichage de la liste déroulante des Niveaux3 
Hierarchie.prototype.AfficheNiveau3 = function() { 
	if( this.currentNiveau2.length == 0 ) { 
		document.writeln('&nbsp;') ; 
	} else { 
		this.currentNiveau2[0].AfficheNiveau3() ; 
	} 
} 

// Méthode d'affichage de la liste déroulante des Niveaux4 
Hierarchie.prototype.AfficheNiveau4 = function() { 
	if( this.currentNiveau3.length == 0 ) { 
		document.writeln('&nbsp;') ; 
	} else { 
		this.currentNiveau3[0].AfficheNiveau4() ; 
	} 
} 

// Méthode d'affichatge de la navigation entre les pages 
Hierarchie.prototype.AfficheNavigationPage = function( strPosition ) { 
	if( this.page_courante == '' ) return void(0) ; 
	if( this.listeChapitres.length == 0 ) return void(0) ; 
	if( this.currentChapitre.length > 0 ) { 
		if( this.currentNiveau1.length > 0 ) { 
			if( this.currentNiveau2.length > 0 ) { 
				if( this.currentNiveau3.length > 0 ) { 
					if( this.currentNiveau4.length > 0 ) { 
						this.currentNiveau4[0].AfficheNavigationPage( this.page_courante , strPosition ) ; 
					} else { 
						this.currentNiveau3[0].AfficheNavigationPage( this.page_courante , strPosition ) ; 
					} 
				} else { 
					this.currentNiveau2[0].AfficheNavigationPage( this.page_courante , strPosition ) ; 
				} 
			} else { 
				this.currentNiveau1[0].AfficheNavigationPage( this.page_courante , strPosition ) ; 
			} 
		} else { 
			this.currentChapitre[0].AfficheNavigationPage( this.page_courante , strPosition ) ; 
		} 
	} 
} 

// Méthode d'affichage du sommaire
Hierarchie.prototype.AfficheSommaire = function(){
	var i ;
	for( i=0 ; i<this.listeChapitres.length ; i++ ) {
		this.listeChapitres[i].AfficheSommaire() ;
	} 
}

// Méthode de changement du chapitre 
Hierarchie.prototype.ChangementChapitre = function() { 
	// Récupération de l'indice sélectionné 
	var objSelect = document.forms[ cst_nom_form ].elements[ cst_nom_frm_chapitre ] ; 
	var indice = objSelect.options[ objSelect.selectedIndex ].value ; 
	// Controle de l'existence du chapitre 
	if( indice > this.listeChapitres.length ) { 
		alert('Changement du chapitre impossible !') ; 
	} else { 
		this.listeChapitres[ indice ].ChangementChapitre() ; 
	} 
} 

// Méthode de changement du niveau 1 
Hierarchie.prototype.ChangementNiveau1 = function() { 
	// Controle de l'existence d'un chapitre sélectionné en cours 
	if( this.currentChapitre.length == 0 ) { 
		alert('Changement du niveau 1 impossible !') ; 
	} 
	this.currentChapitre[0].ChangementNiveau1() ; 
} 

// Méthode de changement du niveau 2 
Hierarchie.prototype.ChangementNiveau2 = function() { 
	// Controle de l'existence d'un niveau 1 sélectionné en cours 
	if( this.currentNiveau1.length == 0 ) { 
		alert('Changement du niveau 2 impossible !') ; 
	} 
	this.currentNiveau1[0].ChangementNiveau2() ; 
}

// Méthode de changement du niveau 3 
Hierarchie.prototype.ChangementNiveau3 = function() { 
	// Controle de l'existence d'un niveau 3 sélectionné en cours 
	if( this.currentNiveau2.length == 0 ) { 
		alert('Changement du niveau 3 impossible !') ; 
	} 
	this.currentNiveau2[0].ChangementNiveau3() ; 
} 

// Méthode de changement du niveau 4 
Hierarchie.prototype.ChangementNiveau4 = function() { 
	// Controle de l'existence d'un niveau 3 sélectionné en cours 
	if( this.currentNiveau3.length == 0 ) { 
		alert('Changement du niveau 4 impossible !') ; 
	} 
	this.currentNiveau3[0].ChangementNiveau4() ; 
} 

// * 
// * Classe Chapitre : gestion d'un chapitre 
// * 
// * 
// * 
function Chapitre( index, index_afficher, titre, page ) { 
	this.index = index ; 
	this.indexAff = index_afficher ; 
	this.titre = titre ; 
	this.ary_page = new Array() ; 
	if( page != "" ) this.ary_page[0] = page ; 
	this.ary_niveau1 = new Array() ; 
	this.selected = false ; 
	this.pdf_file = "" ; 
	this.pdf_size = "" ; 
} 

// Ajout d'une page 
Chapitre.prototype.AddPage = function( page ) { 
	if( (this.ary_niveau1.length > 0) && (this.ary_page.length == 0) ) { 
		// Ajout d'un niveau
		var i, indice = 0 ; 
		var aryTEMP = this.ary_niveau1 ; 
		this.ary_niveau1 = new Array() ; 
		this.ary_niveau1[indice] = new Niveau1( indice , "" , "" , page ) ; 
		this.ary_niveau1[indice].index_chapitre = this.index ; 
		indice++ ; 
		for( i=0 ; i<aryTEMP.length ; i++ ) {
			this.ary_niveau1[ indice ] = aryTEMP[i] ;
		}
	}
	this.ary_page[ this.ary_page.length ] = page ;
}

// Ajout d'un pdf
Chapitre.prototype.AddPdf = function( file, size ) {
	this.pdf_file = file ;
	this.pdf_size = size ;
}

// Ajout d'un niveau 1
Chapitre.prototype.AddNiveau1 = function( index_afficher, titre, page ) {
	if( (this.ary_page.length > 0) && (this.ary_niveau1.length == 0) ) { 
		this.ary_niveau1[ 0 ] = new Niveau1( 0, "", "", this.ary_page[0] ) ; 
		this.ary_niveau1[ 0 ].index_chapitre = this.index ; 
	} 
	index = this.ary_niveau1.length ; 
	this.ary_niveau1[ index ] = new Niveau1( index, index_afficher, titre, page ) ; 
	this.ary_niveau1[ index ].index_chapitre = this.index ; 
	return this.ary_niveau1[ index ] ; 
} 

// Méthode de détermination de l'arborescence courante 
Chapitre.prototype.Actualise = function( page_courante , currentNiveau1_P , currentNiveau2_P , currentNiveau3_P , currentNiveau4_P ) { 
	// 1 > Controle des pages courantes 
	var i ;
	for( i=0 ; i<this.ary_page.length ; i++ ) {
		if( this.ary_page[i] == page_courante ) {
			this.selected = true ;
			return true ;
		}
	}
	// 2 > Controle dans les sous-niveaux : 
	for( i=0 ; i<this.ary_niveau1.length  ; i++ ) {
		if( this.ary_niveau1[i].Actualise( page_courante , currentNiveau2_P , currentNiveau3_P , currentNiveau4_P ) ) {
			this.selected = true ;
			currentNiveau1_P[0] = this.ary_niveau1[ i ] ;
			return true ;
		}
	}
	return false ;
}

// Méthode de détermination de la première page
Chapitre.prototype.GetPremierePage = function() {
	// 1 > Parcours des pages courantes 
	if( this.ary_page.length > 0 ) return this.ary_page[ 0 ] ; 
	// 2 > Parcours des sous niveaux 
	var strPageTEMP = '' ; 
	for( i=0 ; i<this.ary_niveau1.length  ; i++ ) {
		strPageTEMP = this.ary_niveau1[i].GetPremierePage() ;
		if( strPageTEMP != '' ) return strPageTEMP ;
	}
	return '' ;
}

// Affichage d'un chapitre
Chapitre.prototype.AfficheChapitre = function( indiceChapitre_P ) {
	if( this.selected ) {
		document.writeln('<option value="'+indiceChapitre_P+'" selected>'+ this.indexAff + this.titre +'</option>') ; 
	} else { 
		document.writeln('<option value="'+indiceChapitre_P+'">'+ this.indexAff + this.titre +'</option>') ; 
	} 
} 

// Méthode d'affichage du pdf d'un chapitre 
Chapitre.prototype.AffichePdfChapitre = function() { 
	if( this.pdf_file == '' ) { 
		document.writeln('&nbsp;') ; 
	} else { 
		document.writeln('<a href="'+this.pdf_file+'" target="_blank"  title="&gt; T&eacute;l&eacute;charger le PDF du chapitre"><img src="../../images/ico-pdf_01.gif" width="21" height="13" align="absmiddle" border="0"></a>('+this.pdf_size+')') ; 
	} 
} 

// Affichage d'un niveau 1 
Chapitre.prototype.AfficheNiveau1 = function() { 
	var i ; 
	if( this.ary_niveau1.length > 0 ) { 
		//document.writeln('<div id="'+cst_nom_div_niveau1+'" style="width: 250px; overflow: hidden" >') ;
		document.writeln('<select name="'+ cst_nom_frm_niveau1 +'" onChange="ChangementNiveau1()" style="width: 340px;">') ;
		for( i=0 ; i<this.ary_niveau1.length ; i++ ) {
			this.ary_niveau1[ i ].AfficheNiveau1( i ) ;
		}
		document.writeln('</select>') ;
		//document.writeln('</div>') ;
	} else {
		document.writeln('&nbsp;') ;
	}
}

// Affichage de la pagination des pages
Chapitre.prototype.AfficheNavigationPage = function( page_courante_P , strPosition_P ) {
	if( this.ary_page.length <= 1 ) return void(0) ;
	var i, boolTrouver = false, boolAffichePrecedent = false, boolAfficheSuivant = false ;
	var indiceTrouver ;
	var pagePrecedent, pageSuivant ;
	for( i=0 ; i<this.ary_page.length ; i++ ) {
		if( this.ary_page[i] == page_courante_P ) {
			indiceTrouver = i ;
			boolTrouver = true ;
			if( i > 0 ) {
				boolAffichePrecedent = true ;
				pagePrecedent = this.ary_page[ i-1 ] ;
			}
			if( i < (this.ary_page.length - 1) ) {
				boolAfficheSuivant = true ;
				pageSuivant = this.ary_page[ i+1 ] ;
			}
		}
	}
	if( ! boolTrouver ) return void(0) ;
	// Affichage
	document.write('            <table width="508" border="0" cellspacing="0" cellpadding="0" id="ZonePagination">') ;
	document.write('              <tr valign="top">') ;
	document.write('                <td width="200" align="left" class="page">') ; 
	if( boolAffichePrecedent ) { 
		document.write(' <a href="'+ pagePrecedent +'" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'imgPrecedent'+ strPosition_P +'\',\'\',\'../../images/puce-precedent_over.gif\',1)" title="&gt; Page pr&eacute;c&eacute;dente"><img name="imgPrecedent'+ strPosition_P +'" border="0" src="../../images/puce-precedent.gif" width="16" height="8"><br>Page pr&eacute;c&eacute;dente</a>') ;
	} else {
		document.write('&nbsp;') ;
	}
	document.write('                </td>') ;
	document.write('                <td width="108" align="center" class="page">'+ (indiceTrouver+1) +'/'+ (this.ary_page.length) +'</td>') ;
	document.write('                <td width="200" align="right" class="page">') ; 
	if( boolAfficheSuivant ) { 
		document.write(' <a href="'+ pageSuivant +'" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'imgSuivant'+ strPosition_P +'\',\'\',\'../../images/puce-suivant_over.gif\',1)" title="&gt; Page suivante"><img name="imgSuivant'+ strPosition_P +'" border="0" src="../../images/puce-suivant.gif" width="16" height="8"><br>Page suivante</a>') ;
	} else {
		document.write('&nbsp;') ;
	}
	document.write('                </td>') ;
	document.write('              </tr>') ;
	document.write('              <tr align="left" valign="top">') ;
	document.write('                <td colspan="3" height="10"><img src="../../images/transparent.gif" width="508" height="10" border="0" alt=""></td>') ; 
	document.write('              </tr>') ;
	document.write('            </table>') ;
}

// Méthode d'affichage du sommaire
Chapitre.prototype.AfficheSommaire = function() {
	var i ;
	if( (this.titre == "") && (this.ary_niveau1.length == 0) ) return void(0) ;
	var titre_affichage = this.indexAff + this.titre ;
	var pageLien = this.GetPremierePage() ;
	if( pageLien == '' ) {
		document.writeln('<h1>'+ titre_affichage +'</h1>') ;
	} else {
		document.writeln('<h1><a name="'+ AfficheNameAnchor(pageLien) +'" href="javascript: AffichePageSommaire(\''+ pageLien +'\');">'+ titre_affichage +'</a></h1>') ;
	}
	for( i=0 ; i<this.ary_niveau1.length ; i++ ) {
		this.ary_niveau1[i].AfficheSommaire( this.indexAff ) ;
	}
}


// Méthode de changement du chapitre
Chapitre.prototype.ChangementChapitre = function() {
	// Controle si le chapitre possede des pages propres
	if( this.ary_page.length > 0 ) {
		// Redirection sur la première page
		window.location.href = this.ary_page[0] ;
	} else {
		if( this.ary_niveau1.length == 0 ) {
			alert('Changement du chapitre impossible !') ;
		} else {
			this.ary_niveau1[0].ChangementChapitre() ;
		}
	}
}

// Méthode de changement du niveau1
Chapitre.prototype.ChangementNiveau1 = function() {
	// Récupération de l'indice sélectionné
	var objSelect = document.forms[ cst_nom_form ].elements[ cst_nom_frm_niveau1 ] ;
	var indice = objSelect.options[ objSelect.selectedIndex ].value ;
	// Controle de l'existence du niveau1
	if( indice > this.ary_niveau1.length ) {
		alert('Changement du niveau 1 impossible !') ;
	} else {
		this.ary_niveau1[ indice ].ChangementNiveau1() ;
	}
}

// *
// *  Classe Niveau1 : gestion d'un niveau 1 de l'arborescence
// *
// *
// *

function Niveau1( index, index_afficher, titre, page ) {
	this.index_chapitre = 0 ;
	this.index = index ;
	this.indexAff = index_afficher ;
	this.titre = titre ;
	this.ary_page = new Array() ;
	if( page != "" ) this.ary_page[0] = page ;
	this.ary_niveau2 = new Array() ;
	this.selected = false ;
}

// Ajout d'une page
Niveau1.prototype.AddPage = function( page ) {
	if( (this.ary_niveau2.length > 0) && (this.ary_page.length == 0) ) {
		// Ajout d'un niveau
		var i, indice = 0 ;
		var aryTEMP = this.ary_niveau2 ;
		this.ary_niveau2 = new Array() ;
		this.ary_niveau2[indice] = new Niveau2( indice , "" , "" , page ) ;
		this.ary_niveau2[indice].index_chapitre = this.index_chapitre ;
		this.ary_niveau2[indice].index_niveau1  = this.index ;
		indice++ ;
		for( i=0 ; i<aryTEMP.length ; i++ ) {
			this.ary_niveau2[ indice ] = aryTEMP[i] ;
			indice++ ;
		}
	}
	this.ary_page[ this.ary_page.length ] = page ;
}

// Ajout d'un niveau 2
Niveau1.prototype.AddNiveau2 = function( index_afficher, titre, page ) {
	if( (this.ary_page.length > 0) && (this.ary_niveau2.length == 0) ) {
		this.ary_niveau2[ 0 ] = new Niveau2( 0, "", "", this.ary_page[0] ) ;
		this.ary_niveau2[ 0 ].index_chapitre = this.index_chapitre ;
		this.ary_niveau2[ 0 ].index_niveau1  = this.index ;
	}
	index = this.ary_niveau2.length ;
	this.ary_niveau2[ index ] = new Niveau2( index, index_afficher, titre, page ) ;
	this.ary_niveau2[ index ].index_chapitre = this.index_chapitre ;
	this.ary_niveau2[ index ].index_niveau1  = this.index ;
	return this.ary_niveau2[ index ] ;
}

// Méthode de détermination de l'arborescence courante
Niveau1.prototype.Actualise = function( page_courante , currentNiveau2_P , currentNiveau3_P , currentNiveau4_P ) {
	// 1 > Controle des pages courantes
	var i ;
	for( i=0 ; i<this.ary_page.length ; i++ ) {
		if( this.ary_page[i] == page_courante ) {
			this.selected = true ;
			return true ;
		}
	}
	// 2 > Controle dans les sous-niveaux :
	for( i=0 ; i<this.ary_niveau2.length  ; i++ ) {
		if( this.ary_niveau2[i].Actualise( page_courante , currentNiveau3_P , currentNiveau4_P ) ) {
			this.selected = true ;
			currentNiveau2_P[0] = this.ary_niveau2[ i ] ;
			return true ;
		}
	}
	return false ;
}

// Méthode de détermination de la première page
Niveau1.prototype.GetPremierePage = function() {
	// 1 > Parcours des pages courantes
	if( this.ary_page.length > 0 ) return this.ary_page[ 0 ] ;
	// 2 > Parcours des sous niveaux
	var strPageTEMP = '' ;
	for( i=0 ; i<this.ary_niveau2.length  ; i++ ) {
		strPageTEMP = this.ary_niveau2[i].GetPremierePage() ;
		if( strPageTEMP != '' ) return strPageTEMP ;
	}
	return '' ;
}

// Affichage d'un niveau 1
Niveau1.prototype.AfficheNiveau1 = function( indiceNiveau1_P ) {
	if( this.selected ) {
		document.writeln('<option value="'+indiceNiveau1_P+'" selected>'+ this.indexAff + this.titre +'</option>') ;
	} else {
		document.writeln('<option value="'+indiceNiveau1_P+'">'+ this.indexAff + this.titre +'</option>') ;
	}
}

// Affichage d'un niveau 2
Niveau1.prototype.AfficheNiveau2 = function() {
	var i ;
	//alert("Affichage des niveaux 2 à partir du niveau 1 sélectionné, nombre de niveau 2 : " + this.ary_niveau2.length ) ;
	if( this.ary_niveau2.length == 0 ) {
		document.writeln('&nbsp;') ;
	} else {
		//document.writeln('<div id="'+cst_nom_div_niveau2+'" style="width: 250px; overflow: hidden" >') ;
		document.writeln('<select name="'+ cst_nom_frm_niveau2 +'" onChange="ChangementNiveau2()" style="width: 340px;">') ;
		for( i=0 ; i<this.ary_niveau2.length ; i++ ) {
			this.ary_niveau2[ i ].AfficheNiveau2( i ) ;
		}
		document.writeln('</select>') ;
		//document.writeln('</div>') ;
	}
}

// Affichage de la pagination des pages
Niveau1.prototype.AfficheNavigationPage = function( page_courante_P , strPosition_P ) {
	if( this.ary_page.length <= 1 ) return void(0) ;
	var i, boolTrouver = false, boolAffichePrecedent = false, boolAfficheSuivant = false ;
	var indiceTrouver ;
	var pagePrecedent, pageSuivant ;
	for( i=0 ; i<this.ary_page.length ; i++ ) {
		if( this.ary_page[i] == page_courante_P ) {
			indiceTrouver = i ;
			boolTrouver = true ;
			if( i > 0 ) {
				boolAffichePrecedent = true ;
				pagePrecedent = this.ary_page[ i-1 ] ;
			}
			if( i < (this.ary_page.length - 1) ) {
				boolAfficheSuivant = true ;
				pageSuivant = this.ary_page[ i+1 ] ;
			}
		}
	}
	if( ! boolTrouver ) return void(0) ;
	// Affichage 
	document.write('            <table width="508" border="0" cellspacing="0" cellpadding="0" id="ZonePagination">') ;
	document.write('              <tr valign="top">') ;
	document.write('                <td width="200" align="left" class="page">') ; 
	if( boolAffichePrecedent ) { 
		document.write(' <a href="'+ pagePrecedent +'" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'imgPrecedent'+ strPosition_P +'\',\'\',\'../../images/puce-precedent_over.gif\',1)" title="&gt; Page pr&eacute;c&eacute;dente"><img name="imgPrecedent'+ strPosition_P +'" border="0" src="../../images/puce-precedent.gif" width="16" height="8"><br>Page pr&eacute;c&eacute;dente</a>') ;
	} else {
		document.write('&nbsp;') ;
	}
	document.write('                </td>') ;
	document.write('                <td width="108" align="center" class="page">'+ (indiceTrouver+1) +'/'+ (this.ary_page.length) +'</td>') ;
	document.write('                <td width="200" align="right" class="page">') ; 
	if( boolAfficheSuivant ) { 
		document.write(' <a href="'+ pageSuivant +'" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'imgSuivant'+ strPosition_P +'\',\'\',\'../../images/puce-suivant_over.gif\',1)" title="&gt; Page suivante"><img name="imgSuivant'+ strPosition_P +'" border="0" src="../../images/puce-suivant.gif" width="16" height="8"><br>Page suivante</a>') ;
	} else {
		document.write('&nbsp;') ;
	}
	document.write('                </td>') ;
	document.write('              </tr>') ;
	document.write('              <tr align="left" valign="top">') ;
	document.write('                <td colspan="3" height="10"><img src="../../images/transparent.gif" width="508" height="10" border="0" alt=""></td>') ; 
	document.write('              </tr>') ;
	document.write('            </table>') ;
}

// Méthode d'affichage du sommaire
Niveau1.prototype.AfficheSommaire = function( index_precedent_P ) {
	var i ;
	if( (this.titre == "") && (this.ary_niveau2.length == 0) ) return void(0) ;
	var titre_affichage = index_precedent_P + this.indexAff + this.titre ;
	//alert("Titre affichage de niveau 1 : "+ titre_affichage ) ;
	var pageLien = this.GetPremierePage() ;
	if( pageLien == '' ) {
		document.writeln('<h2>'+ titre_affichage +'</h2>') ;
	} else {
		document.writeln('<h2><a name="'+ AfficheNameAnchor(pageLien) +'" href="javascript: AffichePageSommaire(\''+ pageLien +'\');">'+ titre_affichage +'</a></h2>') ;
	}
	for( i=0 ; i<this.ary_niveau2.length ; i++ ) {
		this.ary_niveau2[i].AfficheSommaire( (index_precedent_P + this.indexAff) ) ;
	}
}


// Méthode de changement du chapitre
Niveau1.prototype.ChangementChapitre = function() {
	// Controle si le niveau1 possede des pages propres
	if( this.ary_page.length > 0 ) {
		// Redirection sur la première page
		window.location.href = this.ary_page[0] ;
	} else {
		if( this.ary_niveau2.length == 0 ) {
			alert('Changement du chapitre impossible !') ;
		} else {
			this.ary_niveau2[0].ChangementChapitre() ;
		}
	}
}

// Méthode de changement du niveau1
Niveau1.prototype.ChangementNiveau1 = function() {
	// Controle si le Niveau1 possede des pages propres
	if( this.ary_page.length > 0 ) {
		// Redirection sur la première page
		window.location.href = this.ary_page[0] ;
	} else {
		if( this.ary_niveau2.length == 0 ) {
			alert('Changement du niveau 1 impossible !') ;
		} else {
			this.ary_niveau2[0].ChangementNiveau1() ;
		}
	}
}

// Méthode de changement du niveau1
Niveau1.prototype.ChangementNiveau2 = function() {
	// Récupération de l'indice sélectionné
	var objSelect = document.forms[ cst_nom_form ].elements[ cst_nom_frm_niveau2 ] ;
	var indice = objSelect.options[ objSelect.selectedIndex ].value ;
	// Controle de l'existence du niveau2
	if( indice > this.ary_niveau2.length ) {
		alert('Changement du niveau 2 impossible !') ;
	} else {
		this.ary_niveau2[ indice ].ChangementNiveau2() ;
	}
}

// *
// *  Classe Niveau2 : gestion d'un niveau 2 de l'arborescence
// *
// *
// *

function Niveau2( index, index_afficher, titre, page ) {
	this.index_chapitre = 0 ;
	this.index_niveau1  = 0 ;
	this.index = index ;
	this.indexAff = index_afficher ;
	this.titre = titre ;
	this.ary_page = new Array() ;
	if( page != "" ) this.ary_page[0] = page ;
	this.ary_niveau3 = new Array() ;
	this.selected = false ;
}

// Ajout d'une page
Niveau2.prototype.AddPage = function( page ) {
	if( (this.ary_niveau3.length > 0) && (this.ary_page.length == 0) ) {
		// Ajout d'un niveau dans la page
		var i, indice = 0 ;
		var aryTEMP = this.ary_niveau3 ;
		this.ary_niveau3 = new Array() ;
		this.ary_niveau3[indice] = new Niveau3( indice , "" , "" , page ) ;
		this.ary_niveau3[indice].index_chapitre = this.index_chapitre ;
		this.ary_niveau3[indice].index_niveau1  = this.index_niveau1  ;
		this.ary_niveau3[indice].index_niveau2  = this.index ;
		indice++ ;
		for( i=0 ; i<aryTEMP.length ; i++ ) {
			this.ary_niveau3[ indice ] = aryTEMP[i] ;
			indice++ ;
		}
	}
	this.ary_page[ this.ary_page.length ] = page ;
}

// Ajout d'un niveau 3
Niveau2.prototype.AddNiveau3 = function( index_afficher, titre, page ) {
	if( (this.ary_page.length > 0) && (this.ary_niveau3.length == 0) ) {
		this.ary_niveau3[ 0 ] = new Niveau3( 0, "", "", this.ary_page[0] ) ;
		this.ary_niveau3[ 0 ].index_chapitre = this.index_chapitre ;
		this.ary_niveau3[ 0 ].index_niveau1  = this.index_niveau1 ;
		this.ary_niveau3[ 0 ].index_niveau2  = this.index ;
	}
	index = this.ary_niveau3.length ;
	this.ary_niveau3[ index ] = new Niveau3( index, index_afficher, titre, page ) ;
	this.ary_niveau3[ index ].index_chapitre = this.index_chapitre ;
	this.ary_niveau3[ index ].index_niveau1  = this.index_niveau1 ;
	this.ary_niveau3[ index ].index_niveau2  = this.index ;
	return this.ary_niveau3[ index ] ;
}

// Méthode de détermination de la première page
Niveau2.prototype.GetPremierePage = function() {
	// 1 > Parcours des pages courantes
	if( this.ary_page.length > 0 ) return this.ary_page[ 0 ] ;
	// 2 > Parcours des sous niveaux
	var strPageTEMP = '' ;
	for( i=0 ; i<this.ary_niveau3.length  ; i++ ) {
		strPageTEMP = this.ary_niveau3[i].GetPremierePage() ;
		if( strPageTEMP != '' ) return strPageTEMP ;
	}
	return '' ;
}

// Méthode de détermination de l'arborescence courante
Niveau2.prototype.Actualise = function( page_courante , currentNiveau3_P , currentNiveau4_P ) {
	// 1 > Controle des pages courantes
	var i ;
	for( i=0 ; i<this.ary_page.length ; i++ ) {
		if( this.ary_page[i] == page_courante ) {
			this.selected = true ;
			return true ;
		}
	}
	// 2 > Controle dans les sous-niveaux :
	for( i=0 ; i<this.ary_niveau3.length  ; i++ ) {
		if( this.ary_niveau3[i].Actualise( page_courante , currentNiveau4_P ) ) {
			this.selected = true ;
			currentNiveau3_P[0] = this.ary_niveau3[ i ] ;
			return true ;
		}
	}
	return false ;
}

// Affichage d'un niveau 2
Niveau2.prototype.AfficheNiveau2 = function( indiceNiveau2_P ) {
	if( this.selected ) {
		document.writeln('<option value="'+indiceNiveau2_P+'" selected>'+ this.indexAff + this.titre +'</option>') ;
	} else {
		document.writeln('<option value="'+indiceNiveau2_P+'">'+ this.indexAff + this.titre +'</option>') ;
	}
}

// Affichage d'un niveau 3
Niveau2.prototype.AfficheNiveau3 = function() {
	var i ;
	if( this.ary_niveau3.length == 0 ) {
		document.writeln('&nbsp;') ;
	} else {
		//document.writeln('<div id="'+cst_nom_div_niveau3+'" style="width: 250px; overflow: hidden" >') ;
		document.writeln('<select name="'+ cst_nom_frm_niveau3 +'" onChange="ChangementNiveau3()" style="width: 340px;">') ;
		for( i=0 ; i<this.ary_niveau3.length ; i++ ) {
			this.ary_niveau3[ i ].AfficheNiveau3( i ) ;
		}
		document.writeln('</select>') ;
		//document.writeln('</div>') ;
	}
}

// Affichage de la pagination des pages
Niveau2.prototype.AfficheNavigationPage = function( page_courante_P , strPosition_P ) {
	if( this.ary_page.length <= 1 ) return void(0) ;
	var i, boolTrouver = false, boolAffichePrecedent = false, boolAfficheSuivant = false ;
	var indiceTrouver ;
	var pagePrecedent, pageSuivant ;
	for( i=0 ; i<this.ary_page.length ; i++ ) {
		if( this.ary_page[i] == page_courante_P ) {
			indiceTrouver = i ;
			boolTrouver = true ;
			if( i > 0 ) {
				boolAffichePrecedent = true ;
				pagePrecedent = this.ary_page[ i-1 ] ;
			}
			if( i < (this.ary_page.length - 1) ) {
				boolAfficheSuivant = true ;
				pageSuivant = this.ary_page[ i+1 ] ;
			}
		}
	}
	if( ! boolTrouver ) return void(0) ;
	// Affichage 
	document.write('            <table width="508" border="0" cellspacing="0" cellpadding="0" id="ZonePagination">') ;
	document.write('              <tr valign="top">') ;
	document.write('                <td width="200" align="left" class="page">') ; 
	if( boolAffichePrecedent ) { 
		document.write(' <a href="'+ pagePrecedent +'" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'imgPrecedent'+ strPosition_P +'\',\'\',\'../../images/puce-precedent_over.gif\',1)" title="&gt; Page pr&eacute;c&eacute;dente"><img name="imgPrecedent'+ strPosition_P +'" border="0" src="../../images/puce-precedent.gif" width="16" height="8"><br>Page pr&eacute;c&eacute;dente</a>') ;
	} else {
		document.write('&nbsp;') ;
	}
	document.write('                </td>') ;
	document.write('                <td width="108" align="center" class="page">'+ (indiceTrouver+1) +'/'+ (this.ary_page.length) +'</td>') ;
	document.write('                <td width="200" align="right" class="page">') ; 
	if( boolAfficheSuivant ) { 
		document.write(' <a href="'+ pageSuivant +'" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'imgSuivant'+ strPosition_P +'\',\'\',\'../../images/puce-suivant_over.gif\',1)" title="&gt; Page suivante"><img name="imgSuivant'+ strPosition_P +'" border="0" src="../../images/puce-suivant.gif" width="16" height="8"><br>Page suivante</a>') ;
	} else {
		document.write('&nbsp;') ;
	}
	document.write('                </td>') ;
	document.write('              </tr>') ;
	document.write('              <tr align="left" valign="top">') ;
	document.write('                <td colspan="3" height="10"><img src="../../images/transparent.gif" width="508" height="10" border="0" alt=""></td>') ; 
	document.write('              </tr>') ;
	document.write('            </table>') ;
}

// Méthode d'affichage du sommaire
Niveau2.prototype.AfficheSommaire = function( index_precedent_P ) {
	var i ;
	if( (this.titre == "") && (this.ary_niveau3.length == 0) ) return void(0) ;
	var titre_affichage = index_precedent_P + this.indexAff + this.titre ;
	//alert("Titre affichage de niveau 2 : "+ titre_affichage ) ;
	var pageLien = this.GetPremierePage() ;
	if( pageLien == '' ) {
		document.writeln('<h3>'+ titre_affichage +'</h3>') ;
	} else {
		document.writeln('<h3><a name="'+ AfficheNameAnchor(pageLien) +'" href="javascript: AffichePageSommaire(\''+ pageLien +'\');">'+ titre_affichage +'</a></h3>') ;
	}
	for( i=0 ; i<this.ary_niveau3.length ; i++ ) {
		this.ary_niveau3[i].AfficheSommaire( (index_precedent_P + this.indexAff) ) ;
	}
}

// Méthode de changement du chapitre
Niveau2.prototype.ChangementChapitre = function() {
	// Controle si le Niveau2 possede des pages propres
	if( this.ary_page.length > 0 ) {
		// Redirection sur la première page
		window.location.href = this.ary_page[0] ;
	} else {
		if( this.ary_niveau3.length == 0 ) {
			alert('Changement du chapitre impossible !') ;
		} else {
			this.ary_niveau3[0].ChangementChapitre() ;
		}
	}
}

// Méthode de changement du niveau1
Niveau2.prototype.ChangementNiveau1 = function() {
	// Controle si le Niveau2 possede des pages propres
	if( this.ary_page.length > 0 ) {
		// Redirection sur la première page
		window.location.href = this.ary_page[0] ;
	} else {
		if( this.ary_niveau3.length == 0 ) {
			alert('Changement du niveau 1 impossible !') ;
		} else {
			this.ary_niveau3[0].ChangementNiveau1() ;
		}
	}
}

// Méthode de changement du niveau2
Niveau2.prototype.ChangementNiveau2 = function() {
	// Controle si le Niveau2 possede des pages propres
	if( this.ary_page.length > 0 ) {
		// Redirection sur la première page
		window.location.href = this.ary_page[0] ;
	} else {
		if( this.ary_niveau3.length == 0 ) {
			alert('Changement du niveau 2 impossible !') ;
		} else {
			this.ary_niveau3[0].ChangementNiveau2() ;
		}
	}
}

// Méthode de changement du niveau3
Niveau2.prototype.ChangementNiveau3 = function() {
	// Récupération de l'indice sélectionné
	var objSelect = document.forms[ cst_nom_form ].elements[ cst_nom_frm_niveau3 ] ;
	var indice = objSelect.options[ objSelect.selectedIndex ].value ;
	// Controle de l'existence du niveau3
	if( indice > this.ary_niveau3.length ) {
		alert('Changement du niveau 3 impossible !') ;
	} else {
		this.ary_niveau3[ indice ].ChangementNiveau3() ;
	}
}

// *
// *  Classe Niveau3 : gestion d'un niveau 3 de l'arborescence
// *
// *
// *

function Niveau3( index, index_afficher, titre, page ) {
	this.index_chapitre = 0 ;
	this.index_niveau1  = 0 ;
	this.index_niveau2  = 0 ;
	this.index = index ;
	this.indexAff = index_afficher ;
	this.titre = titre ;
	this.ary_page = new Array() ;
	if( page != "" ) this.ary_page[0] = page ;
	this.ary_niveau4 = new Array() ;
	this.selected = false ;
}

// Ajout d'une page
Niveau3.prototype.AddPage = function( page ) {
	if( (this.ary_niveau4.length > 0) && (this.ary_page.length == 0) ) {
		// Ajout d'un niveau dans la page
		var i, indice = 0 ;
		var aryTEMP = this.ary_niveau4 ;
		this.ary_niveau4 = new Array() ;
		this.ary_niveau4[indice] = new Niveau4( indice , "" , "" , page ) ;
		this.ary_niveau4[indice].index_chapitre = this.index_chapitre ;
		this.ary_niveau4[indice].index_niveau1  = this.index_niveau1  ;
		this.ary_niveau4[indice].index_niveau2  = this.index_niveau2 ;
		this.ary_niveau4[indice].index_niveau3  = this.index ;
		indice++ ;
		for( i=0 ; i<aryTEMP.length ; i++ ) {
			this.ary_niveau4[ indice ] = aryTEMP[i] ;
			indice++ ;
		}
	}
	this.ary_page[ this.ary_page.length ] = page ;
}

// Ajout d'un niveau 4
Niveau3.prototype.AddNiveau4 = function( index_afficher, titre, page ) {
	if( (this.ary_page.length > 0) && (this.ary_niveau4.length == 0) ) {
		this.ary_niveau4[ 0 ] = new Niveau4( 0, "", "", this.ary_page[0] ) ;
		this.ary_niveau4[ 0 ].index_chapitre = this.index_chapitre ;
		this.ary_niveau4[ 0 ].index_niveau1  = this.index_niveau1 ;
		this.ary_niveau4[ 0 ].index_niveau2  = this.index_niveau2 ;
		this.ary_niveau4[ 0 ].index_niveau3  = this.index ;
	}
	index = this.ary_niveau4.length ;
	this.ary_niveau4[ index ] = new Niveau4( index, index_afficher, titre, page ) ;
	this.ary_niveau4[ index ].index_chapitre = this.index_chapitre ;
	this.ary_niveau4[ index ].index_niveau1  = this.index_niveau1 ;
	this.ary_niveau4[ index ].index_niveau2  = this.index_niveau2 ;
	this.ary_niveau4[ index ].index_niveau3  = this.index ;
	return this.ary_niveau4[ index ] ;
}

// Méthode de détermination de l'arborescence courante
Niveau3.prototype.Actualise = function( page_courante , currentNiveau4_P ) {
	// 1 > Controle des pages courantes
	var i ;
	for( i=0 ; i<this.ary_page.length ; i++ ) {
		if( this.ary_page[i] == page_courante ) {
			this.selected = true ;
			return true ;
		}
	}
	// 2 > Controle dans les sous-niveaux :
	for( i=0 ; i<this.ary_niveau4.length  ; i++ ) {
		if( this.ary_niveau4[i].Actualise( page_courante ) ) {
			this.selected = true ;
			currentNiveau4_P[0] = this.ary_niveau4[ i ] ;
			return true ;
		}
	}
	return false ;
}

// Méthode de détermination de la première page
Niveau3.prototype.GetPremierePage = function() {
	// 1 > Parcours des pages courantes
	if( this.ary_page.length > 0 ) return this.ary_page[ 0 ] ;
	// 2 > Parcours des sous niveaux
	var strPageTEMP = '' ;
	for( i=0 ; i<this.ary_niveau4.length  ; i++ ) {
		strPageTEMP = this.ary_niveau4[i].GetPremierePage() ;
		if( strPageTEMP != '' ) return strPageTEMP ;
	}
	return '' ;
}

// Affichage d'un niveau 3
Niveau3.prototype.AfficheNiveau3 = function( indiceNiveau3_P ) {
	if( this.selected ) {
		document.writeln('<option value="'+indiceNiveau3_P+'" selected>'+ this.indexAff + this.titre +'</option>') ;
	} else {
		document.writeln('<option value="'+indiceNiveau3_P+'">'+ this.indexAff + this.titre +'</option>') ;
	}
}

// Affichage d'un niveau 4
Niveau3.prototype.AfficheNiveau4 = function() {
	var i ;
	if( this.ary_niveau4.length == 0 ) {
		document.writeln('&nbsp;') ;
	} else {
		//document.writeln('<div id="'+cst_nom_div_niveau4+'" style="width: 250px; overflow: hidden" >') ;
		document.writeln('<select name="'+ cst_nom_frm_niveau4 +'" onChange="ChangementNiveau4()" style="width: 340px;">') ;
		for( i=0 ; i<this.ary_niveau4.length ; i++ ) {
			this.ary_niveau4[ i ].AfficheNiveau4( i ) ;
		}
		document.writeln('</select>') ;
		//document.writeln('</div>') ;
	}
}

// Affichage de la pagination des pages
Niveau3.prototype.AfficheNavigationPage = function( page_courante_P , strPosition_P ) {
	if( this.ary_page.length <= 1 ) return void(0) ;
	var i, boolTrouver = false, boolAffichePrecedent = false, boolAfficheSuivant = false ;
	var indiceTrouver ;
	var pagePrecedent, pageSuivant ;
	for( i=0 ; i<this.ary_page.length ; i++ ) {
		if( this.ary_page[i] == page_courante_P ) {
			indiceTrouver = i ;
			boolTrouver = true ;
			if( i > 0 ) {
				boolAffichePrecedent = true ;
				pagePrecedent = this.ary_page[ i-1 ] ;
			}
			if( i < (this.ary_page.length - 1) ) {
				boolAfficheSuivant = true ;
				pageSuivant = this.ary_page[ i+1 ] ;
			}
		}
	}
	if( ! boolTrouver ) return void(0) ;
	// Affichage 
	document.write('            <table width="508" border="0" cellspacing="0" cellpadding="0" id="ZonePagination">') ;
	document.write('              <tr valign="top">') ;
	document.write('                <td width="200" align="left" class="page">') ; 
	if( boolAffichePrecedent ) { 
		document.write(' <a href="'+ pagePrecedent +'" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'imgPrecedent'+ strPosition_P +'\',\'\',\'../../images/puce-precedent_over.gif\',1)" title="&gt; Page pr&eacute;c&eacute;dente"><img name="imgPrecedent'+ strPosition_P +'" border="0" src="../../images/puce-precedent.gif" width="16" height="8"><br>Page pr&eacute;c&eacute;dente</a>') ;
	} else {
		document.write('&nbsp;') ;
	}
	document.write('                </td>') ;
	document.write('                <td width="108" align="center" class="page">'+ (indiceTrouver+1) +'/'+ (this.ary_page.length) +'</td>') ;
	document.write('                <td width="200" align="right" class="page">') ; 
	if( boolAfficheSuivant ) { 
		document.write(' <a href="'+ pageSuivant +'" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'imgSuivant'+ strPosition_P +'\',\'\',\'../../images/puce-suivant_over.gif\',1)" title="&gt; Page suivante"><img name="imgSuivant'+ strPosition_P +'" border="0" src="../../images/puce-suivant.gif" width="16" height="8"><br>Page suivante</a>') ;
	} else {
		document.write('&nbsp;') ;
	}
	document.write('                </td>') ;
	document.write('              </tr>') ;
	document.write('              <tr align="left" valign="top">') ;
	document.write('                <td colspan="3" height="10"><img src="../../images/transparent.gif" width="508" height="10" border="0" alt=""></td>') ; 
	document.write('              </tr>') ;
	document.write('            </table>') ;
}

// Méthode d'affichage du sommaire
Niveau3.prototype.AfficheSommaire = function( index_precedent_P ) {
	var i ;
	if( (this.titre == "") && (this.ary_niveau4.length == 0) ) return void(0) ;
	var titre_affichage = index_precedent_P + this.indexAff + this.titre ;
	//alert("Titre affichage de niveau 3 : "+ titre_affichage ) ;
	var pageLien = this.GetPremierePage() ;
	if( pageLien == '' ) {
		document.writeln('<h4>'+ titre_affichage +'</h4>') ;
	} else {
		document.writeln('<h4><a name="'+ AfficheNameAnchor(pageLien) +'" href="javascript: AffichePageSommaire(\''+ pageLien +'\');">'+ titre_affichage +'</a></h4>') ;
	}
	for( i=0 ; i<this.ary_niveau4.length ; i++ ) {
		this.ary_niveau4[i].AfficheSommaire( (index_precedent_P + this.indexAff) ) ;
	}
}

// Méthode de changement du chapitre
Niveau3.prototype.ChangementChapitre = function() {
	// Controle si le Niveau3 possede des pages propres
	if( this.ary_page.length > 0 ) {
		// Redirection sur la première page
		window.location.href = this.ary_page[0] ;
	} else {
		if( this.ary_niveau4.length == 0 ) {
			alert('Changement du chapitre impossible !') ;
		} else {
			this.ary_niveau4[0].ChangementChapitre() ;
		}
	}
}

// Méthode de changement du Niveau1
Niveau3.prototype.ChangementNiveau1 = function() {
	// Controle si le Niveau3 possede des pages propres
	if( this.ary_page.length > 0 ) {
		// Redirection sur la première page
		window.location.href = this.ary_page[0] ;
	} else {
		if( this.ary_niveau4.length == 0 ) {
			alert('Changement du niveau 1 impossible !') ;
		} else {
			this.ary_niveau4[0].ChangementNiveau1() ;
		}
	}
}

// Méthode de changement du Niveau2
Niveau3.prototype.ChangementNiveau2 = function() {
	// Controle si le Niveau3 possede des pages propres
	if( this.ary_page.length > 0 ) {
		// Redirection sur la première page
		window.location.href = this.ary_page[0] ;
	} else {
		if( this.ary_niveau4.length == 0 ) {
			alert('Changement du niveau 2 impossible !') ;
		} else {
			this.ary_niveau4[0].ChangementNiveau2() ;
		}
	}
}

// Méthode de changement du Niveau2
Niveau3.prototype.ChangementNiveau3 = function() {
	// Controle si le Niveau3 possede des pages propres
	if( this.ary_page.length > 0 ) {
		// Redirection sur la première page
		window.location.href = this.ary_page[0] ;
	} else {
		if( this.ary_niveau4.length == 0 ) {
			alert('Changement du niveau 3 impossible !') ;
		} else {
			this.ary_niveau4[0].ChangementNiveau3() ;
		}
	}
}

// Méthode de changement du niveau4
Niveau3.prototype.ChangementNiveau4 = function() {
	// Récupération de l'indice sélectionné
	var objSelect = document.forms[ cst_nom_form ].elements[ cst_nom_frm_niveau4 ] ;
	var indice = objSelect.options[ objSelect.selectedIndex ].value ;
	// Controle de l'existence du niveau4
	if( indice > this.ary_niveau4.length ) {
		alert('Changement du niveau 4 impossible !') ;
	} else {
		this.ary_niveau4[ indice ].ChangementNiveau4() ;
	}
}

// *
// *  Classe Niveau4 : gestion d'un niveau 4 de l'arborescence
// *
// *
// *

function Niveau4( index, index_afficher, titre, page ) {
	this.index_chapitre = 0 ;
	this.index_niveau1  = 0 ;
	this.index_niveau2  = 0 ;
	this.index_niveau3  = 0 ;
	this.index = index ;
	this.indexAff = index_afficher ;
	this.titre = titre ;
	this.ary_page = new Array() ;
	if( page != "" ) this.ary_page[0] = page ;
	this.selected = false ;
}

// Ajout d'une page
Niveau4.prototype.AddPage = function( page ) {
	this.ary_page[ this.ary_page.length ] = page
}

// Méthode de détermination de l'arborescence courante
Niveau4.prototype.Actualise = function( page_courante ) {
	// 1 > Controle des pages courantes
	var i ;
	for( i=0 ; i<this.ary_page.length ; i++ ) {
		if( this.ary_page[i] == page_courante ) {
			this.selected = true ;
			return true ;
		}
	}
	return false ;
}

// Méthode de détermination de la première page
Niveau4.prototype.GetPremierePage = function() {
	// 1 > Parcours des pages courantes
	if( this.ary_page.length > 0 ) return this.ary_page[ 0 ] ;
	return '' ;
}

// Affichage d'un niveau 4
Niveau4.prototype.AfficheNiveau4 = function( indiceNiveau4_P ) {
	if( this.selected ) {
		document.writeln('<option value="'+indiceNiveau4_P+'" selected>'+ this.indexAff + this.titre +'</option>') ;
	} else {
		document.writeln('<option value="'+indiceNiveau4_P+'">'+ this.indexAff + this.titre +'</option>') ;
	}
}

// Affichage de la pagination des pages
Niveau4.prototype.AfficheNavigationPage = function( page_courante_P , strPosition_P ) {
	if( this.ary_page.length <= 1 ) return void(0) ;
	var i, boolTrouver = false, boolAffichePrecedent = false, boolAfficheSuivant = false ;
	var indiceTrouver ;
	var pagePrecedent, pageSuivant ;
	for( i=0 ; i<this.ary_page.length ; i++ ) {
		if( this.ary_page[i] == page_courante_P ) {
			indiceTrouver = i ;
			boolTrouver = true ;
			if( i > 0 ) {
				boolAffichePrecedent = true ;
				pagePrecedent = this.ary_page[ i-1 ] ;
			}
			if( i < (this.ary_page.length - 1) ) {
				boolAfficheSuivant = true ;
				pageSuivant = this.ary_page[ i+1 ] ;
			}
		}
	}
	if( ! boolTrouver ) return void(0) ;
	// Affichage 
	document.write('            <table width="508" border="0" cellspacing="0" cellpadding="0" id="ZonePagination">') ;
	document.write('              <tr valign="top">') ;
	document.write('                <td width="200" align="left" class="page">') ; 
	if( boolAffichePrecedent ) { 
		document.write(' <a href="'+ pagePrecedent +'" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'imgPrecedent'+ strPosition_P +'\',\'\',\'../../images/puce-precedent_over.gif\',1)" title="&gt; Page pr&eacute;c&eacute;dente"><img name="imgPrecedent'+ strPosition_P +'" border="0" src="../../images/puce-precedent.gif" width="16" height="8"><br>Page pr&eacute;c&eacute;dente</a>') ;
	} else {
		document.write('&nbsp;') ;
	}
	document.write('                </td>') ;
	document.write('                <td width="108" align="center" class="page">'+ (indiceTrouver+1) +'/'+ (this.ary_page.length) +'</td>') ;
	document.write('                <td width="200" align="right" class="page">') ; 
	if( boolAfficheSuivant ) { 
		document.write(' <a href="'+ pageSuivant +'" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'imgSuivant'+ strPosition_P +'\',\'\',\'../../images/puce-suivant_over.gif\',1)" title="&gt; Page suivante"><img name="imgSuivant'+ strPosition_P +'" border="0" src="../../images/puce-suivant.gif" width="16" height="8"><br>Page suivante</a>') ;
	} else {
		document.write('&nbsp;') ;
	}
	document.write('                </td>') ;
	document.write('              </tr>') ;
	document.write('              <tr align="left" valign="top">') ;
	document.write('                <td colspan="3" height="10"><img src="../../images/transparent.gif" width="508" height="10" border="0" alt=""></td>') ; 
	document.write('              </tr>') ;
	document.write('            </table>') ;
}

// Méthode d'affichage du sommaire
Niveau4.prototype.AfficheSommaire = function( index_precedent_P ) {
	var i ;
	if( this.titre == "" ) return void(0) ;
	var titre_affichage = index_precedent_P + this.indexAff + this.titre ;
	//alert("Titre affichage de niveau 4 : "+ titre_affichage ) ;
	var pageLien = this.GetPremierePage() ;
	if( pageLien == '' ) {
		document.writeln('<h5>'+ titre_affichage +'</h5>') ;
	} else {
		document.writeln('<h5><a name="'+ AfficheNameAnchor(pageLien) +'" href="javascript: AffichePageSommaire(\''+ pageLien +'\');">'+ titre_affichage +'</a></h5>') ;
	}
}

// Méthode de changement du chapitre
Niveau4.prototype.ChangementChapitre = function() {
	// Controle si le Niveau4 possede des pages propres
	if( this.ary_page.length > 0 ) {
		// Redirection sur la première page
		window.location.href = this.ary_page[0] ;
	} else {
		alert('Changement du chapitre impossible !') ;
	}
}

// Méthode de changement du Niveau 1
Niveau4.prototype.ChangementNiveau1 = function() {
	// Controle si le Niveau4 possede des pages propres
	if( this.ary_page.length > 0 ) {
		// Redirection sur la première page
		window.location.href = this.ary_page[0] ;
	} else {
		alert('Changement du niveau 1 impossible !') ;
	}
}

// Méthode de changement du Niveau 2
Niveau4.prototype.ChangementNiveau2 = function() {
	// Controle si le Niveau4 possede des pages propres
	if( this.ary_page.length > 0 ) {
		// Redirection sur la première page
		window.location.href = this.ary_page[0] ;
	} else {
		alert('Changement du niveau 2 impossible !') ;
	}
}

// Méthode de changement du Niveau 3
Niveau4.prototype.ChangementNiveau3 = function() {
	// Controle si le Niveau4 possede des pages propres
	if( this.ary_page.length > 0 ) {
		// Redirection sur la première page
		window.location.href = this.ary_page[0] ;
	} else {
		alert('Changement du niveau 3 impossible !') ;
	}
}

// Méthode de changement du Niveau 4
Niveau4.prototype.ChangementNiveau4 = function() {
	// Controle si le Niveau4 possede des pages propres
	if( this.ary_page.length > 0 ) {
		// Redirection sur la première page
		window.location.href = this.ary_page[0] ;
	} else {
		alert('Changement du niveau 4 impossible !') ;
	}
}


