	// ================================================================================================================================================================
	// ------------------------------------------------------------
	// all libs - Copyright - Yves Rosso - 2011
	// ------------------------------------------------------------
	// ================================================================================================================================================================















	// ================================================================================================================================================================
	// ------------------------------------------------------------
	// ### XHR :: LOAD SHOWROOM CARS OBJECT ...
	// ------------------------------------------------------------
	//
	var o_CAR_TABLE = null;
	//
	var o_CAR_TABLE_response = "";
	//
	/*
	// ----------------------------
	// fields for $tab[ ... ]
	// ----------------------------
		id
		idmarque 	+ =>
					marque
		idmodele 	+ =>
					modele
		infos
		annee
		mois
		date
		pr_main
		p_fiscale
		km
		km_garanti
		descriptif
		type_carrosserie
		type_categorie
		nb_places
		nb_portes
		moteur_type
		moteur_cylindree
		moteur_energie
		moteur_boite
		moteur_transmission
		moteur_puissance
		moteur_conso_urb
		moteur_conso_mxt
		moteur_conso_aut
		moteur_taux_co
		photo1 ... photo16 + =>
					photo_thumbs = new Array()
					photo_images = new Array()
		prix
		valeur_a_neuf
		decote
		decote_value
		eco_pastille
		statut
		nb_visites
		date_insert
	// ----------------------------
	*/
	// ------------------------------------------------------------
	//
	function XHR_car_table_to_object( s_id )
	{
		// ------------------------------------------------------------
		// XHR :: get car id row to object ...
		//
		XHR_mgr.ALERT_ERRORS = false;	// WARNING suppress any xhr error ...
		//
		var xhr_req_id = XHR_mgr.easyRequest(
			// ------------------------------------------------------------
				""+relative_path+"./php/get_car_table_to_json.php"
			// ------------------------------------------------------------
			,	null
			// ------------------------------------------------------------
			,	null
		//	,	{ GET_CAR_TABLE : "true" }
			// ------------------------------------------------------------
			,	function( s_response , s_req_id )
				{
					// ------------------------------------------------------------
					// eval the ajax response
					// ------------------------------------------------------------
					//
					o_CAR_TABLE_response = s_response;
					//
					eval( s_response );
					//
					//	console.log(s_response);
					//
					// ------------------------------------------------------------
					// do some processing ...
					//
					var tmp_thumb = "";
					var tmp_image = "";
					var tmp_date  = "";
					var tmp_mois  = "";
					//
					//
					for (var i=0; i < o_CAR_TABLE.length; i++)
					{
						// ------------------------------------------------------------
						// prepare "premiere mise en circulation"
						//
						tmp_date = parseInt(o_CAR_TABLE[i]['date'],10);
						tmp_mois = parseInt(o_CAR_TABLE[i]['mois'],10);
						//
						if(isNaN(tmp_date)) tmp_date = 0;
						if(isNaN(tmp_mois)) tmp_mois = 0;
						//
						if(tmp_date<10){ tmp_date = "0"+tmp_date+"/"; }else{ tmp_date = tmp_date+"/"; };
						if(tmp_mois<10){ tmp_mois = "0"+tmp_mois+"/"; }else{ tmp_mois = tmp_mois+"/"; };
						//
						if( tmp_date == "00/" ) tmp_date = "";
						if( tmp_mois == "00/" ) tmp_mois = "";
						//
						o_CAR_TABLE[i]["date_PMEC"] = tmp_date + tmp_mois + o_CAR_TABLE[i]['annee'];
						//
						// ------------------------------------------------------------
						// prepare "decote"
						//
						if 	(	o_CAR_TABLE[i]['prix']!=0
							&& 	o_CAR_TABLE[i]['prix']!=null
							&& 	o_CAR_TABLE[i]['valeur_a_neuf']!=0
							&& 	o_CAR_TABLE[i]['valeur_a_neuf']!=null
							&& 	o_CAR_TABLE[i]['decote']=="oui"
							)
						{
							o_CAR_TABLE[i]["decote_value"] = 100-Math.round( 100 * o_CAR_TABLE[i]['prix'] / o_CAR_TABLE[i]['valeur_a_neuf'] );
						}
						else
						{
							o_CAR_TABLE[i]["decote_value"] = 0;
						};
						//
						// ------------------------------------------------------------
						// prepare "kilometrage" + "kilometrage garanti"
						//
						// ----------------------------
						var o_param_int = {	i_nb_of_dec      : 0
								,	s_tho_sep        : " "
								,	s_dec_sep        : "."
								,	s_beg_symbol     : ""
								,	s_end_symbol     : ""
								,	s_negative_style : ""
								,	s_negative_class : ""
						};
						// ----------------------------
						o_CAR_TABLE[i]["kilometrage_GARANTI"] = ""
							+ formating_number( o_CAR_TABLE[i]['km'] , o_param_int )
							+ "&nbsp;km"
							+ ((o_CAR_TABLE[i]['km_garanti']=="oui") ? "" : "&nbsp;(compteur - non garanti)" );
						//
						// ------------------------------------------------------------
						// check for and count valid photos ...
						// prepare photos/thumbnails path
						//
						o_CAR_TABLE[i]["photo_thumbs"] = new Array();
						o_CAR_TABLE[i]["photo_images"] = new Array();
						//
						for (var i_nb=1; i_nb <= PHOTO_NB ; i_nb++ )
						{
							// ------------------------------------------------------------
							//
							tmp_thumb = "";
							tmp_image = "";
							//
							if 	(	o_CAR_TABLE[i]['photo'+i_nb] != ""
								&&	o_CAR_TABLE[i]['photo'+i_nb] != null
								&&	o_CAR_TABLE[i]['photo'+i_nb] != "null"
								)
							{
								tmp_thumb = THUMB_DIR + o_CAR_TABLE[i]['photo'+i_nb];
								tmp_image = PHOTO_DIR + o_CAR_TABLE[i]['photo'+i_nb];
							};
							//
							o_CAR_TABLE[i]["photo_thumbs"][i_nb] = tmp_thumb;
							o_CAR_TABLE[i]["photo_images"][i_nb] = tmp_image;
							//
							// ------------------------------------------------------------

							delete o_CAR_TABLE[i]['photo'+i_nb];
						};
						//
						// ------------------------------------------------------------
					};
/*
*/
					// ------------------------------------------------------------
					// update the debug popup
					//
				/*
					var o_div = document.getElementById("POPUP_DEBUG_AJAX");

					o_div.style.border = "2px solid #000000";
				//	o_div.style.width  = "1024px";
					o_div.style.height = "768px";
					o_div.style.zIndex = 100000;

					o_div.innerHTML = ""
					+"<pre style=\"font-family:fixed;font-size:12px;font-weight:bold;\">"
					+"AJAX DEBUG :: CAR TABLE TO JSON "
					+"<br>"
					+"<br>"
					+"o_CAR_TABLE = "+ object_toSource(o_CAR_TABLE).replace( /,/g , ",\n" )
					+"<br>"
					+"</pre>"
					+"";
				*/
					//
					// ------------------------------------------------------------
					// ### WARNING
					//
					return true;
					//
					// ------------------------------------------------------------
				}
			// ------------------------------------------------------------
		);
		// ------------------------------------------------------------
	};
	//
	// ------------------------------------------------------------
	// WARNING :: NEW PAGE ONLOAD
	EventsManager.add_listener(
			window
		,	'load'
		,	function()
			{
				// ------------------------------------------------------------
				//
				if(! IFRAMED_ACTIVE_SESSION)
				{
					XHR_car_table_to_object();
				};
				//
				// ------------------------------------------------------------
			}
	);
	//
	// ------------------------------------------------------------



	// ------------------------------------------------------------
	// ### get a car(id) object ...
	// ------------------------------------------------------------
	//
	function get_car_from_id( s_id )
	{
		// ------------------------------------------------------------

		if ( typeof(o_CAR_TABLE) == "object" )
		{
			// ------------------------------------------------------------

			if ( o_CAR_TABLE != null )
			{
				// ------------------------------------------------------------
				for (var i=0; i < o_CAR_TABLE.length; i++)
				{
					if ( o_CAR_TABLE[i]['id'] == s_id )
					{
						// ------------------------------------------------------------
						return o_CAR_TABLE[i];
						// ------------------------------------------------------------
					};
				};
				// ------------------------------------------------------------
				return "Not found id";
				// ------------------------------------------------------------
			}
			else
			{
				// ------------------------------------------------------------
				return "is NULL";
				// setTimeout( function(){get_car_from_id(s_id);} , 1000 );
				// ------------------------------------------------------------
			};

			// ------------------------------------------------------------
		}
		else
		{
			// ------------------------------------------------------------
			return "Not an object";
			// setTimeout( function(){get_car_from_id(s_id);} , 1000 );
			// ------------------------------------------------------------
		};

		// ------------------------------------------------------------
	};
	//
	// ------------------------------------------------------------


	// ------------------------------------------------------------
	// ###
	// ------------------------------------------------------------
	//
	function get_car_minimal_infos_block( s_id )
	{
		// ------------------------------------------------------------
		var i=0;
		for (i=0; i < o_CAR_TABLE.length; i++)
		{
			if ( o_CAR_TABLE[i]['id'] == s_id )
			{
				// ------------------------------------------------------------
				return ""
				+""+s_id+""
			//	+"&nbsp;( "+i+" )"			// +"<br />"
				+"&nbsp;"+o_CAR_TABLE[i]['marque'] 	// +"<br />"
				+"&nbsp;"+o_CAR_TABLE[i]['modele'] 	// +"<br />"
				+"&nbsp;"+o_CAR_TABLE[i]['infos' ] 	// +"<br />"
				// ------------------------------------------------------------
			};
		};
		// ------------------------------------------------------------
	};
	//
	// ------------------------------------------------------------
	// ================================================================================================================================================================















	// ================================================================================================================================================================
	// ------------------------------------------------------------
	// ### ACTIVE SESSIONS :: ONLINE USERS
	// ------------------------------------------------------------
	//
	var ACTIVE_USER               = true;
	var ACTIVE_USER_timeout       = 120;	// seconds before being declared an inactive user
	var ACTIVE_USER_interval      = null;
	//
	var a_ACTIVE_IFRAMES_LIST     = new Array();
	//
	var IFRAMED_ACTIVE_SESSION    = false;
	//
	var o_JSON_SESSION            = null;
	//
	// ------------------------------------------------------------
//	var DEBUG_SESSIONS  = true;
	var DEBUG_SESSIONS  = false;
	// ------------------------------------------------------------
//	var DEBUG_INTERVALS = true;
	var DEBUG_INTERVALS = false;
	// ------------------------------------------------------------


//	if(typeof ADMIN_DEBUG!="undefined")	// WARNING SET BY COMMON PHP PAGE HEADER
//	{
//		DEBUG_SESSIONS = true;
//	};



	// ------------------------------------------------------------
	// DOES THIS DOC IS AN IFRAME WITH A PARENT ACTIVE SESSION
	// ------------------------------------------------------------
	//
	function check_for_iframed_active_session()
	{
		// ------------------------------------------------------------
		// detect if we are in an IFRAME ??? ...
		//
		if 	(	window != window.parent
			&& 	window != window.top
			&& 	window.frameElement
			&& 	window.parent.stop_active_session
			)
		{
			// ------------------------------------------------------------
			//
			if ( window.parent.ACTIVE_USER )
			{
				// ------------------------------------------------------------
				if(DEBUG_INTERVALS) console.log("FROM IFRAME ==== STOP PARENT INTERVAL :: ACTIVE_USER ");
				// ---------------------------------------------------------------------------------
				// set the parent document to inactive  ...
				//
				window.parent.ACTIVE_USER           = false;
				window.parent.stop_active_session();
				window.parent.SCREEN_BLANKER_flag  = false;	// but no blanker for parent doc ...
				window.parent.stop_screen_blanker();		// but no blanker for parent doc ...
				//
				// ---------------------------------------------------------------------------------
				// setup vars for crossed connections (parent to/from iframe)
				//
			//	var o_win_parent    = window.parent;
			//	var o_iframe_elm    = window.frameElement;
			//	var s_iframe_elm_id = o_iframe_elm.id;
				//
				// ---------------------------------------------------------------------------------
				return true;
				// ---------------------------------------------------------------------------------
			}
			else {	return false; };
			//
			// ------------------------------------------------------------
		}
		else { 		return false; };
		//
		// ------------------------------------------------------------
	};
	//
	// WARNING live run before onload ...
	//
	IFRAMED_ACTIVE_SESSION = check_for_iframed_active_session();
	//
	// ------------------------------------------------------------












	// ------------------------------------------------------------
	if(! IFRAMED_ACTIVE_SESSION)
	{
		// ------------------------------------------------------------
		// WARNING :: NEW PAGE ONLOAD
		// --------------------------------
		//
		EventsManager.add_listener(
				window
			,	'scroll'
			,	function(e)
				{
					// --------------------------------
					// SCROLL FOLLOWERS
					// --------------------------------

				//	this.pos_Y = o_elm.style.top;
				/*
					this.move_div = function()
					{
						this.RUNNING = true;

						var o_elm = document.getElementById( "CHATROOM_VISITOR_BUTTON" );

						var a_scroll_offsets = get_window_scroll_offset();
						var i_offset_Y = a_scroll_offsets[1];

						var i_half_pos_Y = Math.round( ( i_offset_Y - parseInt(o_elm.offsetHeight) ) / 2 );

						o_elm.style.top = i_half_pos_Y+"px";


						if( i_half_pos_Y != i_offset_Y ) setTimeout( this.move_div() , 50 );
					};

					if(!this.RUNNING) this.move_div();
				*/

					var o_elm = document.getElementById( "CHATROOM_VISITOR_BUTTON" );

					if ( ! o_elm ) return;

					var a_scroll_offsets = get_window_scroll_offset();
					var i_offset_Y = a_scroll_offsets[1] + 20 ;
					o_elm.style.top = i_offset_Y+"px";

					// --------------------------------

					var o_elm = document.getElementById( "POPUP_CHATROOM" );

					if ( ! o_elm ) return;

					var a_scroll_offsets = get_window_scroll_offset();
					var i_offset_Y = a_scroll_offsets[1] - 10 ;
					o_elm.style.top = i_offset_Y+"px";

					// --------------------------------

				// 	if ( CHATROOM_run_flag )
				// 	{
				// 		var o_elm = document.getElementById( "POPUP_SHOWROOM" );
				//
				// 		if ( ! o_elm ) return;
				//
				// 		var a_scroll_offsets = get_window_scroll_offset();
				// 		var i_offset_Y = a_scroll_offsets[1] + 200 ;
				// 		o_elm.style.top = i_offset_Y+"px";
				// 	};

					// --------------------------------
				}
		);
		//
		// ------------------------------------------------------------------------------------------------
	};
	//
	// ------------------------------------------------------------








	// ------------------------------------------------------------
	// DOES THIS DOC CONTAINS IFRAMES WITH AN ACTIVE SESSION
	// ------------------------------------------------------------
	//
	// strict mode need user is active in iframe
	//
	function search_for_active_iframes( b_strict )
	{
		// ------------------------------------------------------------
		//
		if (b_strict==null) b_strict=false;
		//
		// ------------------------------------------------------------
		//
		var a_iframes = document.getElementsByTagName("iframe");
		//
		// var o_iframe_document = null;
		// o_iframe_document = a_iframes[i].contentWindow.document || a_iframes[i].contentDocument;
		//
		// ------------------------------------------------------------
		//
		var a_output = new Array();
		//
		for ( var i = 0; i < a_iframes.length; ++i )
		{
			//	console.log(""
			//	+	" a_iframes["+i+"].contentWindow                        = "+ a_iframes[i].contentWindow
			//	+	" a_iframes["+i+"].contentWindow.IFRAMED_ACTIVE_SESSION = "+ a_iframes[i].contentWindow.IFRAMED_ACTIVE_SESSION
			//	+"");

			if ( b_strict )
			{
				if 	(	a_iframes[i].contentWindow.IFRAMED_ACTIVE_SESSION
					&&	a_iframes[i].contentWindow.ACTIVE_USER
					)
				{
					a_output.push( a_iframes[i].contentWindow );
				};
			}
			else
			{
				if 	(	a_iframes[i].contentWindow.IFRAMED_ACTIVE_SESSION )
				{
					a_output.push( a_iframes[i].contentWindow );
				};
			};
		};
		//
	//	console.log(""
	//	+	"a_iframes.length = "+a_iframes.length
	//	+	" a_output.length = "+a_output.length
	//	+"");
		//
		// ------------------------------------------------------------
		return a_output;
		// ------------------------------------------------------------

	};
	//
	// ------------------------------------------------------------



	// ------------------------------------------------------------
	// SEND ACTIVE SESSIONS
	// ------------------------------------------------------------
	//
	function send_active_session( i_time_interval )
	{
		// ------------------------------------------------------------
		if(DEBUG_INTERVALS) console.log("INSIDE INTERVAL :: ACTIVE_USER ... each "+i_time_interval+" s "+((IFRAMED_ACTIVE_SESSION)?" IS IFRAME ":"") );
		// ------------------------------------------------------------

		// ------------------------------------------------------------
		//
		if(i_time_interval==null) i_time_interval=0;
		//
		// ------------------------------------------------------------

		// ------------------------------------------------------------
		// prepare values to send
		//
		var a_scr = get_screen_infos();
		var a_win = get_window_inner_size();
		//
		// ------------------------------------------------------------
		// send infos ...
		//
		XHR_mgr.ALERT_ERRORS = false;	// WARNING suppress any xhr error ...
		//
		var xhr_req_id = XHR_mgr.easyRequest(
			// ------------------------------------------------------------
				"./php/online_users.php"
			// ------------------------------------------------------------
			,	null
			// ------------------------------------------------------------
			,	{	SET_ACTIVE_SESSION : "true"
				,	STATUS     : ((ACTIVE_USER) ? "ACTIVE" : "INACTIVE")
				,	TIMEOUT    : ACTIVE_USER_timeout
				,	CHECKDELAY : i_time_interval
				,	LOCATION   : document.location.href
				,	SW         : a_scr[0]
				,	SH         : a_scr[1]
				,	SD         : a_scr[2]
				,	AW         : a_scr[3]
				,	AH         : a_scr[4]
				,	IW         : a_win[0]
				,	IH         : a_win[1]
				}
			// ------------------------------------------------------------
			,	function( s_response , s_req_id )
				{
					// ------------------------------------------------------------
					// eval the ajax response
					// ------------------------------------------------------------
					//
					// o_JSON_SESSION = {...};
					//
					// o_JSON_SESSION[index]
					//
					// with index =	[  0 ]	CLIENT session_id
					// 		[  1 ]	CLIENT status		(ACTIVE|ONLINE|OFFLINE)
					// 		[  2 ]	CLIENT usr_agnt
					// 		[  3 ]	CLIENT rem_ipad
					// 		[  4 ]	CLIENT rem_host
					// 		[  5 ]	CLIENT location
					// 		[  6 ]	CLIENT server sessions timeout
					// 		[  7 ]	CLIENT configurated offline timeout
					// 		[  8 ]	ADMIN AVAILABLE FLAG
					// 		[  9 ]	ADMIN CHATROOM BUSY FLAG
					// 		[ 10 ]	CLIENT site history
					//
					// ------------------------------------------------------------
					//

				//	try
				//	{
						eval( s_response );
				//	}
				//	catch(e)
				//	{
				//		alert( "["+e.toString()+"]\n\n----[\n\n"+s_response+"\n\n]----\n\n" );
				//	};

					//
				//	console.log( "ajax response = " + s_response );
					//
					// ------------------------------------------------------------
					// ### WARNING
					//

					return true;

					//
					// ------------------------------------------------------------
				}
			// ------------------------------------------------------------
		);
		//
		// ------------------------------------------------------------

		// ------------------------------------------------------------
		if(DEBUG_INTERVALS) console.log("INSIDE INTERVAL :: ACTIVE_USER ... done ...");
		// ------------------------------------------------------------
	};
	//
	// ------------------------------------------------------------





	// ------------------------------------------------------------
	// DEBUG ACTIVE SESSIONS
	// ------------------------------------------------------------
	//
	function display_debug_active_session()
	{
		// ------------------------------------------------------------
		// get the correct debug div from main root page not iframe
		//
		if (IFRAMED_ACTIVE_SESSION) { var o_div = window.top.document.getElementById("POPUP_DEBUG_AJAX"); }
		else                        { var o_div =            document.getElementById("POPUP_DEBUG_AJAX"); };
		//
		if(o_div)
		{
			o_div.style.visibility = "visible";
			o_div.style.display    = "block";
			o_div.style.border     = "2px solid " + ((ACTIVE_USER) ? "#00dd00" : "#ffff00" );
		};
		//
		// ------------------------------------------------------------
		//
		if ( ! o_div ) return;
		//
		if ( o_JSON_SESSION == null )
		{
			// ------------------------------------------------------------
			// o_JSON_SESSION not defined
			// ------------------------------------------------------------
			// ------------------------------------------------------------
			//
			o_div.innerHTML = " o_JSON_SESSION not defined --- server not called ..."
			//
			// ------------------------------------------------------------
		}
		else
		{
			// ------------------------------------------------------------
			// o_JSON_SESSION is defined
			// ------------------------------------------------------------
			// ------------------------------------------------------------
			//
			var s_DEBUG_JSON = "";
			//
			for(var i=0; i < o_JSON_SESSION.length; i++)
			{
				// s_DEBUG_JSON += "["+i+"] ("+(typeof o_JSON_SESSION[i])+") : value = "+o_JSON_SESSION[i]+"\n";
				s_DEBUG_JSON += "["+i+"] = "+o_JSON_SESSION[i]+"\n";
			};
			//
		//	console.log( "JSON ANALYSE :\n"+s_DEBUG_JSON );
			//
			// ------------------------------------------------------------
			// define status images
			//
			var o_STATUS_IMG = {	"ACTIVE"  : { img:"./images/icon_client_state_active.png"  , bg:"#bcd3a1" }
					,	"ONLINE"  : { img:"./images/icon_client_state_online.png"  , bg:"#d3cea1" }
					,	"OFFLINE" : { img:"./images/icon_client_state_offline.png" , bg:"#d3a1a1" }
			};
			//
			// ------------------------------------------------------------
			//
			//

			o_div.innerHTML = ""
			+"<pre style=\"font-family:fixed;font-size:12px;font-weight:bold;text-align:left;\">"
			+""
			+	"JSON ANALYSE :\n"+ s_DEBUG_JSON			+"<br>"+"<br>"
			+	"IN IFRAME  : "+    IFRAMED_ACTIVE_SESSION.toString()	+"<br>"+"<br>"
			+	"IFRAMES    : "+    a_ACTIVE_IFRAMES_LIST.length		+"<br>"+"<br>"
			+""
			+"</pre>"
			+"";
		/*
			var s_session_id      = o_JSON_SESSION[ 0].toString();
			var s_status          = o_JSON_SESSION[ 1].toString();
			var s_user_agent      = o_JSON_SESSION[ 2].toString();
			var s_ipad            = o_JSON_SESSION[ 3].toString();
			var s_host            = o_JSON_SESSION[ 4].toString();
			var s_location        = o_JSON_SESSION[ 5].toString();
			var s_timeout_srv     = o_JSON_SESSION[ 6].toString();
			var s_timeout_cfg     = o_JSON_SESSION[ 7].toString();
			var s_admin_available = o_JSON_SESSION[ 8].toString();
			var s_admin_chat_flag = o_JSON_SESSION[ 9].toString();
			var s_history         = o_JSON_SESSION[10].toString();
			//
			// ------------------------------------------------------------
			//
			o_div.innerHTML = ""
			+"<pre style=\"font-family:fixed;font-size:12px;font-weight:bold;text-align:left;\">"
			+"AJAX DEBUG :: CLIENT STATUS"
			+"<br>"
			+"SESSION ID : "+       s_session_id 		+"<br>"
			+"<br>"
			+"STATUS     : "+    s_status			+"<br>"
			+"<br>"
			+"ADMIN AVAIL: "+    b_admin_available		+"<br>"
			+"ADMIN BUSY : "+    b_admin_chat_flag		+"<br>"
			+"<br>"
			+"IN IFRAME  : "+    IFRAMED_ACTIVE_SESSION.toString()	+"<br>"
			+"<br>"
			+"IFRAMES    : "+    object_toSource(a_ACTIVE_IFRAMES_LIST) +"<br>"
			+"<br>"
			+"BROWSER    : "+    s_user_agent		+"<br>"
			+"<br>"
			+"TIMEOUTS"
			+"<br>"
			+"SERVER sessions  : "+ s_timeout_srv		+" s<br>"
			+"PHP user offline : "+ s_timeout_cfg		+" s<br>"
			+"JS inactivity    : "+ ACTIVE_USER_timeout	+" s<br>"
			+"JS check time    : "+ i_time_interval		+" s<br>"
			+"<br>"
			+"</pre>"
			+"";
			//
		*/

			//
			// ------------------------------------------------------------
		};
	};
	//
	// ------------------------------------------------------------










	// ------------------------------------------------------------
	// STOP ACTIVE SESSIONS (STOP INTERVAL CALLS)
	// ------------------------------------------------------------
	//
	function stop_active_session()
	{
		// ------------------------------------------------------------
		if(DEBUG_INTERVALS) console.log("STOP INTERVAL :: ACTIVE_USER");
		// ------------------------------------------------------------
		//
		if (ACTIVE_USER_interval != null)
		{
			clearInterval(ACTIVE_USER_interval);

			ACTIVE_USER_interval = null;
		};
		//
		// ------------------------------------------------------------
	};
	//
	// ------------------------------------------------------------



	// ------------------------------------------------------------
	// INIT ACTIVE SESSIONS :: ADD INACTIVITY EVENT TRACKER +++ (INIT INTERVAL CALLS)
	// ------------------------------------------------------------
	//
	function init_active_session( i_time_interval )
	{
		// ------------------------------------------------------------
		// default interval ...
		//
		if ( i_time_interval == null || i_time_interval == undefined ) i_time_interval = 15;
		//
		// ------------------------------------------------------------
		// send session infos ...
		//
	//	send_active_session( i_time_interval );
		//
		// ------------------------------------------------------------
		// ### ADD INACTIVITY EVENT TRACKER
		// ------------------------------------------------------------
		//
		EventsManager.add_inactivity_tracker(
			// ------------------------------------------------------------
				(ACTIVE_USER_timeout * 1000)
			// ------------------------------------------------------------
			// ### ON INACTIVITY
			// ------------------------------------------------------------
			,	function()
				{
					// ------------------------------------------------------------
					//
					ACTIVE_USER = false;
					//
					// ------------------------------------------------------------

					// ------------------------------------------------------------
					// if INACTIVE :: stop interval ...
					//
					stop_active_session();
					//
					// ------------------------------------------------------------
					// stop chat room if launched ...
					//
					if ( CHATROOM_run_flag ) stop_ChatRoom( true );
					//
					// ------------------------------------------------------------
					// if INACTIVE :: start screen blanker ...
					//
				//	if(!IFRAMED_ACTIVE_SESSION)  init_screen_blanker();
				//	else              window.top.init_screen_blanker();
					//
					// ------------------------------------------------------------

					// ------------------------------------------------------------
					// send session status ...
					//
					send_active_session( i_time_interval );
					//
					// ------------------------------------------------------------

					// ------------------------------------------------------------
					// ### WARNING TO REMOVE
					// update the DEBUG POPUP AJAX
					//
					if(DEBUG_SESSIONS) display_debug_active_session();
					//
					// ------------------------------------------------------------
				}
			// ------------------------------------------------------------
			// ### ON ACTIVITY
			// ------------------------------------------------------------
			,	function()
				{
					// ------------------------------------------------------------
					// update the chat button state according admin availability ...
					//
					if(!IFRAMED_ACTIVE_SESSION) onAvailableAdmin_switch_chatroom_button();
					//
					// ------------------------------------------------------------
					// re-generate opened iframes list ...
					//
					a_ACTIVE_IFRAMES_LIST = search_for_active_iframes( false );
					//
				//	console.log("a_ACTIVE_IFRAMES_LIST.length = "+a_ACTIVE_IFRAMES_LIST.length);
					//
					//
					if( a_ACTIVE_IFRAMES_LIST.length == 0 )
					{
						// ------------------------------------------------------------
						// ### NO ACTIVE IFRAMES OPENED
						// ------------------------------------------------------------
						//
						ACTIVE_USER = true;
						//
						// ------------------------------------------------------------
						//
						if ( ACTIVE_USER_interval == null )
						{
							// ------------------------------------------------------------
							// ### INTERVAL NOT SET (first launch or come from inactive ...)
							// ------------------------------------------------------------
							// if user was inactive stop blanker ...
							//
						//	if(!IFRAMED_ACTIVE_SESSION)  stop_screen_blanker();
						//	else              window.top.stop_screen_blanker();
							//
							// ------------------------------------------------------------
							if(DEBUG_INTERVALS) console.log("SETUP INTERVAL :: ACTIVE_USER ... each "+i_time_interval+" s "+((IFRAMED_ACTIVE_SESSION)?" IS IFRAME ":"") );
							//
							// ------------------------------------------------------------
							// send active session ...
							//
							send_active_session( i_time_interval );
							//
							// run interval for active session reloading ...
							//
							ACTIVE_USER_interval = window.setInterval(
									function() { send_active_session( i_time_interval ); }
									,
									(i_time_interval * 1000)
							);
							//
							// ------------------------------------------------------------
						};
						//
						// ------------------------------------------------------------
					}
					else
					{
						// ------------------------------------------------------------
						// ### OPENED ACTIVE IFRAMES
						// ------------------------------------------------------------
						//

						//
						// ------------------------------------------------------------
					};
					//
					// ------------------------------------------------------------

					// ------------------------------------------------------------
					// ### WARNING TO REMOVE
					// update the DEBUG POPUP AJAX
					//
					if(DEBUG_SESSIONS) display_debug_active_session();
					//
					// ------------------------------------------------------------
				}
			// ### ------------------------------------------------------------
		);
		//
		// ### ------------------------------------------------------------
	};
	//
	// ------------------------------------------------------------














	// ------------------------------------------------------------
	// SCREEN BLANKER :: DISPLAY ALL SHOWROOM PHOTO ::
	//
	var SCREEN_BLANKER_flag     = true;
	//
	var SCREEN_BLANKER_interval = null;
	//
	// ------------------------------------------------------------
	function stop_screen_blanker()
	{
		// ------------------------------------------------------------
		//
		if (SCREEN_BLANKER_interval != null)
		{
			// ------------------------------------------------------------
			//
			clearInterval(SCREEN_BLANKER_interval);
			//
			SCREEN_BLANKER_interval = null;
			//
			// ------------------------------------------------------------
			//
			var o_div = document.getElementById("POPUP_PHOTO");
			//
			o_div.style.display    = "none";
			o_div.style.visibility = "hidden";
			//
			// ------------------------------------------------------------
		};
		//
		// ------------------------------------------------------------
	};
	// ------------------------------------------------------------
	function init_screen_blanker( i_time_interval )
	{
		// ------------------------------------------------------------
		// no blanker for iframes ... just the main root document

		if (IFRAMED_ACTIVE_SESSION) return;

		// ------------------------------------------------------------
		//
		if ( i_time_interval == null || i_time_interval == undefined ) i_time_interval = 6;
		//
		// ------------------------------------------------------------
		//
		stop_screen_blanker();
		//
		// ------------------------------------------------------------
		//
		var o_div = document.getElementById("POPUP_PHOTO");
		//
		o_div.style.display    = "block";
		o_div.style.visibility = "visible";
		//
		// ------------------------------------------------------------
		//
		if(SCREEN_BLANKER_flag)
		SCREEN_BLANKER_interval = window.setInterval(
			// ------------------------------------------------------------
			function()
			{
				// ------------------------------------------------------------
				//
				var i_index = Math.round( Math.random() * (o_CAR_TABLE.length-1) );
				//
				while( o_CAR_TABLE[i_index]['photo1'] == "" )
				{
					i_index = Math.round( Math.random() * (o_CAR_TABLE.length-1) );
				};
				//
				var s_photo_path  = "./photos/"+o_CAR_TABLE[i_index]['photo1'];
				//
				var s_photo_title    = o_CAR_TABLE[i_index][ 'marque' ]+"&nbsp;"+o_CAR_TABLE[i_index][ 'modele' ];
				var s_photo_subtitle = o_CAR_TABLE[i_index][ 'infos'  ];
				var s_photo_price    = o_CAR_TABLE[i_index][ 'prix'   ];
				//
				// ------------------------------------------------------------
				if(DEBUG_INTERVALS) console.log(""
				+"RUN INTERVAL :: SCREEN_BLANKER"  +"\n"+"\n"
				+"s_photo_path  = "+ s_photo_path  +"\n"
				+"s_photo_title = "+ s_photo_title +"\n"
				+"");
				// ------------------------------------------------------------
				//
				display_photo( o_div , s_photo_path , s_photo_title , s_photo_subtitle , s_photo_price );
				//
				// ------------------------------------------------------------
				// if flag changed stop interval ...
				//
				if (! SCREEN_BLANKER_flag)
				{
					stop_screen_blanker();
				};
				//
				// ------------------------------------------------------------
			}
			// ------------------------------------------------------------
			,	(i_time_interval * 1000)
			// ------------------------------------------------------------
		);
		//
		// ------------------------------------------------------------
	};
	//
	// ------------------------------------------------------------
	// ================================================================================================================================================================


















	// ================================================================================================================================================================
	// ------------------------------------------------------------
	// ### FULL NAME BROWSER + VERSION ...
	// ------------------------------------------------------------
	//
	function browser_specs_to_object()
	{
		var nVer = navigator.appVersion;
		var nAgt = navigator.userAgent;
		var browserName  = navigator.appName;
		var fullVersion  = ''+parseFloat(navigator.appVersion);
		var majorVersion = parseInt(navigator.appVersion,10);
		var nameOffset,verOffset,ix;

		// In Opera, the true version is after "Opera" or after "Version"

		if ((verOffset=nAgt.indexOf("Opera"))!=-1)
		{
			browserName = "Opera";
			fullVersion = nAgt.substring(verOffset+6);
			if ((verOffset=nAgt.indexOf("Version"))!=-1)
			fullVersion = nAgt.substring(verOffset+8);
		}

		// In MSIE, the true version is after "MSIE" in userAgent

		else if ((verOffset=nAgt.indexOf("MSIE"))!=-1)
		{
			browserName = "Microsoft Internet Explorer";
			fullVersion = nAgt.substring(verOffset+5);
		}

		// In Chrome, the true version is after "Chrome"

		else if ((verOffset=nAgt.indexOf("Chrome"))!=-1)
		{
			browserName = "Chrome";
			fullVersion = nAgt.substring(verOffset+7);
		}

		// In Safari, the true version is after "Safari" or after "Version"

		else if ((verOffset=nAgt.indexOf("Safari"))!=-1)
		{
			browserName = "Safari";
			fullVersion = nAgt.substring(verOffset+7);
			if ((verOffset=nAgt.indexOf("Version"))!=-1)
			fullVersion = nAgt.substring(verOffset+8);
		}

		// In Firefox, the true version is after "Firefox"

		else if ((verOffset=nAgt.indexOf("Firefox"))!=-1)
		{
			browserName = "Firefox";
			fullVersion = nAgt.substring(verOffset+8);
		}

		// In most other browsers, "name/version" is at the end of userAgent

		else if ( (nameOffset=nAgt.lastIndexOf(' ')+1) < (verOffset=nAgt.lastIndexOf('/')) )
		{
			browserName = nAgt.substring(nameOffset,verOffset);
			fullVersion = nAgt.substring(verOffset+1);
			if (browserName.toLowerCase()==browserName.toUpperCase()) {
				browserName = navigator.appName;
			}
		}

		// trim the fullVersion string at semicolon/space if present

		if ((ix=fullVersion.indexOf(";"))!=-1) fullVersion=fullVersion.substring(0,ix);
		if ((ix=fullVersion.indexOf(" "))!=-1) fullVersion=fullVersion.substring(0,ix);

		majorVersion = parseInt(''+fullVersion,10);

		if (isNaN(majorVersion))
		{
			fullVersion  = ''+parseFloat(navigator.appVersion);
			majorVersion = parseInt(navigator.appVersion,10);
		}

	//	document.write('Browser name  = '+browserName+'<br>');
	//	document.write('Full version  = '+fullVersion+'<br>');
	//	document.write('Major version = '+majorVersion+'<br>');
	//	document.write('navigator.appName = '+navigator.appName+'<br>');
	//	document.write('navigator.userAgent = '+navigator.userAgent+'<br>');

		return	{ 	name    : browserName
			,	version : fullVersion
			,	major   : majorVersion
		};

	};
	//
	var BROWSER = browser_specs_to_object();
	//
	// ------------------------------------------------------------
	// ================================================================================================================================================================




































	// ================================================================================================================================================================
	// ------------------------------------------------------------
	// ### DIRECT CHAT ROOM ::
	// ------------------------------------------------------------

	// ------------------------------------------------------------
	// chatroom button show / hide ...
	// ------------------------------------------------------------
	//
	function chatroom_start_button_visibility( b_flag )
	{
		// ------------------------------------------------------------
		var o_div_chat_button  = document.getElementById("CHATROOM_VISITOR_BUTTON");
	//	var o_div_chat_message = document.getElementById("CHATROOM_VISITOR_MESSAGE");

		if(! o_div_chat_button) return;
		// ------------------------------------------------------------
		if ( b_flag )
		{
			o_div_chat_button.style.visibility = "visible";
			o_div_chat_button.style.display    = "block";

		//	o_div_chat_message.style.visibility = "hidden";
		//	o_div_chat_message.style.display    = "none";
		}
		else
		{
			o_div_chat_button.style.visibility = "hidden";
			o_div_chat_button.style.display    = "none";

			if   ( CHATROOM_run_flag )
			{
		//		o_div_chat_message.style.visibility = "hidden";
		//		o_div_chat_message.style.display    = "none";
			}
			else
			{
		//		o_div_chat_message.style.visibility = "visible";
		//		o_div_chat_message.style.display    = "block";
			};
		};
		// ------------------------------------------------------------
	};
	//
	// ------------------------------------------------------------



	// ------------------------------------------------------------
	// on admin availability / chatroom button show / hide ...
	// ------------------------------------------------------------
	//
	function onAvailableAdmin_switch_chatroom_button()
	{
		if (o_JSON_SESSION==null) return;

		// ------------------------------------------------------------
		// get parameters from running active session main object ...
		//
		var s_admin_available = o_JSON_SESSION[8].toString();
		var s_admin_chat_flag = o_JSON_SESSION[9].toString();
		//
		// ------------------------------------------------------------
		// show/hide chat button if AVAILABLE and NOT BUSY admin ...
		//
		if ( s_admin_available=="true" && s_admin_chat_flag=="false" )
		{
			// finally show button if chatroom is not running

			if   ( ! CHATROOM_run_flag ) chatroom_start_button_visibility( true );
			else                         chatroom_start_button_visibility( false );
		}
		else
		{
			chatroom_start_button_visibility( false );
		};
		//
		// ------------------------------------------------------------
	};
	//
	// ------------------------------------------------------------




	// ------------------------------------------------------------
	// control the ENTER key ... TO SEND MESSAGE ...
	// ------------------------------------------------------------
	//
	function chatroom_key_control( e , elm )
	{
		// ------------------------------------------------------------
		//
		var i_key = e.keyCode || e.which;
		//
		// ------------------------------------------------------------
		//
		if (i_key==13)
		{
			// ------------------------------------------------------------
			// alert("SENDING MESSAGE TO CHAT :\n\n\n"+elm.value);
			// ------------------------------------------------------------

			// ------------------------------------------------------------
			// get chat messages lines ...
			//
			XHR_mgr.ALERT_ERRORS = false;	// WARNING suppress any xhr error ...
			//
			var xhr_req_id = XHR_mgr.easyRequest(
				// ------------------------------------------------------------
					"./php/online_users.php"
				// ------------------------------------------------------------
				,	null
				// ------------------------------------------------------------
				,	{	UPDATE_CHAT_MESSAGES : "true"
					,	STATUS               : ((ACTIVE_USER) ? "ACTIVE" : "INACTIVE")
					,	CHAT_MESSAGE         : elm.value
				//	,	CHAT_MESSAGE         : htmlentities( elm.value , "ENT_QUOTES" )
					}
				// ------------------------------------------------------------
				,	function( s_response , s_req_id )
					{
						// ------------------------------------------------------------
						// ------------------------------------------------------------
						//
						// --------------------------------
						//
					//	console.log( "ajax response = " + s_response );
						//
						// ------------------------------------------------------------
						// ### WARNING MANDATORY
						//
						return true;
						//
						// ------------------------------------------------------------
					}
				// ------------------------------------------------------------

			);
			//
			// ------------------------------------------------------------

			// ------------------------------------------------------------
			// refresh chat room visual ...
			//
			update_ChatRoom();
			//
			// ------------------------------------------------------------

			// ------------------------------------------------------------
			// clear input value ...
			//
			elm.value = "";
			//
			// ------------------------------------------------------------
		};
		//
		// ------------------------------------------------------------
	};
	//
	// ------------------------------------------------------------




	// ------------------------------------------------------------
	// init the chat room ...
	// ------------------------------------------------------------
	//
	var CHATROOM_run_flag = false;
	var CHATROOM_interval = null;
	//
	//
	//
	function init_ChatRoom()
	{
		CHATROOM_run_flag = true;

		// --------------------------------
		// display popup div element ...
		//
		var o_div_chat_popup = document.getElementById( "POPUP_CHATROOM" );
		//
		o_div_chat_popup.style.display    = 'block';
		o_div_chat_popup.style.visibility = 'visible';
		//
		// --------------------------------

		// --------------------------------
		// set input value ...
		//
		var o_chat_input = document.getElementById( "CHATROOM_INPUT_TAG" );
		//
		o_chat_input.value = "Cliquez ici ... tapez votre question ... et appuyer sur la touche Entrée";
		//
		// --------------------------------

		// --------------------------------
		// insert chat panel ... TODO JS WIDGET CHATROOM + AJAX/PHP CHAT CONTENT
		//
	//	var o_div_chat_panel = document.getElementById( "CHATROOM_PANEL" );
		//
	//	o_div_chat_panel.style.border = "2px solid #ff0000";
		//
	//	o_div_chat_panel.innerHTML = "running chat panel ...";
		//
		// --------------------------------

		// --------------------------------
		// update the popup div element ...
		//
		update_ChatRoom();
		//
		// and set an update interval ...
		//
		CHATROOM_interval = window.setInterval(
				function() { update_ChatRoom(); }
				,
				(4 * 1000)
		);
		//
		// --------------------------------



	};
	//
	// ------------------------------------------------------------


	// ------------------------------------------------------------
	// update chat room ...
	// ------------------------------------------------------------
	//
	function update_ChatRoom()
	{
		// ------------------------------------------------------------
		if(DEBUG_INTERVALS) console.log("INSIDE INTERVAL :: UPDATE CHATROOM ... ");
		// ------------------------------------------------------------

		// ------------------------------------------------------------
		//
		if(CHATROOM_run_flag)
		{
			// ------------------------------------------------------------
			// get chat messages lines ...
			//
			XHR_mgr.ALERT_ERRORS = false;	// WARNING suppress any xhr error ...
			//
			var xhr_req_id = XHR_mgr.easyRequest(
				// ------------------------------------------------------------
					"./php/online_users.php"
				// ------------------------------------------------------------
				,	null
				// ------------------------------------------------------------
				,	{	GET_CHAT_MESSAGES : "true"
					,	STATUS            : ((ACTIVE_USER) ? "ACTIVE" : "INACTIVE")
					}
				// ------------------------------------------------------------
				,	function( s_response , s_req_id )
					{
						// ------------------------------------------------------------
						// display the response in chat panel
						// ------------------------------------------------------------
						//
						var o_div_chat_panel = document.getElementById( "CHATROOM_PANEL" );
						//
					//	o_div_chat_panel.style.border = "2px solid #ff0000";
						//
					//	o_div_chat_panel.innerHTML = "<pre>"+s_response+"</pre>";
						o_div_chat_panel.innerHTML = s_response;
						//
						o_div_chat_panel.scrollTop = o_div_chat_panel.scrollHeight;
						//
						// --------------------------------
						//
					//	console.log( "ajax response = " + s_response );
						//
						// ------------------------------------------------------------
						// ### WARNING MANDATORY
						//
						return true;
						//
						// ------------------------------------------------------------
					}
				// ------------------------------------------------------------
			);
			//
			// ------------------------------------------------------------
		};
		//
		// ------------------------------------------------------------

		// ------------------------------------------------------------
		if(DEBUG_INTERVALS) console.log("INSIDE INTERVAL :: UPDATE CHATROOM ... done ...");
		// ------------------------------------------------------------
	};
	//
	// ------------------------------------------------------------







	// ------------------------------------------------------------
	// stop the chat room ...
	// ------------------------------------------------------------
	//
	function stop_ChatRoom( b_force )
	{
		if ( ! b_force )
		{
			if( ! confirm("Voulez vous vraiment clore la discussion ?")) return;
		};

		CHATROOM_run_flag = false;

		// ------------------------------------------------------------
		//
		if (CHATROOM_interval != null)
		{
			clearInterval(CHATROOM_interval);

			CHATROOM_interval = null;
		};
		//
		// ------------------------------------------------------------

		// --------------------------------
		// hide popup div element ...
		//
		var o_div_chat_popup = document.getElementById( "POPUP_CHATROOM" );
		//
		o_div_chat_popup.style.display    = 'none';
		o_div_chat_popup.style.visibility = 'hidden';
		//
		// --------------------------------

		// --------------------------------
		// clean chat panel ...
		//
		var o_div_chat_panel = document.getElementById( "CHATROOM_PANEL" );
		//
		o_div_chat_panel.innerHTML = "";
		//
		// --------------------------------

	};
	//
	// ------------------------------------------------------------
	// ================================================================================================================================================================



	// ================================================================================================================================================================
	// --------------------------------------------------------------------------------------------------------------
	// --------------------------------------------------------------------------------------------------------------
	function get_html_translation_table (table, quote_style)
	{
		// http://kevin.vanzonneveld.net
		// +   original by: Philip Peterson
		// +    revised by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
		// +   bugfixed by: noname
		// +   bugfixed by: Alex
		// +   bugfixed by: Marco
		// +   bugfixed by: madipta
		// +   improved by: KELAN
		// +   improved by: Brett Zamir (http://brett-zamir.me)
		// +   bugfixed by: Brett Zamir (http://brett-zamir.me)
		// +      input by: Frank Forte
		// +   bugfixed by: T.Wild
		// +      input by: Ratheous
		// %          note: It has been decided that we're not going to add global
		// %          note: dependencies to php.js, meaning the constants are not
		// %          note: real constants, but strings instead. Integers are also supported if someone
		// %          note: chooses to create the constants themselves.
		// *     example 1: get_html_translation_table('HTML_SPECIALCHARS');
		// *     returns 1: {'"': '&quot;', '&': '&amp;', '<': '&lt;', '>': '&gt;'}
		var entities = {},
			hash_map = {},
			decimal;
		var constMappingTable = {},
			constMappingQuoteStyle = {};
		var useTable = {},
			useQuoteStyle = {};

		// Translate arguments
		constMappingTable[0] = 'HTML_SPECIALCHARS';
		constMappingTable[1] = 'HTML_ENTITIES';
		constMappingQuoteStyle[0] = 'ENT_NOQUOTES';
		constMappingQuoteStyle[2] = 'ENT_COMPAT';
		constMappingQuoteStyle[3] = 'ENT_QUOTES';

		useTable = !isNaN(table) ? constMappingTable[table] : table ? table.toUpperCase() : 'HTML_SPECIALCHARS';
		useQuoteStyle = !isNaN(quote_style) ? constMappingQuoteStyle[quote_style] : quote_style ? quote_style.toUpperCase() : 'ENT_COMPAT';

		if (useTable !== 'HTML_SPECIALCHARS' && useTable !== 'HTML_ENTITIES') {
			throw new Error("Table: " + useTable + ' not supported');
			// return false;
		}

		entities['38'] = '&amp;';
		if (useTable === 'HTML_ENTITIES') {
			entities['160'] = '&nbsp;';
			entities['161'] = '&iexcl;';
			entities['162'] = '&cent;';
			entities['163'] = '&pound;';
			entities['164'] = '&curren;';
			entities['165'] = '&yen;';
			entities['166'] = '&brvbar;';
			entities['167'] = '&sect;';
			entities['168'] = '&uml;';
			entities['169'] = '&copy;';
			entities['170'] = '&ordf;';
			entities['171'] = '&laquo;';
			entities['172'] = '&not;';
			entities['173'] = '&shy;';
			entities['174'] = '&reg;';
			entities['175'] = '&macr;';
			entities['176'] = '&deg;';
			entities['177'] = '&plusmn;';
			entities['178'] = '&sup2;';
			entities['179'] = '&sup3;';
			entities['180'] = '&acute;';
			entities['181'] = '&micro;';
			entities['182'] = '&para;';
			entities['183'] = '&middot;';
			entities['184'] = '&cedil;';
			entities['185'] = '&sup1;';
			entities['186'] = '&ordm;';
			entities['187'] = '&raquo;';
			entities['188'] = '&frac14;';
			entities['189'] = '&frac12;';
			entities['190'] = '&frac34;';
			entities['191'] = '&iquest;';
			entities['192'] = '&Agrave;';
			entities['193'] = '&Aacute;';
			entities['194'] = '&Acirc;';
			entities['195'] = '&Atilde;';
			entities['196'] = '&Auml;';
			entities['197'] = '&Aring;';
			entities['198'] = '&AElig;';
			entities['199'] = '&Ccedil;';
			entities['200'] = '&Egrave;';
			entities['201'] = '&Eacute;';
			entities['202'] = '&Ecirc;';
			entities['203'] = '&Euml;';
			entities['204'] = '&Igrave;';
			entities['205'] = '&Iacute;';
			entities['206'] = '&Icirc;';
			entities['207'] = '&Iuml;';
			entities['208'] = '&ETH;';
			entities['209'] = '&Ntilde;';
			entities['210'] = '&Ograve;';
			entities['211'] = '&Oacute;';
			entities['212'] = '&Ocirc;';
			entities['213'] = '&Otilde;';
			entities['214'] = '&Ouml;';
			entities['215'] = '&times;';
			entities['216'] = '&Oslash;';
			entities['217'] = '&Ugrave;';
			entities['218'] = '&Uacute;';
			entities['219'] = '&Ucirc;';
			entities['220'] = '&Uuml;';
			entities['221'] = '&Yacute;';
			entities['222'] = '&THORN;';
			entities['223'] = '&szlig;';
			entities['224'] = '&agrave;';
			entities['225'] = '&aacute;';
			entities['226'] = '&acirc;';
			entities['227'] = '&atilde;';
			entities['228'] = '&auml;';
			entities['229'] = '&aring;';
			entities['230'] = '&aelig;';
			entities['231'] = '&ccedil;';
			entities['232'] = '&egrave;';
			entities['233'] = '&eacute;';
			entities['234'] = '&ecirc;';
			entities['235'] = '&euml;';
			entities['236'] = '&igrave;';
			entities['237'] = '&iacute;';
			entities['238'] = '&icirc;';
			entities['239'] = '&iuml;';
			entities['240'] = '&eth;';
			entities['241'] = '&ntilde;';
			entities['242'] = '&ograve;';
			entities['243'] = '&oacute;';
			entities['244'] = '&ocirc;';
			entities['245'] = '&otilde;';
			entities['246'] = '&ouml;';
			entities['247'] = '&divide;';
			entities['248'] = '&oslash;';
			entities['249'] = '&ugrave;';
			entities['250'] = '&uacute;';
			entities['251'] = '&ucirc;';
			entities['252'] = '&uuml;';
			entities['253'] = '&yacute;';
			entities['254'] = '&thorn;';
			entities['255'] = '&yuml;';
		}

		if (useQuoteStyle !== 'ENT_NOQUOTES') {
			entities['34'] = '&quot;';
		}
		if (useQuoteStyle === 'ENT_QUOTES') {
			entities['39'] = '&#39;';
		}
		entities['60'] = '&lt;';
		entities['62'] = '&gt;';


		// ascii decimals to real symbols
		for (decimal in entities) {
			if (entities.hasOwnProperty(decimal)) {
			hash_map[String.fromCharCode(decimal)] = entities[decimal];
			}
		}

		return hash_map;
	};
	// --------------------------------------------------------------------------------------------------------------
	// --------------------------------------------------------------------------------------------------------------
	function htmlentities ( string , quote_style , charset , double_encode )
	{
		// http://kevin.vanzonneveld.net
		// +   original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
		// +    revised by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
		// +   improved by: nobbler
		// +    tweaked by: Jack
		// +   bugfixed by: Onno Marsman
		// +    revised by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
		// +    bugfixed by: Brett Zamir (http://brett-zamir.me)
		// +      input by: Ratheous
		// +   improved by: Rafa? Kukawski (http://blog.kukawski.pl)
		// +   improved by: Dj (http://phpjs.org/functions/htmlentities:425#comment_134018)
		// -    depends on: get_html_translation_table
		// *     example 1: htmlentities('Kevin & van Zonneveld');
		// *     returns 1: 'Kevin &amp; van Zonneveld'
		// *     example 2: htmlentities("foo'bar","ENT_QUOTES");
		// *     returns 2: 'foo&#039;bar'
		var hash_map = this.get_html_translation_table('HTML_ENTITIES', quote_style),
			symbol = '';

		string = string == null ? '' : string + '';

		if (!hash_map) {
			return false;
		}

		if (quote_style && quote_style === 'ENT_QUOTES') {
			hash_map["'"] = '&#039;';
		}

		if (!!double_encode || double_encode == null) {
			for (symbol in hash_map) {
			if (hash_map.hasOwnProperty(symbol)) {
				string = string.split(symbol).join(hash_map[symbol]);
			}
			}
		} else {
        		string = string.replace(/([\s\S]*?)(&(?:#\d+|#x[\da-f]+|[a-zA-Z][\da-z]*);|$)/g, function (ignore, text, entity) {

			for (symbol in hash_map) {
				if (hash_map.hasOwnProperty(symbol)) {
				text = text.split(symbol).join(hash_map[symbol]);
				}
			}

			return text + entity;
			});
		}

		return string;
	};
	// --------------------------------------------------------------------------------------------------------------
	// --------------------------------------------------------------------------------------------------------------
	// ================================================================================================================================================================













	// --------------------------------------------------------------------------------------------------------------
	// STRINGS PROTOS
	// --------------------------------------------------------------------------------------------------------------
	//
	String.prototype.trim  = function() { return this.replace(/^\s+|\s+$/g,""); };
	String.prototype.ltrim = function() { return this.replace(/^\s+/      ,""); };
	String.prototype.rtrim = function() { return this.replace(/\s+$/      ,""); };
	String.prototype.strip = function() { return this.replace(/\s/g       ,""); };
	//
	// --------------------------------------------------------------------------------------------------------------



	// --------------------------------------------------------------------------------------------------------------
	// CAPITALIZING TEXTS
	// --------------------------------------------------------------------------------------------------------------
	//
	String.prototype.capitalize = function()
	{
		return this.replace( /(^|\s)([a-z])/g , function(m,p1,p2){ return p1+p2.toUpperCase(); } );
	};
	//
	// --------------------------------------------------------------------------------------------------------------




	// --------------------------------------------------------------------------------------------------------------
	// FORMATING NUMBERS (currency , ...)
	// --------------------------------------------------------------------------------------------------------------
	//
	function formating_number( s_nb , o_param )
	{
		// --------------------------------------------------------------------------------------------------------------
		if (o_param==null)
		{
			o_param = {
					i_nb_of_dec      : 0
				,	s_tho_sep        : " "
				,	s_dec_sep        : "."
				,	s_beg_symbol     : ""
				,	s_end_symbol     : ""
				,	s_negative_style : ""
				,	s_negative_class : ""
			};
		}
		else
		{
			if ( typeof o_param.i_nb_of_dec      == "undefined" ) { o_param.i_nb_of_dec      = 2;   };
			if ( typeof o_param.s_tho_sep        == "undefined" ) { o_param.s_tho_sep        = " "; };
			if ( typeof o_param.s_dec_sep        == "undefined" ) { o_param.s_dec_sep        = "."; };
			if ( typeof o_param.s_beg_symbol     == "undefined" ) { o_param.s_beg_symbol     = "";  };
			if ( typeof o_param.s_end_symbol     == "undefined" ) { o_param.s_end_symbol     = "";  };
			if ( typeof o_param.s_negative_style == "undefined" ) { o_param.s_negative_style = "";  };
			if ( typeof o_param.s_negative_class == "undefined" ) { o_param.s_negative_class = "";  };
		};
		// --------------------------------------------------------------------------------------------------------------

		var i_rounding = Math.pow( 10 , o_param.i_nb_of_dec );

		s_nb = parseFloat( s_nb ); 					// TO NUMBER
		var b_negative = ( parseFloat(s_nb) < 0 ) ? true : false;	// IS NEGATIVE ?
		s_nb = Math.round( s_nb * i_rounding ) / i_rounding;		// TO DECIMALS
		s_nb += ''; 							// TO STRING

		var a_parts = s_nb.split('.');

		var s_int_part = a_parts[0];

		// --------------------------------------------------------------------------------------------------------------
		if (o_param.i_nb_of_dec > 0)
		{
			// --------------------------------------------------------------------------------------------------------------
			if (a_parts.length > 1)
			{
				var s_tmp      = "";

				if (a_parts[1].length < o_param.i_nb_of_dec)
				{
					for(var n=0; n < (o_param.i_nb_of_dec-1); n++) { s_tmp += "0"; };
				};

				var s_dec_part = o_param.s_dec_sep + a_parts[1] +s_tmp;

			}
			else
			{
				var s_dec_part = o_param.s_dec_sep + '00';
			};
			// --------------------------------------------------------------------------------------------------------------
		}
		else
		{
			var s_dec_part = "";
		};
		// --------------------------------------------------------------------------------------------------------------

		var rgx = /(\d+)(\d{3})/;

		while (rgx.test(s_int_part)) { s_int_part = s_int_part.replace( rgx , '$1' + o_param.s_tho_sep + '$2'); };

		var s_output = o_param.s_beg_symbol + s_int_part + s_dec_part + o_param.s_end_symbol;

		// --------------------------------------------------------------------------------------------------------------
		if ( !b_negative )
		{
			return s_output;
		}
		else
		{
			return ""
			+"<span "
				+((o_param.s_negative_style!="") ? "style=\""+o_param.s_negative_style+"\"" : "")
				+((o_param.s_negative_class!="") ? "class=\""+o_param.s_negative_class+"\"" : "")
			+">"
			+	s_output
			+"</span>";
		};
		// --------------------------------------------------------------------------------------------------------------
	};
	//
	// --------------------------------------------------------------------------------------------------------------




























	// ================================================================================================================================================================
	// ------------------------------------------------------------
	// parse a location string ...
	//
	function location_parsed( s_location )
	{
		// ------------------------------------------------------------
		//
		var s_url   = s_location;
		//
		var i_slash = s_url.lastIndexOf("/");
		//
		var i_qmark = s_url.indexOf("?");
		if (i_qmark == -1) { i_qmark = s_url.length; };
		//
		var s_GET_string     = s_url.substring( i_qmark + 1 );
		//
		var s_page_filename  = s_url.substring( i_slash + 1 , i_qmark );
		//
		var s_page_shortname = s_page_filename.substring( 0 , s_page_filename.lastIndexOf(".") );
		s_page_shortname = s_page_shortname.replace(/_/g,"&nbsp;")
		//
		// ------------------------------------------------------------
		//
		return {	url            : s_url
			,	get            : s_GET_string
			,	page_name      : s_page_filename
			,	page_shortname : s_page_shortname
		};
		//
		// ------------------------------------------------------------
	};
	//
	// ------------------------------------------------------------
	// ================================================================================================================================================================






	// ================================================================================================================================================================
	//
	// ------------------------------------------------------------
	// ...
	//
	function utf8_decode(str_data)
	{
		// http://kevin.vanzonneveld.net
		// +   original by: Webtoolkit.info (http://www.webtoolkit.info/)
		// +      input by: Aman Gupta
		// +   improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
		// +   improved by: Norman "zEh" Fuchs
		// +   bugfixed by: hitwork
		// +   bugfixed by: Onno Marsman
		// +      input by: Brett Zamir (http://brett-zamir.me)
		// +   bugfixed by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
		// *     example 1: utf8_decode('Kevin van Zonneveld');
		// *     returns 1: 'Kevin van Zonneveld'
		var tmp_arr = [],
			i = 0,
			ac = 0,
			c1 = 0,
			c2 = 0,
			c3 = 0;

		str_data += '';

		while (i < str_data.length) {
			c1 = str_data.charCodeAt(i);
			if (c1 < 128) {
			tmp_arr[ac++] = String.fromCharCode(c1);
			i++;
			} else if (c1 > 191 && c1 < 224) {
			c2 = str_data.charCodeAt(i + 1);
			tmp_arr[ac++] = String.fromCharCode(((c1 & 31) << 6) | (c2 & 63));
			i += 2;
			} else {
			c2 = str_data.charCodeAt(i + 1);
			c3 = str_data.charCodeAt(i + 2);
			tmp_arr[ac++] = String.fromCharCode(((c1 & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
			i += 3;
			}
		}

		return tmp_arr.join('');
	};
	//
	// ------------------------------------------------------------
	// ...
	//
	function utf8_encode(argString)
	{
		// http://kevin.vanzonneveld.net
		// +   original by: Webtoolkit.info (http://www.webtoolkit.info/)
		// +   improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
		// +   improved by: sowberry
		// +    tweaked by: Jack
		// +   bugfixed by: Onno Marsman
		// +   improved by: Yves Sucaet
		// +   bugfixed by: Onno Marsman
		// +   bugfixed by: Ulrich
		// +   bugfixed by: Rafal Kukawski
		// *     example 1: utf8_encode('Kevin van Zonneveld');
		// *     returns 1: 'Kevin van Zonneveld'

		if (argString === null || typeof argString === "undefined") {
			return "";
		}

		var string = (argString + ''); // .replace(/\r\n/g, "\n").replace(/\r/g, "\n");
		var utftext = "",
			start, end, stringl = 0;

		start = end = 0;
		stringl = string.length;
		for (var n = 0; n < stringl; n++) {
			var c1 = string.charCodeAt(n);
			var enc = null;

			if (c1 < 128) {
			end++;
			} else if (c1 > 127 && c1 < 2048) {
			enc = String.fromCharCode((c1 >> 6) | 192) + String.fromCharCode((c1 & 63) | 128);
			} else {
			enc = String.fromCharCode((c1 >> 12) | 224) + String.fromCharCode(((c1 >> 6) & 63) | 128) + String.fromCharCode((c1 & 63) | 128);
			}
			if (enc !== null) {
			if (end > start) {
				utftext += string.slice(start, end);
			}
			utftext += enc;
			start = end = n + 1;
			}
		}

		if (end > start) {
			utftext += string.slice(start, stringl);
		}

		return utftext;
	};
	//
	// ------------------------------------------------------------
	// ================================================================================================================================================================




	// ================================================================================================================================================================
	//
	// ------------------------------------------------------------
	// ...
	//


	/**
	* Decodes string using MIME base64 algorithm
	* @see http://phpjs.org/functions/base64_decode
	*/
	function base64_decode( data )
	{
		var b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
		var o1, o2, o3, h1, h2, h3, h4, bits, i = 0, ac = 0, dec = "", tmp_arr = [];

		if (!data) {
			return data;
		}

		data += '';

		do {  // unpack four hexets into three octets using index points in b64
			h1 = b64.indexOf(data.charAt(i++));
			h2 = b64.indexOf(data.charAt(i++));
			h3 = b64.indexOf(data.charAt(i++));
			h4 = b64.indexOf(data.charAt(i++));

			bits = h1<<18 | h2<<12 | h3<<6 | h4;

			o1 = bits>>16 & 0xff;
			o2 = bits>>8 & 0xff;
			o3 = bits & 0xff;

			if (h3 == 64) {
			tmp_arr[ac++] = String.fromCharCode(o1);
			} else if (h4 == 64) {
			tmp_arr[ac++] = String.fromCharCode(o1, o2);
			} else {
			tmp_arr[ac++] = String.fromCharCode(o1, o2, o3);
			}
		} while (i < data.length);

		dec = tmp_arr.join('');
		dec = this.utf8_decode(dec);
		return dec;
	};









	// ========================================================================================
	if(typeof(ADMIN_DEBUG)=="undefined"){
		/**
		// ========================================================================================
		// ------------------------------------------------------------
		// ### Disable text selection
		// ------------------------------------------------------------
		//
		function disable_Content_Selection( o_elm )
		{
			if (o_elm==null) { o_elm = document.body; };

			if      (typeof o_elm.onselectstart!="undefined")       { o_elm.onselectstart       = function(){return false}; }	// IE
			else if (typeof o_elm.style.MozUserSelect!="undefined") { o_elm.style.MozUserSelect = "none";                   }	// Firefox
			else                                                    { o_elm.onmousedown         = function(){return false}; };	// others

			o_elm.style.cursor = "default"
		};
		//
		// ------------------------------------------------------------
		disable_Content_Selection();
		// ========================================================================================
		**/

		// ========================================================================================
		// ------------------------------------------------------------
		// ### Disable text selection
		// ------------------------------------------------------------
		//
		var Unselectable = {

			enable : function(e)
			{
				var e = e ? e : window.event;

				if (e.button != 1)
				{
					if      (e.target    ) { var targer = e.target;     }
					else if (e.srcElement) { var targer = e.srcElement; };

					if (targer.tagName)
					{
						var targetTag = targer.tagName.toLowerCase();

						if ((targetTag != "input") && (targetTag != "textarea")) { return false; };
					}
					else
					{
						return false;
					};
				};
			}
			,
			disable : function () { return true; }
		};
		//
		// ------------------------------------------------------------
		//
		if (typeof(document.onselectstart) != "undefined")
		{
			document.onselectstart = Unselectable.enable;
		}
		else
		{
			document.onmousedown = Unselectable.enable;
			document.onmouseup   = Unselectable.disable;
		};
		//
		// ------------------------------------------------------------
		// ========================================================================================


		// ========================================================================================
		// <body oncontextmenu="return false;">
		// REMOVE CONTEXT MENU
		// ------------------------------------------------------------
		// WARNING :: NEW PAGE ONLOAD
		//
		window.document.oncontextmenu = function(){return false;};
		//
		EventsManager.add_listener(
				window.document
			,	'contextmenu'
			,	function(){return false;}
		);
		//
		// ------------------------------------------------------------
		// ========================================================================================
	};
	// ========================================================================================












	// ------------------------------------------------------------
	// ### show/hide element
	// ------------------------------------------------------------
	//
	function show_hide_element( o_elm , b_flag , b_display )
	{
		if ((typeof o_elm) == 'string') { o_elm = document.getElementById( o_elm); };

		// if ((typeof o_elm.OLDDISPLAY) == undefined) { o_elm.OLDDISPLAY = (o_elm.style.display != "none") ? o_elm.style.display : "block"; };

		if(b_flag) {  o_elm.style.visibility="visible"; if(b_display)o_elm.style.display="block"; }
		else       {  o_elm.style.visibility="hidden";  if(b_display)o_elm.style.display="none";  };
	};
	//
	// ------------------------------------------------------------



	// ------------------------------------------------------------
	// ### switch :: show/hide element
	// ------------------------------------------------------------
	//
	function switch_element( o_elm )
	{
		if ((typeof o_elm) == 'string') { o_elm = document.getElementById( o_elm); };

		if( o_elm.style.visibility == 'hidden' )
		{
			show_hide_element( o_elm , true , true );
		}
		else
		{
			show_hide_element( o_elm , false , true );
		};
	};
	//
	// ------------------------------------------------------------





	// ------------------------------------------------------------
	// ### fading elements
	// ------------------------------------------------------------
	//
	function run_opacity_fader( o_elm , i_opacity_from , i_opacity_to , i_ms_delay , i_iterations , f_onFinished )
	{
		// ------------------------------------------------------------

		if ((typeof o_elm) == 'string') { o_elm = document.getElementById( o_elm); };

		var current_opacity  = i_opacity_from;

		if ( i_ms_delay   != null ) { i_ms_delay   = 25;    };
		if ( i_iterations != null ) { i_iterations =  0.01; };

		// ------------------------------------------------------------

		opacity_level(     o_elm , current_opacity );

		// show_hide_element( o_elm , true            );

		o_elm.style.visibility = "visible";

		// ------------------------------------------------------------

		if ( i_opacity_from < i_opacity_to )
		{
			// ------------------------------------------------------------
			var increase_opacity = function()
			{
				current_opacity += i_iterations;
				opacity_level( o_elm , current_opacity );
				if(current_opacity<i_opacity_to) setTimeout( increase_opacity , i_ms_delay);
				else if((typeof f_onFinished)=="function") f_onFinished();
			}
			// ------------------------------------------------------------
			increase_opacity();
			// ------------------------------------------------------------
		}
		else
		{
			// ------------------------------------------------------------
			var decrease_opacity = function()
			{
				current_opacity -= i_iterations;
				opacity_level( o_elm , current_opacity );
				if(current_opacity>i_opacity_to) setTimeout( decrease_opacity , i_ms_delay);
				else if((typeof f_onFinished)=="function") f_onFinished();
			}
			// ------------------------------------------------------------
			decrease_opacity();
			// ------------------------------------------------------------
		};

		// ------------------------------------------------------------
	};
	//
	// ------------------------------------------------------------






	// ------------------------------------------------------------
	// ### REPLACE A NODE CHILD
	// ------------------------------------------------------------
	//
	function node_to_div( o_node , o_div )
	{
		 o_div.replaceChild( o_node , o_div.firstChild );
	};
	//
	// ------------------------------------------------------------





	// ------------------------------------------------------------
	// ### WARNING BETA !!!
	// ------------------------------------------------------------
	//
	function from_iframe_get_parent_window()
	{
		var a_iframes = parent.document.getElementsByTagName("IFRAME");

		for (var i = 0; i < a_iframes.length; i++)
		{
			if (a_iframes[i].contentWindow === window) return a_iframes[i].contentWindow;
		};

		for ( var cframe in frames[ window.name ] )
		{
			if ( cframe === window) return cframe;
		};

		return null;
	};
	//
	// ------------------------------------------------------------





	// ------------------------------------------------------------
	// ### SCREEN :: INFOS
	// ------------------------------------------------------------
	//
	function get_screen_infos()
	{
		return [	window.screen.width
			,	window.screen.height
			,	window.screen.colorDepth
			,	window.screen.availWidth
			,	window.screen.availHeight
			];
	};
	//
	// ------------------------------------------------------------


	// ------------------------------------------------------------
	// ### WINDOW :: INNER SIZE
	// ------------------------------------------------------------
	//
	function get_window_inner_size()
	{
		var myWidth  = 0;
		var myHeight = 0;

		if( typeof( window.innerWidth ) == 'number' )
		{
			// Non-IE
			myWidth  = window.innerWidth;
			myHeight = window.innerHeight;
		}
		else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) )
		{
			// IE 6+ in 'standards compliant mode'
			myWidth  = document.documentElement.clientWidth;
			myHeight = document.documentElement.clientHeight;
		}
		else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) )
		{
			// IE 4 compatible
			myWidth  = document.body.clientWidth;
			myHeight = document.body.clientHeight;
		};

		return [ myWidth , myHeight ];
	};
	//
	// ------------------------------------------------------------

		/*
		// ------------------------------------------------------------
		var winW = 630, winH = 460;

		// ------------------------------------------------------------
		if	(	window.innerWidth
			&&	window.innerHeight
			)
		{
				winW = window.innerWidth;
				winH = window.innerHeight;
		}
		// ------------------------------------------------------------
		if 	(	document.body
			&&	document.body.offsetWidth
			)
		{
				winW = document.body.offsetWidth;
				winH = document.body.offsetHeight;
		}
		// ------------------------------------------------------------
		if	(	document.compatMode=='CSS1Compat'
			&&	document.documentElement
			&&	document.documentElement.offsetWidth
			)
		{
				winW = document.documentElement.offsetWidth;
				winH = document.documentElement.offsetHeight;
		}
		// ------------------------------------------------------------

		*/














	// ------------------------------------------------------------
	// ### WINDOW :: SCROLL OFFSET
	// ------------------------------------------------------------
	//
	function get_window_scroll_offset()
	{
		var scrOfX = 0;
		var scrOfY = 0;

		if( typeof( window.pageYOffset ) == 'number' )
		{
			// Netscape compliant
			scrOfY = window.pageYOffset;
			scrOfX = window.pageXOffset;
		}
		else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) )
		{
			// DOM compliant
			scrOfY = document.body.scrollTop;
			scrOfX = document.body.scrollLeft;
		}
		else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) )
		{
			// IE6 standards compliant mode
			scrOfY = document.documentElement.scrollTop;
			scrOfX = document.documentElement.scrollLeft;
		};

		return [ scrOfX, scrOfY ];
	};
	//
	// ------------------------------------------------------------













	// ------------------------------------------------------------
	// ### GET OFFSETS TO CENTER A BOX IN CURRENT WINDOWS
	// ------------------------------------------------------------
	//
	function get_offset_to_win_center( i_W , i_H )
	{
		// --------------------------------
		// get window infos ...

		var a_inner_win_size = get_window_inner_size();
		var a_scroll_offsets = get_window_scroll_offset();

		var i_avail_W = a_inner_win_size[0];
		var i_avail_H = a_inner_win_size[1];

		var i_offset_X = a_scroll_offsets[0];
		var i_offset_Y = a_scroll_offsets[1];

		// --------------------------------
		// find left/top position of div element for page centering ...

		var i_gocenter_X = Math.round( (i_avail_W - i_W) / 2 ) + i_offset_X;
		var i_gocenter_Y = Math.round( (i_avail_H - i_H) / 2 ) + i_offset_Y;

		// --------------------------------

		return { left:i_gocenter_X , top:i_gocenter_Y };
		// --------------------------------
	}
	//
	// ------------------------------------------------------------



	// ------------------------------------------------------------
	// ### NEW WINDOW POPUP
	// ------------------------------------------------------------
	//
	function win_popup_to_center( s_url , s_name , i_W , i_H , s_options )
	{
		// --------------------------------
		// get left/top offsets to apply ...

		var o_offset = get_offset_to_win_center( i_W , i_H );

		// --------------------------------
		// open new window ...

		wincentr = window.open(
				s_url
			,	s_name
			,		"top="    + o_offset.top  +","
				+	"left="   + o_offset.left +","
				+	"width="  + i_W          +","
				+	"height=" + i_H          +","
				+	s_options
		);
	}
	//
	// ------------------------------------------------------------



	// ------------------------------------------------------------
	// ### PAGE INDEX POPUP
	// ------------------------------------------------------------
	//
	function pop()
	{
		var a_ALL_A_TAGS = document.getElementsByTagName('a');

		for (var a = 0; a < a_ALL_A_TAGS.length; ++a)
		{
			// IF <a class="pop">

			if (a_ALL_A_TAGS[a].className == 'pop')
			{
				// GET id on extrait l'id de la popup à partir du href

				var pop = document.getElementById( a_ALL_A_TAGS[a].href.substring(a_ALL_A_TAGS[a].href.lastIndexOf('#') + 1));

				// si la popup existe on l'affiche (display block)

				if (pop)
				{
					pop.style.display = 'none';

					a_ALL_A_TAGS[a].onclick = function()
					{
						thisPopup = document.getElementById(this.href.substring(this.href.lastIndexOf('#') + 1))

						thisPopup.style.display = (thisPopup.style.display == 'none') ? 'block' : 'none';

						return false;
					};

					// on efface la popup en cliquant dessus

					pop.onclick = function()
					{
						this.style.display = 'none';
					};
				}
			}
		}
	}
	//
	// ------------------------------------------------------------
	// WARNING :: NEW PAGE ONLOAD
//	EventsManager.add_listener( window , 'load'   , pop );
	//
	// ------------------------------------------------------------







	// ------------------------------
	// COOKIES
	// ------------------------------
	function createCookie(name,value,days)
	{
		if (days) { var date = new Date(); date.setTime(date.getTime()+(days*24*60*60*1000)); var expires = "; expires="+date.toGMTString(); }
		else var expires = "";
		document.cookie = name+"="+value+expires+"; path=/";
	}
	// ------------------------------
	function readCookie(name)
	{
		var nameEQ = name + "="; var ca = document.cookie.split(';');
		for(var i=0;i < ca.length;i++) { var c = ca[i]; while (c.charAt(0)==' ') c = c.substring(1,c.length); if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); }
		return null;
	}
	// ------------------------------
	function eraseCookie(name)
	{
		createCookie(name,"",-1);
	};
	// ------------------------------





	// ------------------------------------------------------------
	// ### CSS BOX-SHADOW
	// ------------------------------------------------------------
	//
	// 	How it works
	//
	// 	Applying a box shadow to an element is straightforward.
	// 	 The CSS3 standard allows as its value:
	//
	// 	none | <shadow> [ <shadow> ]*
	//
	// 	where <shadow> is:
	//
	// 	<shadow> = inset? && [ <length>{2,4} && <color>? ]
	//
	// 	The first two lengths are the horizontal and vertical offset of the shadow, respectively.
	// 	The third length is the blur radius (compare that to the blur radius in in the text-shadow property).
	// 	Finally the fourth length is the spread radius, allowing the shadow to grow (positive values) or shrink (negative
	// 	values) compared to the size of the parent element.
	//
	// 	The inset keyword is pretty well explained by the standard itself:
	//
	// 	if present, [it] changes the drop shadow from an outer shadow (one that shadows
	// 	the box onto the canvas, as if it were lifted above the canvas) to an inner
	// 	shadow (one that shadows the canvas onto the box, as if the box were cut out of
	// 	the canvas and shifted behind it).
	//
	// 	To draw a simple shadow,
	// 	 just define an offset and a color, and off you go:
	//
	// 		-moz-box-shadow: 	1px 1px 10px #00f;
	//
	// 	Similarly, you can draw an in-set shadow with the aforementioned keyword.
	//
	// 		-moz-box-shadow: 	inset 1px 1px 10px #888;
	//
	// 	With the help of a spread radius,
	// 	 you can define smaller (or bigger) shadows than the element it is applied to:
	//
	// 		-moz-box-shadow: 	0px 20px 10px -10px #888;
	//
	// 	With the help of commas,
	// 	 you can also define multiple shadows by defining several shadows.
	//
	// 		-moz-box-shadow: 	  0     0   20px black
	// 				,	 20px  15px 30px yellow
	// 				,	-20px  15px 30px lime
	// 				,	-20px -15px 30px blue
	// 				,	 20px -15px 30px red;
	//
	// 	The different shadows blend into each other very smoothly,
	// 	 and as you may have noticed, the order in which they are defined does make a difference.
	// 	 As box-shadow is a CSS3 feature, Firefox 3.5 adheres to the CSS3 painting order.
	// 	 That means, the first specified shadow shows up on top,
	// 	 so keep that in mind when designing multiple shadows.
	//
	// 	As a final example,
	// 	 I want to show you the combination of -moz-box-shadow with an RGBA color definition.
	// 	 RGBA is the same as RGB, but it adds an alpha-channel transparency to change the opacity of the color.
	// 	 Let's make a black, un-blurred box shadow with an opacity of 50 percent, on a yellow background:
	//
	// 	-moz-box-shadow: inset 5px 5px 0 rgba(0, 0, 0, .5);
	//
	// 	As you can see, the yellow background is visible though the half-transparent shadow without further ado.
	// 	 This feature becomes particularly interesting when background images are involved,
	// 	 as you'll be able to see them shining through the box shadow.
	//
	// 	Cross-Browser Compatibility
	//
	// 	As a newer, work-in-progress CSS3 property, box-shadow has not yet been widely adopted by browser makers.
	//
	// 	To achieve the biggest possible coverage, it is advisable to define all three,
	// 	 the -moz, -webkit, and standard CSS3 syntax in parallel.
	// 	 Applicable browsers will then pick and adhere to the ones they support. For example:
	//
	// 	   -moz-box-shadow: 1px 1px 10px #00f;
	// 	-webkit-box-shadow: 1px 1px 10px #00f;
	// 	        box-shadow: 1px 1px 10px #00f;
	//
	// 	The good news is that the box-shadow property degrades gracefully on unsupported browsers.
	// 	 For example, all the examples above will look like plain and boring boxes with no shadow in MSIE.
	//
	// ------------------------------------------------------------
	// 	a solution ? for ie8- (but not not ie9)
	// 	------------------------------------------------------------
	//	FROM : http://msdn.microsoft.com/en-us/library/ms532985%28VS.85%29.aspx
	// 	------------------------------------------------------------
	//
	// 	DROPSHADOW FILTER
	// 	------------------------------------------------------------
	//
	// 	.NET Framework 3.0
	//
	// 	This page documents a feature of Visual Filters and Transitions, which is
	// 	deprecated as of Windows Internet Explorer 9.
	//
	// 	Creates a solid silhouette of the content of the object, offset in the specified
	// 	direction. This creates the illusion that the content is floating and casting a
	// 	shadow.
	//
	// 	------------------------------------------------------------
	// 	Syntax
	//		HTML
	//
	// 	<ELEMENT STYLE=
	// 	"filter:progid:DXImageTransform.Microsoft.DropShadow(sProperties)" ... >
	// 		Internet Explorer 5.5 or later
	//
	// 		Scripting
	//
	// 	object .style.filter =
	// 	"progid:DXImageTransform.Microsoft.DropShadow(sProperties)"
	// 		Internet Explorer 5.5 or later
	//
	// 	------------------------------------------------------------
	// 	Possible Values
	//
	// 	sProperties 	String that specifies one or more properties exposed by the filter.
	//
	// 	------------------------------------------------------------
	// 	Members Table
	//
	// 	The following table lists the members exposed by the DropShadow object.
	//
	// 	---------	--------	-----------
	// 	Attribute 	Property 	Description
	// 	---------	--------	-----------
	// 	color 		Color 		Sets or retrieves the value of the color applied with the filter.
	// 	enabled 	Enabled		Sets or retrieves a value that indicates whether the filter is enabled.
	// 	offX 		OffX		Sets or retrieves the value that the drop shadow is offset from the object along the x-axis.
	// 	offY 		OffY		Sets or retrieves the value that the drop shadow is offset from the object along the y-axis.
	// 	positive 	Positive	Sets or retrieves the value that indicates whether the filter creates a drop shadow from the nontransparent pixels of the object.
	// 	---------	--------	-----------
	//
	// 	------------------------------------------------------------
	// 	Remarks
	//
	// 	To retain the usual shadow effect on a transparent object, set the Positive
	// 	property to 0. This causes the drop shadow to appear outside the transparent
	// 	region.
	//
	// 	This effect is supported in Microsoft Internet Explorer 4.0. For more
	// 	information about Internet Explorer 4.0 filter behavior, see Downlevel Support
	// 	and Internet Explorer 4.0 Filters.
	//
	// 	The object that the filter is applied to must have layout before the filter
	// 	effect displays. You can give the object layout by setting the height or width
	// 	property, setting the position property to absolute, setting the writingMode
	// 	property to tb-rl, or setting the contentEditable property to true.
	//
	// 	You can assign multiple filters or transitions to an object by declaring each in
	// 	the filter property of the object. The following div declaration assigns two
	// 	filters and a Wheel transition to a div element.
	//
	// 	<DIV
	// 		style="
	// 		width:100%;
	// 		filter:
	// 			progid:DXImageTransform.Microsoft.MotionBlur(strength=13, direction=310)
	// 			progid:DXImageTransform.Microsoft.Blur(pixelradius=2)
	// 			progid:DXImageTransform.Microsoft.Wheel(duration=3);
	// 		"
	// 	>Blurry text with smudge of gray.</div>
	//
	// 	------------------------------------------------------------
	// 	Examples
	//
	// 	The following example shows how to change the effects of this filter by
	// 	modifying its properties.
	//
	// 	Code example:
	// 	http://samples.msdn.microsoft.com/workshop/samples/author/filter/DropShadow.htm
	//
	// 	This example applies the DropShadow to the content of a DIV element. You can
	// 	click the text of the DIV element to remove or restore the shadow.
	//
	// 	<SCRIPT>
	// 		function fnDepress()
	// 		{
	// 			var bState = oFilterDIV.filters.item('DXImageTransform.Microsoft.dropshadow').enabled;
	//
	// 			oFilterDIV.filters.item('DXImageTransform.Microsoft.dropshadow').enabled = !bState;
	// 		}
	// 	</SCRIPT>
	//
	// 	<DIV
	// 		id="oFilterDIV"
	// 		style="
	// 			cursor        : hand;
	// 			height        : 160px;
	// 			padding       : 10px;
	// 			font          : bold 13pt verdana;
	// 			filter:progid : DXImageTransform.Microsoft.dropshadow( OffX=5 , OffY=5 , Color='gray' , Positive='true' )
	// 		"
	// 		onclick="fnDepress();"
	// 	>This is the DIV content.</DIV>
	//
	// 	------------------------------------------------------------
	//
	// ------------------------------------------------------------







	// ------------------------------------------------------------
	// ### CSS BOX-SHADOW
	// ------------------------------------------------------------
	// PROPERTY                       TYPE            H OFFSET X          V OFFSET Y          RADIUS            SPREAD RADIUS            COLOR
	// --------                       ----            ----------          ----------          ------            -------------            -------------------------
	// (-*-)box-shadow:               inset           20px                20px                10px              -10px                    rgba(0,0,0,0.5);

	var get_css_boxShadow = function( s_shadow_type , i_shadow_offset_x , i_shadow_offset_y , i_shadow_radius , i_shadow_spread_radius , s_shadow_css_color )
	{
		// ------------------------------------------------------------
		//	if( ! s_shadow_type          ) s_shadow_type          = "inset";
		//	if( ! i_shadow_offset_x      ) i_shadow_offset_x      = 10;
		//	if( ! i_shadow_offset_y      ) i_shadow_offset_y      = 10;
		//	if( ! i_shadow_radius        ) i_shadow_radius        = 10;
		//	if( ! i_shadow_spread_radius ) i_shadow_spread_radius = 10;
		//	if( ! s_shadow_css_color     ) s_shadow_css_color     = "rgba(0,0,0,0.5)";
		// ------------------------------------------------------------
		var s_tmp = " "
		+	s_shadow_type           +" "
		+	i_shadow_offset_x       +"px "
		+	i_shadow_offset_x       +"px "
		+	i_shadow_radius         +"px"
		+((i_shadow_spread_radius!=""&&i_shadow_spread_radius!=null) ? ""
		+	i_shadow_spread_radius  +"px"
		:"")
		+	s_shadow_css_color
		+	";";
		// ------------------------------------------------------------
		return ""
		+	"\n    -moz-box-shadow : "+s_tmp
		+	"\n -webkit-box-shadow : "+s_tmp
		+	"\n         box-shadow : "+s_tmp
		+	"\n"
		+"";
		// ------------------------------------------------------------
	};
	// get_css_boxShadow( "" , 5 , 5 , 13 , "" , "#444444" );
	// ------------------------------------------------------------




	// ------------------------------------------------------------
	// ### CSS BORDER-RADIUS
	// ------------------------------------------------------------
	// PROPERTY                          RADIUS
	// --------                          ------
	// (-*-)border-radius:               10px
	//
	var get_css_borderRadius = function( i_border_radius )
	{
		// ------------------------------------------------------------
		if( ! i_border_radius ) i_border_radius = 10;
		// ------------------------------------------------------------
		return ""
		+	""
		+	"\n    -moz-border-radius : "+i_border_radius+"px;"
		+	"\n -webkit-border-radius : "+i_border_radius+"px;"
		+	"\n         border-radius : "+i_border_radius+"px;"
		+	"\n"
		+"";
		// ------------------------------------------------------------
	};
	//
	// ------------------------------------------------------------



























	// ------------------------------------------------------------
	// ### CSS DIV(IMAGE) BUTTON (with class="icon_mono_black_buttons")
	// ------------------------------------------------------------
	//
	var get_icon_mono_black_button = function( o_parameters )
	{
		/*
		// ------------------------------------------------------------
		// Exmaple parameter object
		// ------------------------------------------------------------
		o_parameters_example = {
			// ------------------------------------------------------------
			 	id      : "photo_close_button"
			// ------------------------------------------------------------
			,	src     : "./images/close.png"
			// ------------------------------------------------------------
			,	mode    : "" 				// "elm" | "html" [ "write"
			// ------------------------------------------------------------
			,	js_eval : ""
					+ " var o_elmt = document.getElementById( '"+divid+"' ); "
					+ " o_elmt.style.display    = 'none'; "
					+ " o_elmt.style.visibility = 'hidden'; "
					+ " o_elmt.style.zIndex     = 0; "
			// ------------------------------------------------------------
			,	js_call : function() { return false; }
			// ------------------------------------------------------------
		};
		// ------------------------------------------------------------
		*/

/*		// ------------------------------------------------------------
		return ""
		+"<div "
		+	"      id=\""+ o_parameters.id +"\" "
		+	" onclick=\""+ o_parameters.js_eval +"\" "
		+	"   class=\"icon_mono_black_buttons\" "
		+">"
		+	"<img "
		+		"    src=\""+ o_parameters.src +"\" "
		+		" border=\"0\" "
		+	">"
		+"</div>"
		+"";
		// ------------------------------------------------------------
*/

		// ------------------------------------------------------------
		return ""
		+"<img "
		+	"      id=\""+ o_parameters.id      +"\" "
		+	"     src=\""+ o_parameters.src     +"\" "
		+	" onclick=\""+ o_parameters.js_eval +"\" "
		+	"   style=\""+ o_parameters.style   +"\" "
		+	"   class=\"icon_mono_black_buttons\" "
		+	"  border=\"0\" "
		+" />"
		+"";
		// ------------------------------------------------------------
	};
	//
	// ------------------------------------------------------------





	// ------------------------------------------------------------
	// :: VIEW PHOTO ::
	//
	function display_photo( o_div_POPUP , s_file_name , s_image_title , s_image_subtitle , s_image_price )
	{
		// --------------------------------
		// get image infos ...

		var o_image = new Image();
		o_image.src = s_file_name;

		// delete o_image;

		o_image.onload = function()
		{
			var i_img_W = o_image.width;
			var i_img_H = o_image.height;

			display_photo_loaded( o_div_POPUP , s_file_name , s_image_title , s_image_subtitle , s_image_price , i_img_W , i_img_H );
		};

		// --------------------------------
	};

	function display_photo_loaded( o_div_POPUP , s_file_name , s_image_title , s_image_subtitle , s_image_price , i_img_W , i_img_H )
	{

		// --------------------------------
		// get a link to photo popup div element ...

		if ((typeof o_div_POPUP) == 'string') { o_div_POPUP = document.getElementById( o_div_POPUP ); };

		// --------------------------------
		// get window infos ...

		var a_inner_win_size = get_window_inner_size();
		var a_scroll_offsets = get_window_scroll_offset();

		var i_avail_W = a_inner_win_size[0];
		var i_avail_H = a_inner_win_size[1];

		var i_offset_X = a_scroll_offsets[0];
		var i_offset_Y = a_scroll_offsets[1];


		// --------------------------------
		// resize image to max window inner size if needed ...

		var i_img_R = i_img_W / i_img_H;
		var b_img_resized = false;

		if      ( i_img_H > i_avail_H-60 )  {   i_img_H = i_avail_H-60;   i_img_W = Math.round( i_img_H * i_img_R );  b_img_resized = true; }
		else if ( i_img_W > i_avail_W-60 )  {   i_img_W = i_avail_W-60;   i_img_H = Math.round( i_img_W / i_img_R );  b_img_resized = true; };

		// --------------------------------
		// find left/top position of div element to set to center image ...

		var o_offset = get_offset_to_win_center( i_img_W , i_img_H );

	//	o_offset.left -= s_POPUP_DIV_PADDING_X;
	//	o_offset.top  -= s_POPUP_DIV_PADDING_Y;

		// --------------------------------
		// adjust styles of photo popup div element ...

		o_div_POPUP.style.display    = 'block';
		o_div_POPUP.style.visibility = 'visible';
		o_div_POPUP.style.zIndex     = 100000;

		o_div_POPUP.style.left       = o_offset.left +'px';
		o_div_POPUP.style.top        = o_offset.top  +'px';

		o_div_POPUP.style.width      = i_img_W      +'px';
		o_div_POPUP.style.height     = i_img_H      +'px';

		// --------------------------------
		// prepare alt/title text ...

		var s_title_txt = "Cliquez pour fermer la photo ...";

		// --------------------------------
		// direct display or PHP Resizer ...

	//	if (b_img_resized) var s_img_src = "./php/resimg.php?w="+ i_img_W +"&h="+ i_img_H +"&img="+ encodeURIComponent( s_file_name ) +"";
	//	else               var s_img_src = ""+ s_file_name +"";

	//	var s_img_src = ""+ relative_path + s_file_name +"";
		var s_img_src = ""+ s_file_name +"";

		// console.log( "IMG = "+s_img_src );

		// --------------------------------
		// INNER HTML METHOD
		// --------------------------------
		var s_HTML_output = "";
		// ------------------------------------------------------------
		// INSERT DIV ICON BUTTON
		// ------------------------------------------------------------
		//
		s_HTML_output += ""
		+"<div "
		+	"      id=\"photo_close_button\""
		+	" onclick=\""
		+			" var o_elmt = document.getElementById( '"+o_div_POPUP.id+"' ); "
		+			" o_elmt.style.display    = 'none'; "
		+			" o_elmt.style.visibility = 'hidden'; "
		+			" o_elmt.style.zIndex     = 0; "
		+		"\" "
		+">"
		+	"<img "
		+		"     src=\""+relative_path+"./images/icon_mono_close_white_on_black.png\" "
		+		"  border=\"0\" "
		+		"     alt=\""+ s_title_txt +"\" "
		+		"   title=\""+ s_title_txt +"\" "
		+	">"
		+"</div>"
		+"";
		//
		// ------------------------------------------------------------
		// DIV ( IMAGE + SPAN(IMAGE NAME) )
		// ------------------------------------------------------------
		//
		s_HTML_output += ""
		+"<div "
		+	" onclick=\""
		+			" var o_elmt = document.getElementById( '"+o_div_POPUP.id+"' ); "
		+			" o_elmt.style.display    = 'none'; "
		+			" o_elmt.style.visibility = 'hidden'; "
		+			" o_elmt.style.zIndex     = 0; "
		+		"\" "
		+">"
		+	"<img "
		+		"      id=\"DISLAY_PHOTO_IMG\" "
	//	+		"     src=\""+ s_img_src +"\" "
		+		"   width=\""+ i_img_W +"\" "
		+		"  height=\""+ i_img_H +"\" "
		+		"     alt=\""+ s_title_txt +"\" "
		+		"   title=\""+ s_title_txt +"\" "
		+		" style=\""
		+			"         border : 1px solid #000000; "
		+			"\""
		+	">"
		+"";
		//
		// --------------------------------
			//
			var text_block = function( s_text , i_size , i_left , i_right , i_top , i_bottom )
			{
				// --------------------------------
				//
				return ""
			//	+	"<br/>"
				+	"<div "
				+		" style=\""
				+			"       position : absolute; "
				+			"      font-size : "+i_size+"px; "
				+			"    font-weight : bold; "
				+			"    white-space : nowrap; "
				+			"          color : #ffffff; "
				+			"     background : #000000; "
				+			"         border : 1px solid #ffffff; "
				+		((i_left)   ? "     left : "+ i_left   +"px; " : "")
				+		((i_right)  ? "    right : "+ i_right  +"px; " : "")
				+		((i_top)    ? "      top : "+ i_top    +"px; " : "")
				+		((i_bottom) ? "   bottom : "+ i_bottom +"px; " : "")
				+			"   padding-left : 10px; "
				+			"  padding-right : 10px; "
				+			"    padding-top : 5px; "
				+			" padding-bottom : 5px; "
				+			"\""
				+	">"
				+		s_text
				+	"</div>"
				+"";
				//
				// --------------------------------
			};
			//
			// --------------------------------
			// TITLE
			// SUB-TITLE
			// PRICE
			//
			if (s_image_title    != null) s_HTML_output += text_block( s_image_title    , 12 , 20 , null , 20 , null );
			if (s_image_subtitle != null) s_HTML_output += text_block( s_image_subtitle , 10 , null , 20 , null , 20 );
			if (s_image_price    != null) s_HTML_output += text_block( s_image_price    , 12 , null , 20 , null , 50 );
			//
		// --------------------------------
		//
		s_HTML_output += ""
		+"</div>"
		+"";
		// --------------------------------

		// --------------------------------
		o_div_POPUP.innerHTML = s_HTML_output;
		// --------------------------------
		setTimeout( function() { document.getElementById( "DISLAY_PHOTO_IMG" ).src = s_img_src; } , 250 );
		// --------------------------------
	};
	//
	// ------------------------------------------------------------









	// ------------------------------------------------------------------------------------------------------------------------------
	//
	function update_map_iframe( s_type )
	{
		var s_HTML_code = "";
		var i_w         = 402;
		var i_h         = 268;

		if (s_type == "google")
		{
			// EMBEDDED

			var s_iframe_src = ''
			+'http://maps.google.fr/maps'	+'?'
			+'ie=UTF8'			+'&amp;'
			+'ll=46.01624,4.03989'		+'&amp;'
			+'spn=0.003472,0.006899'	+'&amp;'
			+'t=m'				+'&amp;'
			+'z=17'				+'&amp;'
			+'vpsrc=6'			+'&amp;'
			+'output=embed'			+'';

		}
		else if (s_type == "mappy")
		{

			// EMBEDDED

			var s_iframe_src = '';

		}
		else
		{
			// EMBEDDED

			var s_iframe_src = '';
		};




		var s_HTML_code = ""
		+	"<iframe "
		+		"        width=\""+i_w+"\" "
		+		"       height=\""+i_h+"\" "
		+		"    scrolling=\"no\" "
		+		"  frameborder=\"0\" "
		+		" marginheight=\"0\" "
		+		"  marginwidth=\"0\" "
		+		"          src=\""+s_iframe_src+"\" "
		+	">"
		+	"</iframe>"
		+	"";

		/*
		+	"<br />"
		+	"<small>"
		+	"<a "
		+		"  href=\""+googlemap_link_B+"\" "
		+		" style=\"color:#0000FF;text-align:left\" "
		+	">"
		+	"Agrandir le plan"
		+	"</a>"
		+	"</small>"
		+	"";
		*/

		o_elm = document.getElementById('DIV_ACCESS_MAP');
		o_elm.innerHTML = s_HTML_code;

		// return 	s_HTML_code;
	};

	// ------------------------------------------------------------------------------------------------------------------------------


