﻿//
//80 pixels => 5 km


var xw = screen.width/2;
var xw_max=xw/2*3;
var yw = screen.height/2;

var nav=(document.all) ? false : true;
var pos_x=0;
var pos_y=0;
var dra_drag=false;//déplacer
var dra2_drag=false;//dimensionner
var drag_dx=0;
var drag_dy=0;
var drag_w=0;
var drag_dw=0;
var drag_d=0;
var posit_x=0;
var posit_y=0;

var return_pas=false;//retours de local


////dom
function $(o){return document.getElementById(o)}

function met_deplace(o,p,q){
	document.getElementById(o).style.left=p;
	document.getElementById(o).style.top=q;
	return;
}
function met_dim(o,p,q){
	document.getElementById(o).style.width=p;
	document.getElementById(o).style.height=q;
	return;
}
function pour_deplacex(o,p){
	if (p=="quoi_") {return parseInt(document.getElementById(o).style.left);}
	document.getElementById(o).style.left=p;
	return;
}
function pour_deplacey(o,p){
	if (p=="quoi_") {return parseInt(document.getElementById(o).style.top);}
	document.getElementById(o).style.top=p;
	return;
}
function pour_visibility(o,p){
	if (p=="quoi_") {return document.getElementById(o).style.visibility;}
	document.getElementById(o).style.visibility=p;
	return;
}
function pour_display(o,p){
	if (p=="quoi_") {return document.getElementById(o).style.display;}
	document.getElementById(o).style.display=p;
	return;
}
function pour_fontsize(o,p){
	if (p=="quoi_") {return parseInt(document.getElementById(o).style.fontSize);}
	document.getElementById(o).style.fontSize=p;
	return;
}
function pour_width(o,p){
	if (p=="quoi_") {return parseInt(document.getElementById(o).style.width);}
	document.getElementById(o).style.width=p;
	return;
}
function pour_height(o,p){
	if (p=="quoi_") {return parseInt(document.getElementById(o).style.height);}
	document.getElementById(o).style.height=p;
	return;
}
function pour_first(o,p){
	if (p=="quoi_") {return document.getElementById(o).firstChild.nodeValue;}
	document.getElementById(o).firstChild.nodeValue=p;
	return;
}
function pour_attribute(o,p,q){
	if (q=="quoi_") {return document.getElementById(o).getAttribute(p);}
	document.getElementById(o).setAttribute(p,q);
	return;
}
function pour_bgc(o,p){
	if (p=="quoi_") {return document.getElementById(o).style.backgroundColor;}
	document.getElementById(o).style.backgroundColor=p;
	return;
}
function pour_couleur(o,p){
	if (p=="quoi_") {return document.getElementById(o).style.color;}
	document.getElementById(o).style.color=p;
	return;
}
function pour_scroll_t(o,p,q){
	if (p=="quoi_") {return document.getElementById(o).scrollTop;}
	document.getElementById(o).scrollTop=p;
	return;
}


/////

//if (nav) {document.captureEvents(Event.MOUSEMOVE);}
if (nav) {document.addEventListener('mousemove', position_souris, true);}
document.onmousemove=position_souris;



var que_deplacer="";

var e=window.event;
function position_souris(e){
	pos_x=(nav)?e.pageX:window.event.x;
	pos_y=(nav)?e.pageY:window.event.y;

}


var s=0;
var u=0;
var v=0;
var r2=0

var timer="";
var timer2="";
function deplacer_(){
	if(dra_drag==true){
		met_deplace(que_deplacer,(pos_x-drag_dx)+"px",(pos_y-drag_dy)+"px");
		return;	
	}

	if (dra2_drag) {
		i=drag_w + pos_x - drag_dw;
			if (i<250) {i=250;}
		pour_width("infos_",i+"px");
		return;
	}
	return;
}



function prend_(o){
	pour_display("clic_charge","none");
	pour_display("sur_tout","block");
	que_deplacer = o;

	if (dra_drag){
		drag_dx = pos_x - pour_deplacex(que_deplacer,"quoi_");
		drag_dy = pos_y - pour_deplacey(que_deplacer,"quoi_");
	}

	if (dra2_drag) {
		drag_w=parseInt(pour_width(o,"quoi_"));
		drag_dw=pos_x;
	}

	timer=setInterval("deplacer_()",50);
	return;
}
function lache_(){
	clearInterval(timer);
	dra_drag = false;
	dra2_drag = false;

	if (que_deplacer=="image_") {
		if (pour_deplacex("image_","quoi_")>xw*2-200) {
			pour_deplacex("image_",(xw*2-200).toString()+"px");
		}
		if (pour_deplacex("image_","quoi_")<200) {
			pour_deplacex("image_","200px");
		}
		if (pour_deplacey("image_","quoi_")>yw*2-300) {
			pour_deplacey("image_",(yw*2-300).toString()+"px");
		}
		if (pour_deplacey("image_","quoi_")<200) {
			pour_deplacey("image_","200px");
		}
	}

	if (que_deplacer=="boite_image" || que_deplacer=="image_") {

		zoom_ref_l=pour_deplacex("boite_image","quoi_")/zoom;
		zoom_ref_t=pour_deplacey("boite_image","quoi_")/zoom;

		i=pc_x-zoom_ref_l/pc_zoom;
		j=pc_y-zoom_ref_t/pc_zoom;
		met_deplace("le_zoom_cible",i+"px",j+"px");
		var dra_=false;

		k=pour_deplacey("image_","quoi_")-carte_matrice_y*580*zoom+zoom_ref_t*zoom;
		if ((k>0) || (k<-580*zoom)) {
			carte_matrice_y=carte_matrice_y+1+Math.floor(k/(580*zoom));
			dra_=true;
		}

		k=pour_deplacex("image_","quoi_")+carte_matrice_x*600*zoom+zoom_ref_l*zoom-180;
		if ((k>0) || (k<-600*zoom)) {
			carte_matrice_x=carte_matrice_x-1-Math.floor(k/(600*zoom));
			dra_=true;
		}
		if (dra_) {
			deplace_boite_image(true);
		}
	}

	if (on_reste_ici()) {
		vers_suite();
	}


	pour_display("sur_tout","none");
	return;
}

////traitement carte

var x_images=Math.round(xw/150);
var y_images=Math.round(yw/120);
var carte_matrice= new Array(x_images*y_images);

for (var i=0; i<(x_images*y_images); i++) {
	carte_matrice[i]="carte_"+i.toString();
}

var carte_src="../maginot/photos/c";
var carte_matrice_x=13;
var carte_matrice_y=133;
var iii_= new Image;
iii_.src= "../maginot/photos/c0_0.gif";

var x_pointeur=-100;
var y_pointeur=-100;

function deplace_boite_image(o){
	var k=0;
	for (var i=0; i<y_images; i++) {
		for (var j=0; j<x_images; j++){
	met_deplace(carte_matrice[k],(carte_matrice_x+j).toString()+"00%",(-carte_matrice_y+i).toString()+"00%");
	if (o) {
		pour_attribute(carte_matrice[k]+"_0","src",deplace_boite_image_local(carte_matrice_x+j,carte_matrice_y-i-1));}
	k++;
		}
	}
	return;
}

///boite libre

function carte_libre_met(o,p,q){
	met_deplace("carte_libre",o+"%",p+"%");
	pour_attribute("carte_libre0","src",q);
	return;
}


///bulle d'aide mobile
///bulle d'aide
var largeur_doc=screen.width/2;
var hauteur_doc=screen.height-150;
var hauteur_aide=0;
function mets_pre_aide(o){
	p=pour_first("g_"+o,"quoi_");
	mets_aide(p,"");
	return;
}

function mets_aide(o,r){
	hauteur_aide=(o+r).length/1.4+20;

	p=(largeur_doc>pos_x)? pos_x+20 : pos_x-180;
	q=(hauteur_doc-pos_y>hauteur_aide)? pos_y-10 : pos_y-hauteur_aide+(hauteur_doc-pos_y)/2; 

	pour_first("aide_",o);
	pour_first("aide_2",r);
	met_deplace("aide_",p.toString()+"px",q.toString()+"px");
	return;
}
function enleve_aide(){
	met_deplace("aide_","-1000px","-1000px");
	return;
}

///bulle d'aide fixe

function aide_fixe(o){
	var p=pour_bulle[o];
	var q="e_"+o;
	pour_first("les_remarques",p);
	return;
}
function non_aide_fixe(o){
	pour_first("les_remarques","");
	return;
}


////légendes coords, affichage, non affichage

var xo = new Array(250);//
var yo = new Array(250);//
var xo_abs = new Array(250);//
var yo_abs = new Array(250);//

var id_ = new Array(250);//id
var nom_ = new Array(250);//nom
var ou_ = new Array(250);//liste ou carte
var coords_ = new Array(250);//coords sur carte
var action_ = new Array(250);//action clic
var over_ = new Array(250);//action over
var out_ = new Array(250);//action out
var inv_ = new Array(250);//


////bulles

var ici_=0;

function bulle_(){
	o=ici_;
	if ((ou_[o]=="c") || (ou_[o]=="ic")) {
		pour_couleur("a_"+o,"rgb(255,0,0)");
	}

	i=nom_[o]+". ";
	//var cc=(action_[o]=="n")?"11":"12";
	j=pour_bulle[(action_[o]=="n")?"11":"12"];
	//aide_fixe(cc);
	if (over_[o]=="") {mets_aide(i,j);return;}

	//autre
	aaa=over_[o].split(",");

	if (aaa.length==1) {
		i+=pour_first("d_"+aaa[0],"quoi_");
		mets_aide(i,j);return;
		}
	return
}

function nonbulle_(){
	o=ici_;

	pour_bgc("pointeur_","transparent");
	met_deplace("pointeur_","-1000px","-1000px");

	if ((ou_[o]=="c") || (ou_[o]=="ic")) {
		pour_couleur("a_"+o,"rgb(0,0,0)");
	}

	if (out_[o]=="n") {
		pour_deplace("a_"+o,"-3000px","-3000px");
	}

	if (out_[o]=="0") {return;}
	non_aide_fixe(); enleve_aide();return;
	return;
}

///info
var tir_mis = new Array(10);//mem où afficher image
var ici_clic=0;//pour modifier doc

function clic_(){

	ici_clic=action_[ici_];
	if (window.clic_local) {
		clic_local();
	}
	if (return_pas) {
		return_pas=false;
		return;
	}
	met_info(ici_clic);
	return;
}

var info_mem=0;
function met_info(o){
	if (o==-1) {
		pour_height("infos_",(pour_height("infos_","quoi_")=="95") ? "155px" : "95%");return;
	}

	pour_deplacey("infos_"+info_mem,"-3000px");
	info_mem=o.toString();
	pour_deplacey("infos_"+info_mem,"0px");
	return;
}
var grosse_image_mem="";
function charge_grosse_image(o){//grosse image
	if (o==grosse_image_mem) {efface_grosse_image();return;}
	grosse_image_mem=o;
	document.im_grosse.src=o;

	var i=pour_deplacex("image_grosse","quoi_");
	if (i<0 || i>300) {
		pour_deplacex("image_grosse","0px");
	}

	if (pour_deplacey("image_grosse","quoi_")<0) {
		pour_deplacey("image_grosse","0px");
	}
	pour_display("image_grosse","block");
	return;
}
function efface_grosse_image(){
	grosse_image_mem="";
	pour_display("image_grosse","none");
	return;
}

function cherche_par_id(o){alert("???")
	for (i=0; i<=200; i++) {
		if (id_[i]==o) {return i;}
	}
	return 0;
}

function voir_(){
	o=arguments[0];
	p=(pour_visible(o,"quoi_")=="visible") ? "hidden" : "visible"
	if (arguments.length==2) {p=(arguments[1]==1) ? "visible" : "hidden"}
	pour_visible(o,p);
	return;
}


/////saut
function saut_(){
	zoom_ref_l=(pc_x-pos_x+11)*pc_zoom;
	zoom_ref_t=(pc_y-pos_y+11)*pc_zoom;
	centrage_();
	return;
}

/////centrage sur un point
function centrage_(){
	pour_display("clic_charge","none");

	met_deplace("boite_image",(zoom_ref_l*zoom).toString()+"px",(zoom_ref_t*zoom).toString()+"px");
	met_dim("boite_image",(zoom_ref_w*zoom).toString()+"px",(zoom_ref_h*zoom).toString()+"px");

	carte_matrice_x=-1-Math.floor(zoom_ref_l/600);
	carte_matrice_y=1+Math.floor(zoom_ref_t/580);

	deplace_boite_image(true);
	que_deplacer="boite_image";
	lache_();

	nb_clignoter=0;
	clearInterval(timer2);
	timer2=setInterval("clignoter_()",200);

	return;
}

////faire clignoter


var nb_clignoter=0;
function clignoter_(o){
	nb_clignoter=nb_clignoter+1;
	p=pour_bgc("centre_zoom","quoi_");
//pour_first("je_trouve",p)
	p=(p=="transparent") ? "rgb(255,0,0)" : "transparent";
	pour_bgc("centre_zoom",p);

	if (nb_clignoter==15) {
		clearInterval(timer2);
		pour_bgc("centre_zoom","transparent");
	}
	return;
}


////restauration

function restaure_(){
	pour_display("clic_charge","none");
	if (window.restaure_local) {window.restaure_local();}

	i=(xw/2<200)?200:xw/2;
	met_deplace("image_",i+"px",yw/2+"px");
	pour_fontsize("image_","11px");
	zoom_rang=systeme_restauration[0];
	systeme_actuel=systeme_restauration[1];
	zoom_ref_l=systeme_actu[systeme_actuel][0];
	zoom_ref_t=systeme_actu[systeme_actuel][1];
	change_sys();
	return;
}

function recalcule_zoom_ref(){
	var systeme_memo=systeme_actuel;
	systeme_actuel=zoom_actu[zoom_rang][1];
	zoom_ref_l=zoom_ref_l*systeme_actu[systeme_memo][2]/systeme_actu[systeme_actuel][2];
	zoom_ref_t=zoom_ref_t*systeme_actu[systeme_memo][2]/systeme_actu[systeme_actuel][2];
	return;
}

function change_sys(){
	zoom=zoom_actu[zoom_rang][0];

	if (systeme_actuel!=zoom_actu[zoom_rang][1]){
		recalcule_zoom_ref();
	}

	carte_src=systeme_actu[systeme_actuel][5];
	pour_attribute("le_zoom_image","src",systeme_actu[systeme_actuel][6]);

	pc_x=systeme_actu[systeme_actuel][7];
	pc_y=systeme_actu[systeme_actuel][8];
	pc_zoom=systeme_actu[systeme_actuel][9];
	zoom2_();
	carte_matrice_x=-1-Math.floor(zoom_ref_l/(600*zoom));
	carte_matrice_y=1+Math.floor(zoom_ref_t/(580*zoom));

	deplace_boite_image(false);
	que_deplacer="boite_image";
	lache_();
	return;
}



////zoom image
var zoom=1;
var zoom_ref_w=600;
var zoom_ref_h=580;
var zoom_ref_t=0;
var zoom_ref_l=0;

var zoom_systeme=1;//systeme actuel
var zoom_rang=4;//rang actuel du zoom
var zoom_rang_mem=zoom_rang;//rang memo
var zoom_rang_ref=zoom_rang;//rang de référence pour changer de carte


var systeme_restauration=[4,1];//n°zoom_actu et n°systeme_actu

var pc_x=44;//rapport entre petite et grosse carte
var pc_y=52
var pc_zoom=129;

function aide_zoom(){
	pour_first("les_remarques",zoom_actu[zoom_rang][2]);
	return;
}

function zoom_(o){
	var k=zoom_rang+o;
	if (k>=zoom_min && k<=zoom_max) {
		zoom_rang=k;
	}
	if (window.zoom_local) {
		zoom_local(o);
	}

	zoom2_();
	return;
}

function zoom2_(){
	zoom=zoom_actu[zoom_rang][0];
	met_deplace("boite_image",(zoom_ref_l*zoom).toString()+"px",(zoom_ref_t*zoom).toString()+"px");
	met_dim("boite_image",(zoom_ref_w*zoom).toString()+"px",(zoom_ref_h*zoom).toString()+"px");

	deplace_boite_image(false);

	aide_zoom();
	que_deplacer="boite_image";
	lache_();
	return;
}

/////////

/////zomm texte
function zoom_texte(o,p){
	q=pour_fontsize(o,"quoi_");
	if (q<8) {q=8;}
	pour_fontsize(o,(q+p)+"px");
	return;
}

function affiche_image(o,p,q,r,s,t){//sur la carte
	document.getElementById("repere_"+o).style.left=p.toString()+"%";
	document.getElementById("repere_"+o).style.top=q.toString()+"%";
	document.getElementById("repere_"+o).src=r;
	document.getElementById("repere_"+o).style.width=s.toString()+"%";
	document.getElementById("repere_"+o).style.height=t.toString()+"%";
	return;
}

////recherche par identifiant
function id_quoi(o){
	for (var i=0; i<nombre_legendes; i++) {
		if (id_[i]==o) {return i;break}
	}
	return -1
}

////historique dans la page

histo_array=[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1];
var histo_mem=-1;
var histo_pointeur=0;


function histo_(){
	var i=(histo_pointeur+19)%20;
	if (histo_array[i]==histo_mem || histo_array[i]==-1) {return;}

	ici_=histo_array[i];
	histo_pointeur=(i+19)%20;

	clic_();
	return;
}

function plus_(){
	var i=(histo_pointeur+21)%20;
	if (histo_array[i]==histo_mem || histo_array[i]==-1) {return;}

	ici_=histo_array[i];

	clic_();
	return;
}

/////


function charge_images_et_index(){
var o="<div id='image_'><div id='boite_image'><div id='boite2_image' onMouseDown='dra_drag=true; prend_(\"boite_image\");' onClick='dra_drag=true; prend_(\"boite_image\");' onMouseOver='aide_fixe(0);' onMouseOut='non_aide_fixe();' class='carte_100'>";

	for (var i=0; i<(x_images*y_images); i++) {
		o=o+"<div id='carte_"+i+"' class='carte_100b'><img id='carte_"+i+"_0' class='carte_100' src='../maginot/photos/c0_0.gif' alt=''></div>";
	}

	o=o+"<div id='carte_images' class='carte_100'>";
	document.write(o);

	charge_images_reperes();

o="<div id='carte_libre' class='carte_100'><img id='carte_libre0' class='carte_100bd' src='../maginot/photos/c15_130.gif' alt=''></div></div></div>";
	document.write(o);

	charge_legendes_reperes();

o="<div id='pointeur_' class='legendes2_'>.</div></div><div id='centre_zoom'><span onMouseDown='dra_drag=true; prend_(\"image_\")' onMouseOver='$(\"centre_zoom\").style.backgroundColor=\"rgb(255,0,0)\";aide_fixe(15);' onMouseOut='$(\"centre_zoom\").style.backgroundColor=\"transparent\";non_aide_fixe();'><img src='../s3_zoom_ref.gif' alt=''></span><span id='clic_charge' onClick='charge_par_clic();' onMouseOver='aide_fixe(6);' onMouseOut='non_aide_fixe();'>CLIC..???</span></div></div>";
	document.write(o);

o="<div id='index_'><div id='gene_0'>Ligne Maginot...</div><hr>";
	document.write(o);

	charge_legendes();

o="<hr><div id='gene_1'>Maquette réalisée...</div></div><div id='le_zoom'><img id='le_zoom_image' src='../maginot/photos/france_red.gif' alt=''><div id='le_zoom_cible'>.</div><img id='le_sur_zoom' src='../s3_transparent.gif' alt='' onClick='saut_();' onMouseOver='aide_fixe(7);' onMouseOut='non_aide_fixe();'></div><div id='recherche_nom'><h4><input id='recherche_' type='text' name='recherche_' size='15' value='Recherche'><br><img class='href_' src='../s4_histomoins.gif' alt='' onClick='rechercher_avant();' onMouseOver='aide_fixe(9);' onMouseOut='non_aide_fixe();'><img class='href_' src='../s4_histoplus.gif' alt='' onClick='rechercher_apres();' onMouseOver='aide_fixe(10);' onMouseOut='non_aide_fixe();'><br><span id='je_trouve'>.</span></h4></div>";
	document.write(o);

o="<div id='aide_'>...<br><span id='aide_2'>...</span></div><div id='sur_tout'><img id='dans_sur_tout' src='../s3_transparent.gif' onClick='lache_();' onMouseOver='aide_fixe(0);' alt=''></div>";
	document.write(o);

o="<div id='image_grosse'><img id='im_grosse' name='im_grosse' src='../s3_ae.gif' onMouseDown='dra_drag=true;prend_(\"image_grosse\");' onClick='prend_(\"image_grosse\");' onMouseOver='aide_fixe(0);' onMouseOut='non_aide_fixe();' alt=''><div class='zero_'><img src='../s3_fermer.gif' onClick='efface_grosse_image();' alt=''></div></div>";
	document.write(o);

/*
document.write ("<div id='infos_'><div id='infos_0' class='cadre_infos'>");
menu_();
document.write ("</div>");
*/

	return;
}

var nombre_legendes=0;
function charge_images_reperes(){

	nombre_legendes=coord_.length;
	for (var i=0; i<nombre_legendes; i++) {
		bbb=coord_[i].split("<");
		if (bbb[1]=="hr") {continue;}
		//k=eval(bbb[0]);
			if ((bbb[2]=="c") || (bbb[2]=="ic")) {
				ddd=bbb[6].split(",");
					if (ddd[0]=="A") {
						document.write("<img id='tir_im"+bbb[7]+"' class='carte_100' src='../s3_transparent.gif' alt=''>")
					}
			}
	}

	return;
}

var texte_="";
function charge_legendes_reperes(){//sur la carte
	o="";
	for (var i=0; i<nombre_legendes; i++) {
		var bbb=coord_[i].split("<");

		if (bbb[1]=="hr") {o+="<hr>";continue;}
		//var k=eval(bbb[0]);

		id_[i]=bbb[7];
		nom_[i]=bbb[1];
		ou_[i]=bbb[2];
		coords_[i]=bbb[3];
		over_[i]=bbb[4];
		action_[i]=bbb[5];
		out_[i]=bbb[6];
		//inv_[i]=k;
		p=ou_[i];

		if (p=="c") {
			ccc=coords_[i].split(",");
			ddd=out_[i].split(",");

document.write("<div id='a_"+i+"' class='legendes_sur_carte legendes2_"+ddd[0]+"' onClick='clic_();' onMouseOver='ici_="+i+";bulle_();' onMouseOut='nonbulle_();'>"+bbb[1]+"</div>");

		met_deplace("a_"+i,ccc[0]+"%",ccc[1]+"%");
		}

		if (p=="i") {
			o+=". <a id='f_"+i+"' href='../index.htm' onClick='clic_();return false;' onMouseOver='ici_="+i+";bulle_();' onMouseOut='nonbulle_();'>"+bbb[1]+"</a><br>";
		}
	}
	delete coord_;
	return;
}


function charge_legendes(){//à gauche
	document.write(o);o="";
	return;
}

////charge commandes infos
function commandes_infos(){

	document.write ("<div id='infos_0' class='cadre_infos'>");
	menu_();

	document.write("</div><div id='commandes_' class='href_'><img src='../s3_reduire.gif' onClick='met_info(-1);' class='cursor_depv' onMouseOver='aide_fixe(14);' onMouseOut='non_aide_fixe();' alt=''><img src='../s4_maison.gif' onClick='charge_plan();return false;' onMouseOver='aide_fixe(1);' onMouseOut='non_aide_fixe();' alt=''><img src='../s4_geoportail.gif' onClick='charge_geoportail();' onMouseOver='aide_fixe(19);' onMouseOut='non_aide_fixe();' alt=''><img src='../s4_carte_moins.gif' onClick='zoom_(-1);' onMouseOver='aide_zoom();' onMouseOut='non_aide_fixe();' alt=''><img src='../s4_carte_plus.gif' onClick='zoom_(1);' onMouseOver='aide_zoom();' onMouseOut='non_aide_fixe();' alt=''><img src='../s4_l.gif' onClick='restaure_();' onMouseOver='aide_fixe(2);' onMouseOut='non_aide_fixe();' alt=''><img src='../s4_texte_moins.gif' onClick='zoom_texte(\"image_\",-1);' onMouseOver='aide_fixe(17);' onMouseOut='non_aide_fixe()' alt=''><img src='../s4_texte_plus.gif' onClick='zoom_texte(\"image_\",1);' onMouseOver='aide_fixe(18);' onMouseOut='non_aide_fixe();' alt=''><img id='histo_moins' src='../s4_histomoins.gif' onClick='histo_();' onMouseOver='aide_fixe(4);' onMouseOut='non_aide_fixe();' alt=''><img id='histo_plus' src='../s4_histoplus.gif' onClick='plus_();' onMouseOver='aide_fixe(5);' onMouseOut='non_aide_fixe();' alt=''><img id='histo_plus' src='../s4_aide.gif' onClick='aide_ext();' onMouseOver='aide_fixe(3);' onMouseOut='non_aide_fixe();' alt=''></div><div id='les_remarques'>....</div></div></div>");
	return;
}


////fin charge commandes infos


function charge_par_clic(){//nouvelle page
	tra_charge(url_vers_suite);
}
////fin suite défilement

function tra_charge(o){
	var aa=o+"?"+tra_deri;
	aa+=id_tra_deri+","+zoom_rang+","+pour_deplacey("image_","quoi_")+","+pour_deplacex("image_","quoi_")+","+pour_fontsize("image_","quoi_")+","+Math.round(zoom_ref_t)+","+Math.round(zoom_ref_l);
	document.location.href=aa;
	return false;
}


function depart(){

	send_();

	pour_height("infos_","95%");
	met_dim("boite_image","600px","580px");
	met_deplace("image_grosse","180px","0px");
	pour_display("image_grosse","none");
	pour_display("carte_images","none");
	pour_fontsize("image_","11px");

	//légendes noms,
	var aaa=pour_first("data_0","quoi_").split(";");
	for (i=0; i<aaa.length; i=i+2) {

		var j=id_quoi("g_"+parseInt(aaa[i]));
		nom_[j]=aaa[i+1];

	if (ou_[j]=="i") {pour_first("f_"+j,aaa[i+1]);}
	if (ou_[j]=="c") {pour_first("a_"+j,aaa[i+1]);}
	}

	//divers
	var bb=pour_first("data_1","quoi_");
	bb=bb.split(";");
	for (i=0; i<=bb.length-1; i++) {
		pour_first("gene_"+i,bb[i]);
		//pour_first("gene_"+i,id_quoi("depart"));
	}


	//tra_deri
	tra_deri_action(id_tra_deri);

	if (tra_deri_pour_ici!="") {
		var bb=tra_deri_pour_ici.split(",");
		if (bb.length==7) {
			zoom_rang=eval(bb[1]);

			met_deplace("image_",bb[3]+"px",bb[2]+"px");

			pour_fontsize("image_",bb[4]+"px");
			zoom_ref_t=bb[5];
			zoom_ref_l=bb[6];
		}
	}

	if (window.depart_local) {
		var depart_=depart_local();
	}

	systeme_actuel=zoom_actu[zoom_rang][1];
	change_sys();

	pour_display("patience_","none");

	k_artillerie=id_quoi("g_1");

	var j=id_quoi("g_3");

	ici_=(j==-1)?0:j
	clic_();
                                                                                                
	return;
}