﻿//

var o=window.location.href.indexOf(".htm");
var langue_ici=window.location.href.substring(o-3,o);




/////charge dans d'autres fenêtres
var le_lexique="";
function deplace0lelexique(){
	if (le_lexique.closed==false) {le_lexique.focus();return;}
	le_lexique=window.open("../home-02_lexique.htm?"+langue_ici,"le_lexique","width="+(4*screen.width/5)+",height="+(screen.height/2)+",left=0,top=0,menubar=yes,toolbar=yes,resizable=yes,scrollbars=yes,statusbar=yes,location=yes");
	return;
}

var geo_portail="";
function charge_geoportail(){
	charge_pop_up("http://www.geoportail.fr");
/*
	if (geo_portail.closed==false) {geo_portail.focus();return;}
	geo_portail=window.open("http://www.geoportail.fr/","geo_portail","width="+(screen.width/2)+",height="+screen.height+",left=0,top=0,menubar=yes,toolbar=yes,resizable=yes,scrollbars=yes,statusbar=yes,location=yes");
*/
	return;
}

var aide_exterieure="";
function charge_aide(o){
	if (aide_exterieure.closed==false) {aide_exterieure.focus();return;}
	o=o+langue_ici+".htm";
	aide_exterieure=window.open(o,"aide_exterieure","width="+(screen.width/3)+",height="+screen.height*.9+",left=0,top=0,menubar=no,toolbar=no,resizable=yes,scrollbars=yes,statusbar=no,location=no");
	aide_exterieure.focus();
	return;
}

/////////// a revoir
var charge_doc_w="";
function charge_doc(o,p){
	if (charge_doc_w.closed==false) {charge_doc_w.focus();return false;}
	charge_doc_w=window.open(o,charge_doc_w,"width="+(screen.width/2)+",height="+screen.height+",left=0,top=0,menubar=yes,toolbar=yes,resizable=yes,scrollbars=yes,statusbar=yes,location=yes");
	return;

}

/////charge le menu général
function charge_plan(){
	var o="";
	var j="_gb_it_de_sp_nl";
	if (j.indexOf(langue_ici)==-1) {
		o="../home-05.htm";
	}
	else {
		o="../home-05"+langue_ici+".htm";
	}
	tra_charge(o);
	return;
}

/////charge index
function charge_index(){

/*
var Element = document.getElementsByTagName("script");
	

		var DSLScript  = document.createElement("script");
		DSLScript.src  = "../s3_diaporama_it.js";
		DSLScript.type = "text/javascript";

document.body.replaceChild(DSLScript, Element[6]);


return;

*/
	o="../index.htm";
	if (langue_ici!="_fr") {o="../index-"+langue_ici.substring(1)+".htm";};
	tra_charge(o);
	return;
}


////tra_deri
var tra_deri_pour_ici="";
var tra_deri_dra=false;
var tra_deri=window.location.search;
if (tra_deri!="") {tra_deri=tra_deri.substr(1);tra_deri_dra=true;}

function tra_deri_action(o){
	tra_deri_pour_ici="";
	if (!tra_deri_dra) {return;}
		aa=tra_deri.split(";");
	tra_deri="";
	for (i=0; i<aa.length; i++) {
		if (aa[i].indexOf(o)!=-1) {tra_deri_pour_ici=aa[i];}
		else {if (aa[i]!="") tra_deri+=aa[i]+";";}
	}
	return;
}

function notre_adresse(){
	o="<hr><h4><a href='mailto:maginot@maginot.org'>Courriel : maginot@maginot.org</a><br><img src='../s3_ae.gif' alt='Autoedition CIMA'><br>Autoedition CIMA<br>Bernard, Evelyne, Raymond CIMA<br>115 Rte de Castellar 06500 Menton (France)</h4>";
	return (o);
}

////menu
function menu_(){
	document.write("<h2>");

		aaa=langue_pour_ici.split(";");
		for (var i=0; i<aaa.length; i++) {
			document.write(" <a href='javascript:tra_charge(\""+id_page+aaa[i]+".htm\");'><img src='../s3_drap"+aaa[i]+".gif' alt='' border=1></a>");
		}
	document.write("</h2>");

	document.write(notre_adresse());
	return;
}


/////charge index pour frames
function charge_index_frames(){
	top.location.href="../index.htm";
	return;
}

/////charge le menu général pour frames
function charge_plan_frames(){
	top.location.href="../home-02.htm";
	return;
}

//visites
function charge_visites(){
	charge_pop_up("../kiosque/kiosque"+langue_ici+".htm");
	return;
}


//pop_up
var pop_up_ici="";
var contenu_pop_up="";
function charge_pop_up(o){
	if (pop_up_ici.closed==false){
		pop_up_ici.focus();
		if (contenu_pop_up==o){return;}
	}

	contenu_pop_up=o;
	pop_up_ici=window.open(o,"pop_up_ici","width="+(screen.width/3)+",height="+screen.height*.75+",left=0,top=0,menubar=yes,toolbar=yes,resizable=yes,scrollbars=yes,statusbar=no,location=yes");
	pop_up_ici.focus();
	return;
}


