if (typeof (niveau)=="undefined") niveau='../';

//1. Partie paramétrable
//2. Partie commune toutes chartes
//3. Partie visuelle commune chartes semblables
//4. Partie visuelle spécifique

//////////////////////////////// 1. Partie paramétrable

var charte_nomSite='Info-Sectes';

//Onglets
var charte_dossiers=new Array('Accueil','Témoins de Jéhovah','Mormons','Occulte','Sectes','Religions','La secte');

charte_plan=new Array();
charte_plan['Accueil']=new Array('index.htm','Accueil','faq/faq.htm','FAQ Sectes','outils/plan.htm','Plan du site','pages/nouveau.htm','Nouveautés','pages/sos.htm','SOS Sectes');
charte_plan['Témoins de Jéhovah']=new Array('tj/index.htm','Sommaire TJ','tj/temoign/index.htm','Témoignages','tj/xx.htm','Faux prophètes','tj/question/quiestjc.htm','Jésus-Christ: homme, ange, Dieu?');
charte_plan['Mormons']=new Array('mormon/index.htm','Sommaire','mormon/pourquoi.htm','Pourquoi je ne suis pas mormon');
charte_plan['Occulte']=new Array('occulte/index.htm','Sommaire','enfants/index.htm','Enfants','haloween/index.htm','Halloween','satan/index.htm','Satanisme','roles/index.htm','Jeux de rôles','newage/newage.htm','Nouvel age');
charte_plan['Sectes']=new Array('sectesgd/index.htm','Sectes','pages/sectes.htm','liste sectes','gemppi/index.htm','Gemppi');
charte_plan['Religions']=new Array('religion/index.htm','Sommaire','islam/islam.htm','islam','faq/catholique.htm','catholique','faq/evangeliques.htm','évangéliques');
charte_plan['La secte']=new Array('pages/index.htm','Sommaire','pages/meca.htm','Mécanique sectaire');

//Sous-dossiers
charte_plan['Jeux de rôles']=new Array('roles/index.htm','Jeux de rôles','roles/temoignages/index.htm','Témoignages','roles/faq.htm','FAQ');
charte_plan['Halloween']=new Array('haloween/index.htm','Sommaire Halloween','halloween/index.htm','Lettres types','enfants/index.htm','Enfants');
charte_plan['Satanisme']=new Array('satan/index.htm','Satanisme','satan/gothique.htm','Gothisme','roles/index.htm','Jeux de rôles');
charte_plan['Enfants']=new Array('enfants/index.htm','Enfants','haloween/index.htm','Halloween','roles/index.htm','Jeux de rôles');
charte_plan['Excès']=new Array('exces/index.htm','Excès');

//Permet de retrouver l'onglet associé à un sous dossier 
//Pour chaque sous dossier on donne le nom du dossier parent
charte_parent=new Array();
charte_parent['Jeux de rôles']='Occulte';
charte_parent['Enfants']='Occulte';
charte_parent['Halloween']='Occulte';
charte_parent['Satanisme']='Occulte';
charte_parent['Découvertes sur les sectes et religions']='Sectes';

///////////// Partie commune chartes

////////////////////////////// 2. Partie commune toutes chartes

//Variables transmises par la page
var dossier; //onglet
var rubrique; // Texte associé au lien retour
var niveau;
var retour; // url proposée pour suite
var sommaire;

var charte_chemin=location.pathname;
charte_chemin=charte_chemin.replace(/\\/g , "/"); 

// Standardisation JavaScript

function charte_standard() {
	if (!document.styleSheets[0].addRule) {
		document.styleSheets[0].addRule = new Function('element','regle', 'this.insertRule(element +" {"+ regle +"}",this.cssRules.length )');
	}
}
if (!document.getElementById && document.all) document.getElementById = new Function('id', 'return document.all[id]') 

//Valeurs par défaut 

if (typeof (dossier)=="undefined" && (typeof (rubrique)=="undefined")) dossier=charte_nomSite;
if (typeof (rubrique)=="undefined") rubrique=dossier;
if (typeof (dossier)=="undefined") dossier=rubrique;
if (typeof (niveau)=="undefined") niveau='../';
if (typeof (sommaire)=="undefined") {
	if (charte_chemin.substring(charte_chemin.length-9,charte_chemin.length-4)=='index') sommaire=true;	
	else sommaire=false;
} 

if (typeof (retour)=="undefined") {
	if (sommaire) retour='../index.htm';
	else retour='index.htm';
}

var charte_ongletCourant=dossier;
//tq on a affaire à un sous-dossier avec onglet<>dossier on remonte d'un cran
while (charte_parent[charte_ongletCourant]) {
	charte_ongletCourant=charte_parent[charte_ongletCourant];
}


var etat_revele=0;
function charte_revele() {
	charte_standard();
	if (etat_revele==0)
		document.styleSheets[0].addRule(".cache","display:inline");
	else 
		document.styleSheets[0].addRule(".cache","display:none");
	etat_revele=1-etat_revele;
}

var etat_aide=0;
function charte_aide() {
	charte_standard();
	if (etat_aide==0)
		document.styleSheets[0].addRule(".aide","display:inline");
	else 
		document.styleSheets[0].addRule(".aide","display:none");
	etat_aide=1-etat_aide;
}



function ecrire(p_adresse) {
	p_adresse=p_adresse.replace(/¤/,'@');
	location.href='mailto:'+p_adresse;
}

if (typeof (rubrique)=="undefined") rubrique='Info-Sectes';
if (typeof (niveau)=="undefined") niveau='../';
if (typeof (liens)=="undefined") liens='[<A HREF="http://www.info-sectes.org">www.info-sectes.org</A>] [<A HREF="http://www.info-bible.org">www.info-bible.org</A>]';


charte_baseVisio=niveau+'../../visio/visiocssfinale/';
function bible(p_ref,p_type,p_version) {
	var lb_dupliquerRef=true,lb_icone=true;
	if (p_type==null) p_type='';
	if (p_type.indexOf('i')!=-1) {lb_dupliquerRef=false;} //Seulement l'icône
	if (p_type.indexOf('r')!=-1) {lb_icone=false;} //Seulement la référence
	

//http://bible.gospelcom.net/passage/?search=jean+3.16&version=32;
if (location.protocol.substring(0,4)=='http') 
//		document.write('<A href="http://bible.gospelcom.net/passage/?version=32&search='+escape(p_ref));
	document.write('<A href="http://visionneuse.free.fr/index.htm?xsl=on&ref='+escape(p_ref));
else {
	document.write('<A href="'+charte_baseVisio+'index.htm?ref='+escape(p_ref));
	if (p_version!=null) document.write('&version='+p_version) ;
}
	document.write('" target="bible" CLASS="ref">');
	
	if (lb_dupliquerRef) document.write(p_ref);
	if (lb_icone) document.write('<IMG src="'+niveau+'charte/bible.gif" class="ref" align=middle border=0 ALT="'+p_ref+'">');
	document.write('</A>')
}

//Ecrit les onglets
function charte_onglets() {
	var ls_classe;
	document.writeln ('<nofollow><table cellspacing=0 cellpadding=1 > ');
	document.writeln (' <tr align=center valign=middle> ');

	for (i=0;i<charte_dossiers.length;i++) {
		l_urlonglet=niveau+charte_plan[charte_dossiers[i]][0];
		if (charte_ongletCourant==charte_dossiers[i]) ls_classe='ongletactif'; else ls_classe='ongletinactif';
		document.write('<TD width=80 class="'+ls_classe+'" onclick="location.href=\''+l_urlonglet+'\';return false"><a class="'+ls_classe+'" TARGET=_TOP href="');
		document.write(l_urlonglet);
		document.write('">');
		document.write(charte_dossiers[i]);
		document.write('</a><td width=2>');
	}
	document.writeln (' <tr height=2>');
	for (i=0;i<charte_dossiers.length;i++) 
		document.writeln ('<td bgcolor=gray><td>');

	document.writeln (' </table></nofollow>'); 
}

//Ecrit les liens transversaux
function charte_liensTransversaux() {
	if (!charte_plan[dossier]) return;
	document.writeln('<div style="margin-bottom:0">');

	var ls_classe;

	for (j=0;j<charte_plan[dossier].length / 2 ; j++) {
	if (charte_chemin.substring(charte_chemin.length-charte_plan[dossier][2*j].length)==charte_plan[dossier][2*j]) ls_classe='lientransversalactif'; else ls_classe='lientransversalinactif';
		document.write('[<a class='+ls_classe+' href="'+niveau);
		document.write(charte_plan[dossier][2*j]);
		document.write('">');
		document.write(charte_plan[dossier][2*j+1]);
		document.write('</a>] ');
	}
	document.writeln('</div>');

}


function charte_entete() {


// haut
document.writeln('<div class="navigation"  align="center">'); 
document.writeln('<a name=haut />');
//Onglets
charte_onglets();


//rubrique
//document.write('<p><div class=rubrique ondblclick="charte_revele()">'+rubrique+'</div>'); 

document.writeln('<LINK REL="SHORTCUT ICON" href="http://www.info-sectes.org/favicon.ico">');
document.writeln('<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">');
document.writeln('<META HTTP-EQUIV="Page-Exit" content="revealTrans(Duration=1.0,Transition=21)">');

//document.writeln('<META HTTP-EQUIV="Page-Exit" content="blendTrans(Duration=2.0)">');

document.writeln('<A NAME="haut"></A>');

//Liens transversaux
charte_liensTransversaux();

//Barre rubrique
document.writeln('<br><TABLE CELLPADDING="0" cellspacing="0" WIDTH="100%"> ');
document.writeln('<TR>');
document.writeln('<TD WIDTH=30><A HREF="'+niveau+'index.htm" TARGET="_top"><IMG SRC="'+niveau+'charte/logo.gif" ALT="retour page d\'accueil" BORDER=0 WIDTH=30 HEIGHT=30></A></TD>');
document.writeln('<TD bgcolor=#003399 CLASS="rubrique" ondblclick="charte_revele()"><FONT COLOR=white>&nbsp;'+rubrique+'</FONT></TD>');
document.writeln('<TD bgcolor=#003399 ALIGN=right VALIGN=middle>');

document.writeln('<FORM ACTION="http://search.freefind.com/find.html" METHOD="GET" STYLE="display:inline">');
document.writeln('<INPUT TYPE="HIDDEN" NAME="id" SIZE="-1" VALUE="9312589">');
document.writeln('<INPUT TYPE="HIDDEN" NAME="pid" SIZE="-1" VALUE="r">');
document.writeln('<INPUT TYPE="HIDDEN" NAME="mode" SIZE="-1" VALUE="ALL">&nbsp;');
document.writeln('<INPUT TYPE="TEXT" NAME="query" SIZE=15 STYLE="font-family:arial;font-size:10">');
document.writeln('<INPUT TYPE="HIDDEN" NAME="lang" VALUE="fr" >');
document.writeln('<INPUT TYPE="SUBMIT" VALUE="Chercher!" STYLE="font-family:arial;font-size:10">');
document.writeln('<input type="HIDDEN" name="t" value="s">');
document.writeln('</FORM>');
document.writeln('</TD></TR></TABLE>');


//if (retour==null) document.writeln('<p><A HREF='+niveau+'index.htm><FONT SIZE=1>Retour à la page d\'accueil</FONT></A>');
//else if (retour!='') document.writeln('<p><A HREF="'+retour+'"><FONT SIZE=1>Retour au sommaire</FONT></A>');
//Mettre retour='' pour supprimer la ligne!


//corps

document.writeln('</div><div class=page>');

}



charte_entete();


