/**
*
* Conception & Création : Atelier télescopique - Lille - 2008
* Développement & Programmation : Baptiste Servais - 2008
* 
* Le code contenu dans ce fichier est protégé par le droit national et international de la propriété intellectuelle.
* Ces éléments restent la propriété exclusive de leurs auteurs.
*
* À ce titre, sauf autorisation préalable et écrite de la part de l'Atelier télescopique et/ou de Baptiste Servais,
* vous ne pouvez procéder à une quelconque reproduction, représentation, adaptation, traduction et/ou transformation
* partielle ou intégrale, ou un transfert sur un autre site web de tout élément composant le Site.
* Le non-respect de cette interdiction peut constituer un acte de contrefaçon engageant vos responsabilités civile et pénale.
* 
*/

var _ROOT = "";
/**
* Version 1256818795
*/
function get_xhr() {if(window.XMLHttpRequest){this.xhr = new XMLHttpRequest(); }else if(window.ActiveXObject) { try {this.xhr = new ActiveXObject("Msxml2.XMLHTTP"); }catch(e){this.xhr = new ActiveXObject("Microsoft.XMLHTTP"); } }else{alert("Votre navigateur ne supporte pas les objets XMLHTTPRequest...\nGet Firefox :D !"); this.xhr = false;}}function request( url , cadre ){var XHR = null;if(window.XMLHttpRequest) {XHR = new XMLHttpRequest();}else if(window.ActiveXObject) {XHR = new ActiveXObject("Microsoft.XMLHTTP");}else{alert("Votre navigateur ne supporte pas les objets XMLHTTPRequest...");return;}XHR.open("GET",url, true);XHR.onreadystatechange = function attente(){if(XHR.readyState == 4){document.getElementById(cadre).innerHTML = XHR.responseText;}else{}};XHR.send(null);return;}function request_post( url , parametres , cadre ){var XHR = null;if(window.XMLHttpRequest) {XHR = new XMLHttpRequest();}else if(window.ActiveXObject) {XHR = new ActiveXObject("Microsoft.XMLHTTP");}else{alert("Votre navigateur ne supporte pas les objets XMLHTTPRequest...");return;}XHR.open("POST",url, true);XHR.setRequestHeader("Content-type", "application/x-www-form-urlencoded");XHR.setRequestHeader("Content-length", parametres.length);XHR.setRequestHeader("Connection", "close");XHR.send(parametres);XHR.onreadystatechange = function attente(){if(XHR.readyState == 4){document.getElementById( cadre ).innerHTML = XHR.responseText;}else{}};XHR.send(null);return;}function confirmer( commentaire ){if( confirm( commentaire ) ){return true;}else{return false;}};function windows_status( string ){window.status = string;};function hashSpam( a , b , c ){location.href = "mailto:" + a + "@" + b + "." + c;};function hide_element( id_element ){element = document.getElementById(id_element);if( element.style.display == "none") {element.style.display= ""; }else {element.style.display= "none"; }};function setcookie( name , value ){var argv=setcookie.arguments;var argc=setcookie.arguments.length;var expires=(argc > 2) ? argv[2] : null;var path=(argc > 3) ? argv[3] : null;var domain=(argc > 4) ? argv[4] : null;var secure=(argc > 5) ? argv[5] : false;document.cookie = name + "=" + escape(value)+((expires==null) ? "" : ("; expires="+expires.toGMTString()))+((path==null) ? "" : ("; path="+path))+((domain==null) ? "" : ("; domain="+domain))+((secure==true) ? "; secure" : "");};function getcookie( name ){var i, j;var cookie = document.cookie;i = cookie.indexOf( name );if(i==-1){return "";}j = cookie.indexOf(";",i);if(j==-1){j=cookie.length;}return unescape( cookie.substring( i + nom.length + 1 , j ) );};function change_opacity( id , opacity ){var object = document.getElementById(id).style;object.opacity = (opacity / 100);object.MozOpacity = (opacity / 100);object.KhtmlOpacity = (opacity / 100);object.filter = "alpha(opacity=" + opacity + ")";};function opacity( id , opacity_start, opacity_end , millisec ){var speed = Math.round(millisec / 100);var timer = 0;if(opacity_start > opacity_end){for( i=opacity_start ; i>=opacity_end ; i-- ){setTimeout( "change_opacity( '" + id + "' , " + i + " )" , (timer * speed) );timer++;}}else if(opacity_start < opacity_end){for( i=opacity_start ; i<=opacity_end ; i++ ){setTimeout( "change_opacity( '" + id + "' , " + i + " )" , (timer * speed) );timer++;}}};function clignote_element( id_element ) {element = document.getElementById( id_element );element.className = "champ_obligatoire_clignotement";setTimeout( "element.className = 'champ_obligatoire';" , 400 );setTimeout( "element.className = 'champ_obligatoire_clignotement';" , 600 );setTimeout( "element.className = 'champ_obligatoire';" , 1600 ); };function highlight_element( id_element , couleur ) {element = document.getElementById( id_element );if(couleur == ""){element.style.backgroundColor = "";}else{element.style.backgroundColor = couleur;} };function remove_node( id_element ) {var noeud = document.getElementById( id_element );while (noeud.childNodes.length>0){noeud.removeChild(noeud.firstChild);} };function remove_element( id_element ){var div_parent= document.getElementById( id_element ).parentNode;var element_to_remove= document.getElementById( id_element );div_parent.removeChild( element_to_remove );};function dimensions_element( id_element , wat ){var element = document.getElementById( id_element );largeur = element.clientHeight;hauteur = element.clientWidth;if( largeur==0 ){largeur = element.offsetHeight;}if( hauteur==0 ){hauteur = element.offsetWidth;}if( wat == "l" ){return largeur;}else if( wat == "h" ){return hauteur;}else if( wat == "lh" ){return new Array( largeur , hauteur );}};function str_replace (search, replace, subject){var result = "";var oldi = 0;for( i=subject.indexOf(search) ; i>-1 ; i=subject.indexOf(search, i) ){result += subject.substring (oldi, i);result += replace;i += search.length;oldi = i;}return result + subject.substring (oldi, subject.length);};function key_code( e ){var keycode;if (window.event){keycode = window.event.keyCode;}else if(e.keyCode){keycode = e.keyCode;}else{keycode = e.which;}keycode = parseInt( keycode );return keycode;};function position_curseur( e ){var mouse_x, mouse_y;if (!e){var e = window.event; }if (e.pageX || e.pageY){mouse_x = e.pageX;mouse_y = e.pageY;}else if(e.clientX || e.clientY){mouse_x = e.clientX + document.body.scrollLeft;mouse_y = e.clientY + document.body.scrollTop;}var position = new Array( mouse_x , mouse_y );return position;};function goto_page_position( y ){window.scrollTo( 0 , y );};function disable_right_click(){document.onselectstart = new Function ("return false");document.oncontextmenu = new Function ("return false");if(window.sidebar){document.onmousedown= function(){return false;};document.onclick= function(){return true;};}};function precharge_images( images ){if( document.images ){if( !document.images_prechargees ){document.images_prechargees = new Array();}var l = document.images_prechargees.length;for( var i=0 ; i<images.length ; i++ ){if( images[ i ].indexOf("#")!=0 ){document.images_prechargees[ l ]= new Image;document.images_prechargees[ l ].src= images[ i ];l++;}}}};function mouse_move( e ){move_info_bulle( e );move_grab( e );}if( document.layers ){document.captureEvents( Event.MOUSEMOVE );}else if( document.layers || document.all ){document.onmousemove = mouse_move;}else if( document.addEventListener ){document.addEventListener( "mousemove" , mouse_move , true );}var info_bulle_active = false;function move_info_bulle( e ){if( info_bulle_active && document.getElementById("info_bulle") ){if (navigator.appName!="Microsoft Internet Explorer"){document.getElementById("info_bulle").style.left= e.pageX + "px";document.getElementById("info_bulle").style.top= e.pageY + "px";}else{if(document.documentElement.clientWidth > 0){document.getElementById("info_bulle").style.left= event.x + document.documentElement.scrollLeft + "px";document.getElementById("info_bulle").style.top= event.y + document.documentElement.scrollTop + "px";}else{document.getElementById("info_bulle").style.left= event.x + document.body.scrollLeft + "px";document.getElementById("info_bulle").style.top= event.y + document.body.scrollTop + "px";}}}};function coordonnees( e ){var coordonnees_souris= position_curseur( e );var current_mouse_x= coordonnees_souris[0];var current_mouse_y= coordonnees_souris[1];var content_min_x= document.getElementById( "content" ).offsetLeft;var content_min_y= document.getElementById( "content" ).offsetTop;var content_max_x= content_min_x + 650;var content_max_y= content_min_y + 650;var test = content_min_x + " - " + content_min_y + " - " + content_max_x + " - " + content_max_y;if( ( current_mouse_x > content_min_x )&& ( current_mouse_x < content_max_x )&& ( current_mouse_y > content_min_y )&& ( current_mouse_y < content_max_y )){current_mouse_x = current_mouse_x - content_min_x;current_mouse_y = current_mouse_y - content_min_y;windows_status( "X:" +current_mouse_x + " Y:" + current_mouse_y );}};function info_bulle( text ){var div_parent = document.getElementById("container");if( !document.getElementById("info_bulle") ){var info_bulle= document.createElement("div");info_bulle.id= "info_bulle";div_parent.appendChild( info_bulle );}if( info_bulle_active==false ){document.getElementById("info_bulle").style.visibility= "visible";document.getElementById("info_bulle").innerHTML= text;info_bulle_active = true;}};function info_bulle_hide(){if(info_bulle_active == true){document.getElementById("info_bulle").style.visibility = "hidden";info_bulle_active = false;}};var _DRAG_ACTIVE = false;var _DRAG_NETSCAPE = false;var _DRAG_CURRENT_ELEMENT= null;var _DRAG_MOUSE_POSITION_X= 0;var _DRAG_MOUSE_POSITION_Y= 0;var _DRAG_ORIGINE_X= 0;var _DRAG_ORIGINE_Y= 0;var _DRAG_CURRENT_X= 0;var _DRAG_CURRENT_Y= 0;var _DRAG_LIMIT_X= false;var _DRAG_LIMIT_Y= false;var _DRAG_USE_LIMITS= false;var _DRAG_MAX_X= 0;var _DRAG_MIN_X= 0;var _DRAG_MAX_Y= 0;var _DRAG_MIN_Y= 0;var _DRAG_USE_MARGINS= false;var _USE_SPACEBAR= false;var _DRAG_USE_SPACEBAR= false;if( navigator.appName.substring( 0 , 8 ) == "Netscape" ) {_DRAG_NETSCAPE = true; }function drag( element , force , mouse_position , max_values ) {if( ( !_DRAG_USE_SPACEBAR ) || ( _DRAG_USE_SPACEBAR && (_keys_pressed[32]!=undefined) && (_keys_pressed[32]==true) ) ){_DRAG_CURRENT_ELEMENT= document.getElementById( element );_DRAG_CURRENT_X= ( ( _DRAG_CURRENT_ELEMENT.style.left ) ? str_replace( "px" , "" , _DRAG_CURRENT_ELEMENT.style.left ) : ( ( mouse_position == true ) ? _DRAG_MOUSE_POSITION_X - 20 : 0 ) );_DRAG_CURRENT_Y= ( ( _DRAG_CURRENT_ELEMENT.style.top ) ?str_replace( "px" , "" , _DRAG_CURRENT_ELEMENT.style.top ): ( ( mouse_position == true ) ? _DRAG_MOUSE_POSITION_Y - 20 : 0 ) );_DRAG_ORIGINE_X= _DRAG_MOUSE_POSITION_X - _DRAG_CURRENT_X;_DRAG_ORIGINE_Y= _DRAG_MOUSE_POSITION_Y - _DRAG_CURRENT_Y;if( force === true ){_DRAG_CURRENT_ELEMENT.style.position = "absolute";}else if( force === "margins" ){_DRAG_USE_MARGINS = true;}else{_DRAG_USE_MARGINS = false;}if(( typeof( max_values ) == "object" ) && ( max_values.length == 4 ) ){_DRAG_USE_LIMITS= true;_DRAG_MIN_X= max_values[0];_DRAG_MAX_X= max_values[1];_DRAG_MIN_Y= max_values[2];_DRAG_MAX_Y= max_values[3];}_DRAG_CURRENT_ELEMENT.style.cursor= "move";_DRAG_CURRENT_ELEMENT.style.cursor= "-moz-grabbing";_DRAG_ACTIVE= true;} };function drop() {if (navigator.appName=="Microsoft Internet Explorer"){_DRAG_CURRENT_ELEMENT.style.cursor= "move";}else{_DRAG_CURRENT_ELEMENT.style.cursor= "-moz-grab";_DRAG_CURRENT_ELEMENT.style.cursor= "move";}_DRAG_ACTIVE = false; };function move_grab(e) {_DRAG_MOUSE_POSITION_X = ( ( _DRAG_NETSCAPE ) ? e.pageX : event.x + document.body.scrollLeft );_DRAG_MOUSE_POSITION_Y = ( ( _DRAG_NETSCAPE ) ? e.pageY : event.y + document.body.scrollTop );if( _DRAG_ACTIVE && document.getElementById ) {_DRAG_CURRENT_X = _DRAG_MOUSE_POSITION_X - _DRAG_ORIGINE_X;_DRAG_CURRENT_Y= _DRAG_MOUSE_POSITION_Y - _DRAG_ORIGINE_Y;if( _DRAG_USE_LIMITS ){if( ( _DRAG_CURRENT_X <= _DRAG_MAX_X )&& ( _DRAG_CURRENT_X >= _DRAG_MIN_X )&& ( _DRAG_CURRENT_Y <= _DRAG_MAX_Y )&& ( _DRAG_CURRENT_Y >= _DRAG_MIN_Y )){_DRAG_CURRENT_ELEMENT.style.left = _DRAG_CURRENT_X + "px";_DRAG_CURRENT_ELEMENT.style.top = _DRAG_CURRENT_Y + "px";}}else{if( !_DRAG_LIMIT_X ){if( _DRAG_USE_MARGINS ){_DRAG_CURRENT_ELEMENT.style.marginLeft = _DRAG_CURRENT_X + "px";}else{_DRAG_CURRENT_ELEMENT.style.left = _DRAG_CURRENT_X + "px";}}if( !_DRAG_LIMIT_Y ){if( _DRAG_USE_MARGINS ){_DRAG_CURRENT_ELEMENT.style.marginTop = _DRAG_CURRENT_Y + "px";}else{_DRAG_CURRENT_ELEMENT.style.top = _DRAG_CURRENT_Y + "px";}}} } };if ( _DRAG_NETSCAPE ){document.captureEvents( Event.MOUSEMOVE );}var _key_num= new Array();var _function_to_launch= new Array();var _USE_KEYBOARDS_CONTROLS= true;function set_keyboards_controls( action ){_USE_KEYBOARDS_CONTROLS = action;}if (document.layers) {document.captureEvents(Event.KEYDOWN);document.captureEvents(Event.KEYPRESS);document.captureEvents(Event.KEYUP);}function key_code( e ){var keycode;if (window.event){keycode = window.event.keyCode;}else if(e.keyCode){keycode = e.keyCode;}else{keycode = e.which;}keycode = parseInt( keycode );return keycode;};function addEvent( hoo , wot , fun ){if(document.addEventListener){ hoo.addEventListener( wot , fun , null ); }else if(document.attachEvent){ hoo.attachEvent( "on" + wot , fun ); }else{ hoo[ "on" + wot] = fun; }};function on_key_press_start_this( e ){var keycode = key_code( e );if( _function_to_launch[ keycode ] ){_launch_this = _function_to_launch[ keycode ];_launch_this();}};function check_key_event( e ){var keycode = key_code( e );if( ( _USE_KEYBOARDS_CONTROLS == true ) || ( ( _FICHE_TANK_ACTIVE == true ) && ( ( keycode == 38 ) || ( keycode == 40 ) ) ) ){var keycode = key_code( e );if( _function_to_launch[ keycode ] ){_launch_this = _function_to_launch[ keycode ];eval( _launch_this );return false;}}};function on_key_press( keynum , fonction ){_key_num[ keynum ]= keynum;_function_to_launch[ keynum ]= fonction;};function handle(delta){if (delta < 0){down_arrow();return false;}else{up_arrow();return false;}}function wheel(event){var delta = 0;if (!event) { event = window.event; }if (event.wheelDelta){delta = event.wheelDelta/120; }else if (event.detail){delta = -event.detail/3;}if( delta && ( ( _USE_KEYBOARDS_CONTROLS == true ) || ( _FICHE_TANK_ACTIVE == true ) ) ){handle(delta);}if (event.preventDefault){event.preventDefault();}event.returnValue = false;}if (window.addEventListener){window.addEventListener( "DOMMouseScroll" , wheel , false );}if( document.location.href.indexOf("/admin/") == -1){window.onmousewheel = document.onmousewheel = wheel;}var _SHOW_ANNIMATIONS = false;var _TITRE_DE_LA_PAGE = document.title;var _TITRE_DE_LA_PAGE_TMP= "";var _PAGE_IS_LOADING= false;var _PILOTE_AUTOMATIQUE= false;var _PILOTE_AUTOMATIQUE_DELAY= 5;var _Z_INDEX = 1000;function display_map_infos_box( id_element ) {if( document.all ){element= document.all( id_element );element_infos= document.all( id_element + "_infos" );}else{element= document.getElementById( id_element );element_infos= document.getElementById( id_element + "_infos" );}element.style.zIndex= _Z_INDEX + 2;element_infos.style.zIndex= _Z_INDEX + 1;element_infos.style.display= "";_Z_INDEX = _Z_INDEX + 2; };function hide_map_infos_box( id_element ) {element_infos= document.getElementById( id_element + "_infos" );element_infos.style.display= "none"; };function move_content( id_element , x , y ){var content = document.getElementById( id_element );content.style.left= x + 'px';content.style.top= y + 'px';};function deplace_map( sens ){var move_to_x;var move_to_y;var pas_x= 31;var pas_y= 31;var content= document.getElementById( "map" );current_position_x = parseInt( str_replace( "px" , "" , content.style.left ) );current_position_y = parseInt( str_replace( "px" , "" , content.style.top ) );move_to_x = current_position_x;move_to_y = current_position_y;switch( sens ){case "left" :move_to_x = current_position_x + pas_x;break;case "right" :move_to_x = current_position_x - pas_x;break;case "up" :move_to_y = current_position_y + pas_y;break;case "down" :move_to_y = current_position_y - pas_y;break;}if( ( move_to_x <= ( 9 * pas_x ) ) && ( move_to_x >= map_max_x ) && ( move_to_y <= 0 ) && ( move_to_y >= map_max_y ) ){setcookie( "map_x" , move_to_x );setcookie( "map_y" , move_to_y );move_content( "map" , move_to_x , move_to_y );}};var _FICHE_SOUS_LA_SOURIS_ID= null;var _FICHE_SOUS_LA_SOURIS_URL= null;function fiche_sous_la_souris( fiche_id , header_id ){_FICHE_SOUS_LA_SOURIS_ID = fiche_id;_FICHE_SOUS_LA_SOURIS_URL= _ROOT + "/?fiche=" + _FICHE_SOUS_LA_SOURIS_ID;highlight_header_colonne( header_id );};function highlight_header_colonne( header_id , type ){if( type == "off" ){document.getElementById( header_id ).className = str_replace( " map_categorie_header" , "" , document.getElementById( header_id ).className );}else{document.getElementById( header_id ).className = document.getElementById( header_id ).className + " map_categorie_header";}};function map_show_infos_fiche( text ){document.getElementById( "zone_infos_fiche" ).style.zIndex= 20;document.getElementById( "zone_infos_fiche" ).innerHTML= text;};function map_hide_infos_fiche(){document.getElementById( "zone_infos_fiche" ).style.zIndex= 5;document.getElementById( "zone_infos_fiche" ).innerHTML = "";};function map_on_click( url ){opacity( "map" , 100 , 0 , 400 );setTimeout( "window.location.href = '"+url+"';" , 410 );return false;};function tank(){if( _FICHE_TANK_ACTIVE == false ){var map = document.getElementById( "map" );current_position_x = parseInt( str_replace( "px" , "" , map.style.left ) );current_position_y = parseInt( str_replace( "px" , "" , map.style.top ) );if( current_position_x > 0 ){map_00();}else{move_content( "map" , 279 , 0 );}}};function map_00(){move_content( "map" , 0 , 0 );};function map_end(){move_content( "map" , map_max_x , 0 );};var _ANIM_ELMENT_CURRENT_OPACITY= 100;var _ANIM_ELMENT_CURRENT_OPACITY_SENS= 'moins';function anim_elment( id_element ){if( _ANIM_ELMENT_CURRENT_OPACITY_SENS == 'moins' ){_ANIM_ELMENT_CURRENT_OPACITY = _ANIM_ELMENT_CURRENT_OPACITY - 5;if( _ANIM_ELMENT_CURRENT_OPACITY <= 10 ){_ANIM_ELMENT_CURRENT_OPACITY_SENS = 'plus';}}if( _ANIM_ELMENT_CURRENT_OPACITY_SENS == 'plus' ){_ANIM_ELMENT_CURRENT_OPACITY = _ANIM_ELMENT_CURRENT_OPACITY + 5;if( _ANIM_ELMENT_CURRENT_OPACITY >= 100 ){_ANIM_ELMENT_CURRENT_OPACITY_SENS = 'moins';}}change_opacity( id_element , _ANIM_ELMENT_CURRENT_OPACITY );setTimeout( "anim_elment( '"+id_element+"' );" , 30 );};function move_mini_map( x , y ){var mini_map = document.getElementById( 'mini_map' );mini_map.style.left= x + 'px';mini_map.style.top= y + 'px';};function left_arrow(){anim_barre_navigation( "navigation_gauche" );if( document.location.href.indexOf("map") != -1 ){deplace_map( "left" );}else{if( _SHOW_ANNIMATIONS ){content_anim( "show2.php?previous" );}else{content_anim_off( "show.php?previous" , "container" );}}};function right_arrow(){anim_barre_navigation( "navigation_droite" );if( document.location.href.indexOf("map") != -1 ){deplace_map( "right" );}else{if( _SHOW_ANNIMATIONS ){content_anim( "show2.php?next" );}else{content_anim_off( "show.php?next" , "container" );}}};function up_arrow(){anim_barre_navigation( "navigation_haut" );if( document.location.href.indexOf("map") != -1 ){if( _FICHE_TANK_ACTIVE == true ){show_fiche_tank( null , "previous" );}else{deplace_map( "up" );}}else{if( _SHOW_ANNIMATIONS ){content_anim( "show2.php?previous_fiche" );}else{content_anim_off( "show.php?previous_fiche" , "container" );}}};function down_arrow(){anim_barre_navigation( "navigation_bas" );if( document.location.href.indexOf("map") != -1 ){if( _FICHE_TANK_ACTIVE == true ){show_fiche_tank( null , "next" );}else{deplace_map( "down" );}}else{if( _SHOW_ANNIMATIONS ){content_anim( "show2.php?next_fiche" );}else{content_anim_off( "show.php?next_fiche" , "container" );}}};function anim_barre_navigation( id_element ){change_opacity( id_element , 50 );setTimeout( "change_opacity( '" + id_element + "' , '100' )" , 150 );};function content_anim_off( url , element ){loading( "start" );request( url , element );setTimeout( "loading( 'stop' );" , 500 );};function content_anim( url ){loading( "start" );document.getElementById( "content_temp" ).innerHTML = document.getElementById( "fiche_content" ).innerHTML;change_opacity( "fiche_content" , 0 );change_opacity( "content_temp" , 100 );ajax = new get_xhr();ajax.xhr.open( "GET" , url , true );ajax.xhr.onreadystatechange = function attente(){if(ajax.xhr.readyState == 4){document.getElementById( "fiche_content" ).innerHTML = ajax.xhr.responseText;request( "show2.php?o=mini_map" , "mini_map_container" );request( "show2.php?o=fiche_infos" , "fiche_infos" );request( "show2.php?o=nav" , "navigation" );setTimeout( "opacity( 'content_temp' , 100 , 0 , 500 );" , 30 );setTimeout( "opacity( 'fiche_content' , 0 , 100 , 500 );" , 60 );setTimeout( "loading( 'stop' );" , 500 );}};setTimeout( "ajax.xhr.send(null)" , 15 );};function touche_plus(){if( document.location.href.indexOf("/map") > 0 ){opacity( "map" , 100 , 0 , 400 );setTimeout( "window.location.href = './';" , 410 );return false;}};function touche_moins(){if( document.location.href.indexOf("/map") == -1 ){opacity( 'content' , 100 , 0 , 400 );setTimeout( "window.location.href = 'map';" , 410 );return false;}};function touche_fin(){hide_element( "informations" );return false;};function touche_suppr(){var url = window.location.href.split( "?" );window.location.href = url[0] + "?show_infos";return false;};function touche_enter(){if( (document.location.href.indexOf("/map") > 0 ) && ( _FICHE_SOUS_LA_SOURIS_URL != null ) ) {window.location.href = _FICHE_SOUS_LA_SOURIS_URL;return false;}}function print_pdf(){window.location.href = "print_pdf.php";return false;};var _FICHE_TANK_ACTIVE= false;function show_fiche_tank( fiche_id , next_or_previous , intro ){loading( "start" );if( document.getElementById( "zone_infos" ) ){ document.getElementById( "zone_infos" ).style.display = "none"; }if( document.getElementById( "menu_tri_horizontal" ) ){ document.getElementById( "menu_tri_horizontal" ).style.display = "none"; }if( document.getElementById( "menu_tri_vertical" ) ){ document.getElementById( "menu_tri_vertical" ).style.display = "none"; }if( document.getElementById( "legende_couleurs" ) ){ document.getElementById( "legende_couleurs" ).style.display = "none"; }_FICHE_TANK_ACTIVE = true;_USE_KEYBOARDS_CONTROLS = false;ajax = new get_xhr();if( (next_or_previous == "previous") || (next_or_previous == "next") ){ajax.xhr.open( "GET" , "tank.php?" + next_or_previous , true );}else{var url = "tank.php?id=" + fiche_id + ( ( intro == "yes" ) ? "&intro" : "" );ajax.xhr.open( "GET" , url , true );}ajax.xhr.onreadystatechange = function attente(){if(ajax.xhr.readyState == 4){if( ajax.xhr.responseText != "error" ){if( document.getElementById( "intro" ) ){remove_element( "intro" );if( typeof( document.getElementById( "zone_btn" ) )!="undefined" ){document.getElementById( "zone_btn" ).style.display = "";}}loading( "stop" );document.getElementById( "fiche_tank" ).innerHTML = ajax.xhr.responseText;document.getElementById( "fiche_tank" ).style.display= "";}}};setTimeout( "ajax.xhr.send(null)" , 15 );};function show_type_tank( next_or_previous ){loading( "start" );_FICHE_TANK_ACTIVE = true;_USE_KEYBOARDS_CONTROLS = false;ajax = new get_xhr();ajax.xhr.open( "GET" , "tank.php?" + next_or_previous , true );ajax.xhr.onreadystatechange = function attente(){if(ajax.xhr.readyState == 4){if( ajax.xhr.responseText != "error" ){loading( "stop" );document.getElementById( "fiche_tank" ).innerHTML = ajax.xhr.responseText;document.getElementById( "fiche_tank" ).style.display= "";}}};setTimeout( "ajax.xhr.send(null)" , 15 );};function hide_fiche_tank(){setTimeout( "_FICHE_TANK_ACTIVE = false;" , 20 );set_keyboards_controls( true );document.getElementById( "fiche_tank" ).innerHTML = "";document.getElementById( "fiche_tank" ).style.display= "none";document.getElementById( "zone_infos" ).style.display= "";document.getElementById( "menu_tri_horizontal" ).style.display = "";document.getElementById( "menu_tri_vertical" ).style.display = "";document.getElementById( "legende_couleurs" ).style.display = "";if( document.getElementById("zone_btn") ){document.getElementById( "zone_btn" ).style.display = "";}};function loading( state ){if( state == "start" ){_PAGE_IS_LOADING = true;document.getElementById( "loading" ).style.display = "";windows_status( "Chargement en cours..." );anim_loading( 1 );}if( state == "stop" ){_PAGE_IS_LOADING = false;setTimeout( "document.getElementById( 'loading' ).style.display = 'none';" , 300 );windows_status( "" );anim_loading();}};function anim_loading( num ){var etapes= new Array( "―" , "\\" , "|" , "/" , "―" , "\\" , "|" , "/" );var nb_etapes= etapes.length;if( ( _PAGE_IS_LOADING == true ) && ( num > 0 ) ){if( num >= nb_etapes ){num = 0;}var next_num = num + 1;document.title = _TITRE_DE_LA_PAGE + _TITRE_DE_LA_PAGE_TMP + " " + etapes[ num ];setTimeout( "anim_loading( " + next_num + " );" , 50 );}if( _PAGE_IS_LOADING == false ){document.title = _TITRE_DE_LA_PAGE + _TITRE_DE_LA_PAGE_TMP;}};function txt_tri_vertical( txt , y ){document.getElementById( "menu_tri_vertical_txt_2" ).innerHTML= txt;document.getElementById( "menu_tri_vertical_infos" ).style.marginTop= y + "px";};function pilote_automatique(){if( _PILOTE_AUTOMATIQUE == false ){_PILOTE_AUTOMATIQUE = true;var delay = prompt( "Delai de rafraîchissement (en secondes)", _PILOTE_AUTOMATIQUE_DELAY );if( delay ) {delay = parseInt( delay );var exp = new RegExp( "^[0-9]*$" , "g" );if( exp.test( delay ) ){_PILOTE_AUTOMATIQUE_DELAY = delay;}_TITRE_DE_LA_PAGE_TMP = " - Navigation automatique";document.title = _TITRE_DE_LA_PAGE + _TITRE_DE_LA_PAGE_TMP;pilote_auto();}else{return false;}}else{_PILOTE_AUTOMATIQUE= false;_TITRE_DE_LA_PAGE_TMP= "";document.title = _TITRE_DE_LA_PAGE;}};function pilote_auto(){if( ( document.location.href.indexOf("map") == -1 ) && (_PILOTE_AUTOMATIQUE == true)){down_arrow();setTimeout( "pilote_auto();" , ( _PILOTE_AUTOMATIQUE_DELAY * 1000 ) );}};function copyright(){alert( "Coded & Designed\nby\nAtelier télescopique\n\nwww.ateliertelescopique.com" );return false;};function intro(){document.getElementById( "menu_tri_vertical" ).style.display= "none";document.getElementById( "menu_tri_horizontal" ).style.display= "none";document.getElementById( "legende_couleurs" ).style.display= "none";if( typeof( document.getElementById( "zone_btn" ) )!="undefined" ){document.getElementById( "zone_btn" ).style.display= "none";}};function hide_intro(){remove_element( "intro" );document.getElementById( "fiche_tank_cat_name" ).style.display= "";if( document.getElementById("bulle_texte") ){document.getElementById( "bulle_texte" ).style.display = "";}if( document.getElementById("bulle_texte_tank") ){document.getElementById( "bulle_texte_tank" ).style.display = "";}if( document.getElementById("fiche_tank_texte") ){document.getElementById( "fiche_tank_texte" ).style.display = "";}if( document.getElementById("fiche_tank_description_fond2") ){document.getElementById( "fiche_tank_description_fond2" ).style.display = "";}if( document.getElementById("fiche_tank_description2") ){document.getElementById( "fiche_tank_description2" ).style.display = "";}};function show_map(){window.location.href = "map";};function start(){window.location.href = "map?start";return false;};function reset_cookie(){setcookie( "tank" );};function go_to_category( cat ){loading( "start" );ajax = new get_xhr();ajax.xhr.open( "GET" , "lib/script.php?category=" + cat , true );ajax.xhr.onreadystatechange = function attente(){if(ajax.xhr.readyState == 4){var info = ajax.xhr.responseText;setTimeout( "loading( 'stop' );" , 500 );if( info == "ERROR" ){alert( "Un erreur s'est produite" );}else{window.location.href = "./?fiche=" + info;}}};setTimeout( "ajax.xhr.send(null)" , 15 );return false;};if( document.location.href.indexOf("/snoopy/") == -1 ){disable_right_click();on_key_press( "37" , "left_arrow(); " );on_key_press( "39" , "right_arrow();" );on_key_press( "38" , "up_arrow();" );on_key_press( "40" , "down_arrow();" );on_key_press( "107" , "touche_plus();" );on_key_press( "109" , "touche_moins();" );on_key_press( "33" , "touche_fin();" );on_key_press( "72" , "touche_fin();" );on_key_press( "34" , "touche_suppr();" );on_key_press( "13" , "touche_enter();" );on_key_press( "67" , "copyright();" );if( document.location.href.indexOf("iphone") == -1){on_key_press( "116" , "start();" );on_key_press( "82" , "start();" );}if( document.location.href.indexOf("map") == -1){on_key_press( "80" , "print_pdf();" );on_key_press( "65" , "pilote_automatique();" );}if( document.location.href.indexOf("/map") > 0 ){on_key_press( "84" , "tank();" );on_key_press( "36" , "map_00();" );}document.onkeydown = check_key_event;};
