
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-Bible';
var charte_baseHref='http://www.info-bible.org/';
var charte_baseUtil='/util/';
if (location.host=='localhost') 
	var charte_racineServeurWeb='d:document'; 
else 
	var charte_racineServeurWeb='../..'; 
var charte_emailHref=niveau+'pages/contact.htm';
var charte_emailText="Contact";
var charte_classeOutilsAdministration='cache'; // 'cache' => masqués, '' => visibles

//Onglets

var charte_dossiers=new Array('Accueil','Bible','Israël','Cours Biblique','Etude','Diaporamas','FAQ Bible');

charte_plan=new Array();
charte_plan['Accueil']=new Array('index.htm','Accueil','credo/index.htm','Credo');
charte_plan['Israël']=new Array('israel/index.htm','Sommaire');
charte_plan['Cours Biblique']=new Array('cinq/index.htm','Sommaire','cinq/5mn5pts.htm','A lire!','pages/gratuit.htm','Livres gratuits');
charte_plan['Etude']=new Array('bible/etude.htm','Sommaire');
charte_plan['Bible']=new Array('bible/index.htm','Sommaire','lsg/INDEX.html','Bible Segond','../visio/index.htm?url=aide.htm','Bible multilingue','pages/gratuit.htm','Livres gratuits','bible/telechar.htm','télécharger la Bible');
charte_plan['Articles']=new Array('articles/index.htm','Sommaire','perrier/index.htm','Messages de Y. Perrier','legrand/index.htm','Messages de F. Legrand');
charte_plan['Diaporamas']=new Array('ppt/index.htm?url=SyFier.htm','La Bible peut on s\'y fier');
charte_plan['CREDO']=new Array('credo/index.htm','Sommaire','credo/1.htm','La Bible','credo/2.htm','Dieu, l\'homme','credo/3.htm','La vie chrétienne','credo/4.htm','L\'église','credo/5.htm','L\'avenir','credo/6.htm','Divers');
charte_plan['LA BIBLE']=new Array('lsg/INDEX.html','Bible Segond','lsg/aide.htm','Aide','bible/telechar.htm','Télécharger Bible');
charte_plan['FAQ Bible']=new Array('faq/index.htm','FAQ Bible');

///////////// 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.href; //sans le http:// et le ?search attention aux \ et au / ...

// 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 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 charte_edit(p_racine) {
	l_racine='&racine='+p_racine;
	location.href=charte_baseUtil+"prive/fp2.php?fichier="+escape(location.pathname)+l_racine;
}

function charte_editsource(p_racine) {
	l_racine='&racine='+p_racine;
	location.href=charte_baseUtil+"prive/edit2.php?fichier="+escape(location.pathname)+l_racine;
}

function charte_upload(p_racine) {
	l_racine='&racine='+p_racine;
	l_chemin=location.pathname.substring(0,location.pathname.lastIndexOf('/'))+'/';
	location.href=charte_baseUtil+"prive/upload.php?repertoire="+escape(l_chemin)+l_racine;
}

function charte_creerPage(p_racine) {
	l_racine='&racine='+p_racine;
	l_chemin=location.pathname.substring(0,location.pathname.lastIndexOf('/'))+'/';
	location.href=charte_baseUtil+"prive/creerpage.php?niveau="+escape(niveau)+'&repertoire='+escape(l_chemin)+l_racine;
}

// Charte semblables

var liens;
if (typeof (liens)=="undefined") liens='[<a href="http://www.info-bible.org">info-bible.org</a>] [<a href="http://www.info-sectes.org">info-sectes.org</a>] ';


document.writeln('<LINK REL="SHORTCUT ICON" href="http://www.info-bible.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>');

document.writeln('<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="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="9718030">');
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!

function ecrire(p_adresse) {
	p_adresse=p_adresse.replace(/¤/,'@');
	location.href='mailto:'+p_adresse;
}



charte_baseVisio=niveau+'visio/';
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
	
//alert(location.protocol.substring(0,4));

if ( location.protocol.substring(0,4)=='http') 
		document.write('<A href="http://bible.gospelcom.net/bible?language=Fran%E7ais&version=BDS-IBS&passage='+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>')
}


function revele() {
	if (document.all) document.styleSheets[0].addRule(".cache","display:inline"); 
}

