Index: extensions/edit_gmaps/admin/admin.php
===================================================================
--- extensions/edit_gmaps/admin/admin.php	(revision 8466)
+++ extensions/edit_gmaps/admin/admin.php	(revision 8501)
@@ -24,6 +24,4 @@
 $template->assign_var_from_handle( 'ADMIN_CONTENT', 'plugin_admin_content');
 
-if ( empty($conf['gmaps_api_key']) )
-  $page['infos'][] = 'Please define the Google maps api key';
 
 ?>
Index: extensions/edit_gmaps/admin/admin_edit.php
===================================================================
--- extensions/edit_gmaps/admin/admin_edit.php	(revision 8466)
+++ extensions/edit_gmaps/admin/admin_edit.php	(revision 8501)
@@ -1,56 +1,23 @@
 <?php 
 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
-
-if (!defined('EDIT_RV_ROOT')) 
-define(  'EDIT_RV_ROOT',  PHPWG_PLUGINS_PATH.'edit_gmaps/admin/' );
-
 global $lang;
 load_language('lang', dirname(__FILE__).'/../');
 $admin_url = PHPWG_ROOT_PATH.'admin.php';
-if (file_exists ( 'themes/default/js/jquery.packed.js')) 
-{
-//version 2.1
- 
-   $icon_path = 'themes/default/icon/help.png';
-   $path_js=  'themes/default/js/' ; 
-
- }
- else
- {
-// version < 1.9
-  $path_js=  "template-common/lib/";  
-  $icon_path =  "admin/template/goto/theme/clear/icon/help.png";
-}
-$sql="SELECT * 
-FROM `".$prefixeTable."plugins` 
-WHERE `id` LIKE 'edit_gmaps'
-";
- $result = @pwg_query($sql);
-	if ($result) {
-	    $versions = mysql_fetch_array($result,MYSQL_ASSOC);
-	}
-$version= $versions['version'];
-
-if ( !isset($_GET['cat']) )
-  $_GET['cat'] = 'caddie';
+
+if ( !isset($_GET['cat']) )   $_GET['cat'] = 'caddie';
 $_GET['mode'] = 'map';
 include (PHPWG_ROOT_PATH.'admin/element_set.php');
-
-
-$template->concat('TABSHEET_TITLE', ' '.l10n_dec('%d element', '%d elements', count($page['cat_elements_id'])).' - '.$page['title']);
-
-
-$template->assign(
-  						array( 						
-						'EDIT_RV_ROOT' => EDIT_RV_ROOT)
-						 );
-
- 
+$template->concat('TABSHEET_TITLE', ' '.l10n_dec('%d image', '%d images', count($page['cat_elements_id'])).' - '.$page['title']);
 if ( isset($_POST['submit']) and !is_adviser() )
 {
-
-
   $collection = array();
-$_POST['target']=isset($_POST['target']) ? $_POST['target']: "" ;
+  if( !isset ($_POST['target']))
+  {
+  $_POST['submit'] == l10n('Submit') ;
+  $_POST['target']='selection';
+    $collection = $_POST['selection'];
+
+  }
+
   switch ($_POST['target'])
   {
@@ -65,60 +32,40 @@
       break;
   }
-//===========================================================================  
-$match="";
-
-  if ( count($collection)>0 )
-  {
-
-    $lat = trim($_POST['lat']);
-    $lon = trim($_POST['lon']);
-
-    if ( strlen($lat)>0 and strlen($lon)>0 )
+  
+
+  // test si mise à jour (valider) 
+  if ( isset($_POST['submit']) and  $_POST['submit'] == l10n('Submit') )
     {
-      if ( (double)$lat<=90 and (double)$lat>=-90
-          and (double)$lon<=180 and (double)$lat>=-180 )
-        $update_query = 'lat='.$lat.', lon='.$lon;
-      else
-        $page['errors'][] = 'Invalid lat or lon value';
-    }
-    elseif ( strlen($lat)==0 and strlen($lon)==0 )
-      $update_query = 'lat=NULL, lon=NULL';
-    else
-      $page['errors'][] = 'Both lat/lon must be empty or not empty';
- 
-  if ($_POST['submit']=='Valider' )
-  {
-    	if (isset($update_query))
-    	{
-      		$update_query = '
-					UPDATE '.IMAGES_TABLE.' SET '.$update_query.'
-  					WHERE id IN ('.implode(',',$collection).')';
-      		pwg_query($update_query);
-      		rvm_invalidate_cache();
-    	}
-		 $_POST['selection']=array();
-		 unset($collection);
-		 
+	  if ( count($collection)>0 )
+	  {
+		$lat = trim($_POST['lat']);
+		$lon = trim($_POST['lon']);
+
+		if ( strlen($lat)>0 and strlen($lon)>0 )
+		{
+		  if ( (double)$lat<=90 and (double)$lat>=-90
+			  and (double)$lon<=180 and (double)$lat>=-180 )
+			$update_query = 'lat='.$lat.', lon='.$lon;
+		  else
+			$page['errors'][] = 'Invalid lat or lon value';
+		}
+		elseif ( strlen($lat)==0 and strlen($lon)==0 )
+		  $update_query = 'lat=NULL, lon=NULL';
+		else
+		  $page['errors'][] = 'Both lat/lon must be empty or not empty';
+
+		if (isset($update_query))
+		{
+		  $update_query = '
+			UPDATE '.IMAGES_TABLE.' SET '.$update_query.'
+			WHERE id IN ('.implode(',',$collection).')';
+		  pwg_query($update_query);
+		  rvm_invalidate_cache();
+		}
+	  }
 	}
-  }
-//===========================================================================  
- 
- if ($_POST['submit']==l10n('reset' ) )
- {
-       $_POST['selection']=array();
-	    unset($collection);
- }
-
-  
-
- if ($_POST['submit']==l10n('search_title' ))
-  {  
-
-  $match  = $_POST['match'] ;
-
-   
-  }
- }
- 
+}
+
+
 $template->append(
   'specials',
@@ -167,21 +114,21 @@
     $page['nb_images']
     );
-  $template->assign('NAV_BAR', $nav_bar);
-}
-   
+  $template->assign('navbar', $nav_bar);
+}
+
 $images=array();
 if ( !empty($page['cat_elements_id']) )
 {
   $query='
-		SELECT id,tn_ext,name,path,file,lat,lon FROM '.IMAGES_TABLE.'
-  		WHERE id IN ('.implode(',',$page['cat_elements_id']).')
-  		'.$conf['order_by'].'
-  		LIMIT '.$page['start'].', '.$page['nb_images'].'
-		;';
- 	 $result = pwg_query($query);
-  	while ( $row=mysql_fetch_assoc($result) )
-    		$images[] = $row;
-}
-//=================================================================================
+SELECT id,tn_ext,name,path,file,lat,lon FROM '.IMAGES_TABLE.'
+  WHERE id IN ('.implode(',',$page['cat_elements_id']).')
+  '.$conf['order_by'].'
+  LIMIT '.$page['start'].', '.$page['nb_images'].'
+;';
+  $result = pwg_query($query);
+  while ( $row=mysql_fetch_assoc($result) )
+    $images[] = $row;
+}
+
 foreach ($images as $image)
 {
@@ -192,5 +139,4 @@
       )
     );
-	
   if ( isset($image['lat']) )
     $tpl_var['U_MAP'] = rvm_make_map_picture_url( array('image_id'=>$image['id'], 'image_file'=>$image['file']) );
@@ -198,81 +144,96 @@
 }
 
-//===================================================================================
 $template->assign(
-    array(	'path_js' => $path_js,
-            'U_DISPLAY'=> $admin_url.get_query_string_diff(array('display')),
-	        'VERSION'=> $version,
+    array(
+      'U_DISPLAY'=> $admin_url.get_query_string_diff(array('display'))
+    ) 
+  );
+
+//==========================================================
+	if (!defined('EDIT_RV_ROOT')) define(  'EDIT_RV_ROOT',  PHPWG_PLUGINS_PATH.'edit_gmaps/admin/' ); 
+	$path = EDIT_RV_PATH;
+    $plg_data = implode( '', file($path.'main.inc.php') );
+	 if (preg_match("|Version: (.*)|", $plg_data, $val))
+          { $edit_rv_plugin['version'] = trim($val[1]);  }  
+    $edit_rv_plugin = array_map('htmlspecialchars', $edit_rv_plugin); 
+	$version= $edit_rv_plugin['version'] ;
+	$icon_path = 'themes/default/icon/help.png';
+	$path_js=  'themes/default/js/' ; 
+
+//==================================================================================
+$match="";  
+if ( isset($_POST['submit']) and !is_adviser() )
+{ 	 
+
+  if ($_POST['submit']==l10n('Submit') )
+   {
+      $_POST['selection']=array();  
+      $collection =array(); 
+	  unset($collection); 
+  }
+ 
+
+ if ($_POST['submit']==l10n('reset' ) )
+		{
+			$_POST['selection']=array();
+			unset($collection);
+		}
+ 
+
+ }
+//=================================================================================
+$src="";
+$template->assign(
+    array(	'EDIT_RV_ROOT' => EDIT_RV_ROOT,
+	        'path_js' => $path_js,
+            'VERSION'=> $version,
 	      ) 
   );
-//==================================================================================  
-$template->assign(
-    array(	  
-	   		'GMAPS_API_KEY' => $conf['gmaps_api_key'],
-	   	 )
-	   );
-//==================================================================================
-$src="";
+  global $lang_info;
+if (date_default_timezone_get()) { $adresse =  date_default_timezone_get()   ;}
+else{
+
+}
+$adresse =  $lang_info['country'];   ;
+$adresse=str_replace("/",", ",$adresse);
+$template->assign( 'coordinates',
+				                   array('LAT' => '100',
+										 'LON' => '100',
+										 'ADRESSE' => $adresse,
+										 'ZOOM' => 18,
+										)
+									);
+if (isset($_POST['submit']) and $_POST['submit']==l10n('selection' ))
+{
 
 if (isset($collection))	
 {   
     $lat =1000;
-	
-if ($match<>"" && $match<>"/" )
-{   
-$match=str_replace(" ","+",$match);
-       $src="http://maps.google.com/maps/geo?q=".$match."&output=xml&sensor=true_or_false&key=".$conf['gmaps_api_key'];
-//json,kml,xml,csv
-  
-		$location = file_get_contents($src);
-		$location = explode("coordinates>",$location );
-		$location = explode(",",$location[1]);
-		$lat=$location[1];
-		$lon=$location[0];
-		$adresse ="Europe";
-		if (date_default_timezone_get()) {
-			$adresse = date_default_timezone_get()  ;
-		}
-	 
-
-  				$template->assign(	array('lat' => $lat ,
-	  						              'lon' => $lon ,));
+  foreach ($collection as $id_0)  {
+  		foreach ($images as $image)  {
+   			if (array_search($id_0,$image)) { 
+			  $_POST['selection'] = $collection ;
+
+			  if ($lat==1000) {
+			    $lat1= ($image['lat'] <> '') ? $image['lat'] : '100'  ;
+				$lon1= ($image['lon']  <> '') ? $image['lon'] : '3.0'  ;
+				if($lat1 != '100') $lat=$image['lat'];
+ 				
 				$template->assign( 'coordinates',
-				                   array('LAT' => $lat,
-										 'LON' => $lon,
-										  'ADRESSE' => $adresse,
+				                   array('LAT' =>   $lat1  ,
+										 'LON' =>   $lon1  ,
+										 'ADRESSE' =>  $adresse ,
+										 'ZOOM' => 4,
 										)
 									);
-   }
-									
-  foreach ($collection as $id_0)  {
-  		$adresse ="Europe/Paris";
-		if (date_default_timezone_get()) {
-			$adresse ="'" . date_default_timezone_get() ."'" ;
-		}
-	 
-
-  		foreach ($images as $image)  {
-
-   			if (array_search($id_0,$image)) {
-			 if ($lat==1000) {
-			    $lat= ($image['lat'] <> '') ? $image['lat'] : '100'  ;
-				$lon= ($image['lon']  <> '') ? $image['lon'] : '3.0'  ;
-
- 				$template->assign(	array('zoom' => 4,'lat' => $lat , 'lon' => $lon , )	);
-				$template->assign( 'coordinates',
-				                   array('LAT' => $lat,
-										 'LON' => $lon,
-										   'ADRESSE' => $adresse,
-										)
-									);
 
 				}
- 		  
+
 			 $tpl_var = array_merge( 
 			            $image,
       					array(
-						 'src'  => $src ,
-						   'match' => $_POST['match']  ,
-						   'check' => $_POST['submit']  ,
+						   'lat'  =>   $image['lat']    ,
+						   'lon' =>  $image['lon']    ,
+						   'adresse' =>  $adresse   ,
         					'U_TN' => get_thumbnail_url($image),
         					'TITLE' => get_thumbnail_title($image),
@@ -286,20 +247,12 @@
 								)  								
     						);
-						 
-		$template->append('Selectthumbnails', $tpl_var);	
-		
-		}
-	}	
-}
-
-
-}
-if (isset($_POST['submit']) )
-{ if ($_POST['submit']==l10n('Submit') )
- {
-  $_POST['selection']=array();  
-   $collection =array();  
-  }
-} 
+	 
+				$template->append('Selectthumbnails', $tpl_var);			
+			}
+		}	
+	}
+  }
+}
+
   //=======================================================================
 
Index: extensions/edit_gmaps/admin/admin_edit.tpl
===================================================================
--- extensions/edit_gmaps/admin/admin_edit.tpl	(revision 8466)
+++ extensions/edit_gmaps/admin/admin_edit.tpl	(revision 8501)
@@ -1,5 +1,4 @@
 {html_head}
 {* $Id: admin_edit.tpl  2011-01-03   *}
-
 {known_script id="jquery" src=$ROOT_URL|@cat:"themes/default/js/jquery.packed.js" } 
 {known_script id="jquery.cluetip" src=$ROOT_URL|@cat:"themes/default/js/plugins/jquery.cluetip.packed.js"}
@@ -8,17 +7,35 @@
 {known_script id="jquery.ui.resizable" src=$ROOT_URL|@cat:"themes/default/js/ui/ui.resizable.js"}
 {known_script id="EDIT_RV_script" src=$EDIT_RV_ROOT|@cat:"js/JScript.js"} 
-
-<script src="http://maps.google.com/maps/api/js?sensor=false&amp;hl={$lang_info.code}" type="text/javascript"></script>
-<script src="http://ajax.googleapis.com/ajax/libs/prototype/1.6.1.0/prototype.js" type="text/javascript"></script>
-
-
-<style type="text/css">{literal}
-#cadre{  background-color:Beige; border-width:5px;
- left:0px;
-  width:500px;
-  height:500px;
- 
-}
-
+{known_script id="fieldset" src=$EDIT_RV_ROOT|@cat:"js/fieldset.js"} 
+
+ {assign var='visible' value = true }
+  {if not empty($Selectthumbnails)  }
+    <script src="http://maps.google.com/maps/api/js?sensor=false&amp;hl={$lang_info.code}" type="text/javascript"></script>
+    <script src="http://ajax.googleapis.com/ajax/libs/prototype/1.6.1.0/prototype.js" type="text/javascript"></script>
+ 
+ 
+         <script type="text/javascript"> 
+            {if isset($coordinates) && $coordinates.LAT <= 90 }
+		      var   coordinates={ldelim} 
+                 LAT:'{$coordinates.LAT}',
+                 LON:'{$coordinates.LON}',
+                 ADRESSE:'{$coordinates.ADRESSE}',
+                 ZOOM:18
+                 };
+                 {else}
+             var    coordinates={ldelim} 
+                 LAT:' ',
+                 LON:' ',
+                 ADRESSE:'{$coordinates.ADRESSE}',
+                 ZOOM:4
+                 };
+           {/if}           
+         
+     Event.observe(window, 'load', onLoad );
+           
+            </script>
+ {/if}
+
+    <style type="text/css">{literal}
 #map{ 
  left:0px;
@@ -27,5 +44,5 @@
  border:outset;
 }
-
+ 
 
 {/literal}
@@ -35,87 +52,86 @@
 
 {/html_head}
-
-<fieldset>
-  <legend>{'Display options'|@translate}</legend>
-  <table ><td class="cluetip" title="{'set'|translate}|{'hlp_line1'|@translate}." align="left"  >
-<form>
-Set:
-<select onchange="document.location = this.options[this.selectedIndex].value;"   >
-  <optgroup label="Specials">
-    {html_options options=$specials}
-  </optgroup>
-  <optgroup label="{'Categories'|@translate}">
-  	{html_options options=$categories selected=$categories_selected}
-  </optgroup>
-  <!-- <optgroup label="{'Tags'|@translate}"></optgroup> -->
-</select>
-</form>
-</td>
-<td   > {'hlp_line2'|@translate} </td>
-
-</table>
-
-
-  <p>{'elements per page'|@translate}:
-      <a href="{$U_DISPLAY}&amp;display=20">20</a>
-    | <a href="{$U_DISPLAY}&amp;display=50">50</a>
-    | <a href="{$U_DISPLAY}&amp;display=100">100</a>
-    | <a href="{$U_DISPLAY}&amp;display=all">{'all'|@translate}</a>
-  </p>
+ 
+
+  
+
+    <fieldset class="fieldset">
+        <legend>{'Display options'|@translate}</legend>
+        <table ><td class="cluetip" title="{'set'|translate}|{'hlp_line1'|@translate}." align="left"  >
+        <form>
+        Set:
+        <select onchange="document.location = this.options[this.selectedIndex].value;"   >
+        <optgroup label="Specials">
+        {html_options options=$specials}
+        </optgroup>
+        <optgroup label="{'Categories'|@translate}">
+        {html_options options=$categories selected=$categories_selected}
+        </optgroup>
+        <!-- <optgroup label="{'Tags'|@translate}"></optgroup> -->
+        </select>
+        </form>
+        </td>
+        <td   > {'hlp_line2'|@translate} </td>
+        </table>
+        <p>{'elements per page'|@translate}:
+            <a href="{$U_DISPLAY}&amp;display=20">20</a>
+        | <a href="{$U_DISPLAY}&amp;display=50">50</a>
+        | <a href="{$U_DISPLAY}&amp;display=100">100</a>
+        | <a href="{$U_DISPLAY}&amp;display=all">{'all'|@translate}</a>
+        </p>
+    </fieldset>
+ {if  empty($Selectthumbnails) }{/if}
+
+
+<form action="" method="post" id="Envoie" name="Envoie"   >
+  {if not empty($thumbnails) &&  empty($Selectthumbnails) }  {/if} 
+
+<fieldset  id="Elements"  class="fieldset">
+	<legend>{'Elements'|@translate}</legend>
+
+    {if !empty($navbar) }{include file='navigation_bar.tpl'} {/if}
+        <fieldset >   
+	        <ul class="thumbnails">
+		        {foreach from=$thumbnails item=thumbnail}
+		        <li><span class="wrap1">
+			        <label>
+				        <span class="wrap2"><span>
+					        <img src="{$thumbnail.U_TN}" alt="{$thumbnail.file}" title="{$thumbnail.TITLE}" class="thumbnail" />
+				        </span></span>
+				        <input type="checkbox" name="selection[]" value="{$thumbnail.id}"    />
+			        </label>
+			        <span class="thumbLegend">
+			         {if isset($thumbnail.U_MAP)}
+			           <a href="{$thumbnail.U_MAP}" target="_blank">{$thumbnail.lat},{$thumbnail.lon}</a>
+			         {/if}
+                     {$thumbnail.file}  
+			        </span>
+
+			        </span>
+		        </li>
+		        {/foreach}
+	        </ul>	  
+        </fieldset>
+
+        <fieldset>
+        <label> {'target'|@translate}</label>
+        <table>
+        <td><label><input type="radio" name="target" value="all" /> {'all'|@translate}</label></td>
+        <td><label><input type="radio" name="target" value="selection" checked="checked" /> {'selection'|@translate}</label></td>
+        <td><input class="cluetip submit " title="{'selection'|@translate}|{'hlp_line3'|@translate}." type="submit" name="submit" value="{'selection'|@translate}"  {$tag_input_enabled} /></td>
+        </table>
+    </fieldset>
 </fieldset>
-
-
-<form action="" method="post" id="Envoie" name="Envoie"   >
-{if !$lat}
-<fieldset  >
-	<legend>{'Elements'|@translate}</legend>
-
-	<div class="navigationBar">{$NAV_BAR}</div>
-  {if not empty($thumbnails)}
-	<ul class="thumbnails">
-		{foreach from=$thumbnails item=thumbnail}
-		<li><span class="wrap1">
-			<label>
-				<span class="wrap2"><span>
-					<img src="{$thumbnail.U_TN}" alt="{$thumbnail.file}" title="{$thumbnail.TITLE}" class="thumbnail" />
-				</span></span>
-				<input type="checkbox" name="selection[]" value="{$thumbnail.id}" />
-			</label>
-
-			<span class="thumbLegend">
-			{if isset($thumbnail.U_MAP)}
-			<a href="{$thumbnail.U_MAP}" target="_blank">{$thumbnail.lat},{$thumbnail.lon}</a>
-			{/if}
-			</span>
-
-			</span>
-		</li>
-		{/foreach}
-	</ul>
-	{/if}
-</fieldset>
-{/if}
- 
-
-<fieldset>
-<legend>{'map'|@translate}</legend>
- 
-<input class="cluetip" title="{'selection'|@translate}|{'hlp_line3'|@translate}." type="submit" name="submit" value="{'selection'|@translate}" />
-<input class="cluetip" title="{'reset'|@translate}|{'hlp_line4'|@translate}."  type="submit" name="submit" value="{'reset'|@translate}" /><br />
-
-<input class="cluetip" title="{'search_title'|@translate}|{'hlp_line6'|@translate}."  type="submit" name="submit" value="{'search_title'|@translate}"  onclick="codeAddress()"  />
-<input class="cluetip" title="{'lieu'|@translate}|{'hlp_line5'|@translate}." type="text" size="70"   value="{$match}"  name="match"   id="match"    />
-
-{if $lat}
-<fieldset>
-<table>
-<td><div id="markerStatus"></div></td>
-<td><div id="markerAdress"></div></td>
-</table>
-
-
-    <div id="map"></div>
-
-    {if not empty($Selectthumbnails)}
+ <script>
+   {if empty($Selectthumbnails)  }
+  
+   var no_affiche=true ;
+   {else}
+   var no_affiche=false ;
+   {/if} </script>
+<fieldset   id ="geoposition"  class="fieldset">
+<legend>{'Selection'|@translate}</legend>
+  
+    <fieldset>    
 	    <ul class="thumbnails">
 		    {foreach from=$Selectthumbnails item=thumbnail}		 
@@ -135,59 +151,54 @@
 				{$thumbnail.file}  
 				</span>
-
 				</span>
-			</li>
-			
+			</li>			
 		{/foreach}
 	</ul>
-	{/if} 
-             <script type="text/javascript"> 
-            {if isset($coordinates) && $coordinates.LAT != 100 }
-		         var   coordinates={ldelim} 
-                 LAT:{$coordinates.LAT},
-                 LON:{$coordinates.LON},
-                 ADRESSE:{$coordinates.ADRESSE} 
-                 };
-            
-            {else}
-		         var  coordinates={ldelim} 
-                 LAT:100,
-                 LON:100,
-                 ADRESSE:{$coordinates.ADRESSE}
-                  };  
-            {/if} 
-           
-             
- 
-
-            Event.observe(window, 'load', onLoad );
-            if (typeof $Moot == "undefined") $Moot = [];
-             $Moot.push(Window.$);
-           
-           
-            </script>
-
 </fieldset>
-{/if}
-
-        <fieldset>
-          <legend>{'Form'|@translate}</legend> 
-          <label>Latitude (-90=S to 90=N)
-            <input type="text" size="8" value="{$lat}"  name="lat" />
-          </label>
-          <label>Longitude (-180=E to 180=W)
-            <input type="text" size="9"value="{$lon}"  name="lon"  />
-          </label>  
-          <p>
-            {'target'|@translate}
-            <label><input type="radio" name="target" value="all" /> {'all'|@translate}</label>
-            <label><input type="radio" name="target" value="selection" checked="checked" /> {'selection'|@translate}</label>
-          </p>
-
-          <p><input class="submit" type="submit" value="{'Submit'|@translate}" name="submit" {$tag_input_enabled} /></p>
-        </fieldset>
-
-</fieldset>
+    <fieldset>
+    <label>{'command'|@translate}</label>
+
+        <table>
+            <td>
+            <input class="cluetip" title="{'reset'|@translate}|{'hlp_line4'|@translate}."  type="submit" name="submit" value="{'reset'|@translate}" /><br />
+            </td>
+            <td>
+        <input class="cluetip" title="{'selection'|@translate}|{'hlp_line3'|@translate}." type="submit" name="submit" value="{'selection'|@translate}" />
+            </td>
+        </table>
+
+        <label>{'Form'|@translate}</label> 
+        <table>
+        <td >
+  
+        <input class="cluetip" title="{'search_title'|@translate}|{'hlp_line6'|@translate}." type=button  value="{'search_title'|@translate}" id="search" />
+
+        <input class="cluetip" title="{'lieu'|@translate}|{'hlp_line5'|@translate}." type="text" size="70"   value="{$match}"  name="match"   id="match"    />
+        </td>
+        <tr>  
+        <td> 
+        <label>Latitude (-90=S to 90=N)</label>
+        <input type="text" size="8" value="{$lat}"  name="lat" />
+        </td>
+        <td>          
+        <label>Longitude (-180=E to 180=W) </label> 
+        <input type="text" size="9"value="{$lon}"  name="lon"  />         
+        </td>
+        </tr><tr>
+
+        <td><input class="submit" type="submit" value="{'Submit'|@translate}" name="submit" {$tag_input_enabled} /></td>
+        </td></tr>
+        </table> 
+    </fieldset>
+
+    <fieldset>
+        <label>{'map'|@translate}</label>
+        <table>
+        <td><div id="markerStatus"></div></td>
+        <td><div id="markerAdress"></div></td>
+        </table>
+        <div id="map"></div>
+    </fieldset>
+  </fieldset>
+
 </form>
-
- 
Index: extensions/edit_gmaps/admin/js/JScript.js
===================================================================
--- extensions/edit_gmaps/admin/js/JScript.js	(revision 8466)
+++ extensions/edit_gmaps/admin/js/JScript.js	(revision 8501)
@@ -9,20 +9,16 @@
 function onLoad() {
     var reg = new RegExp('/', "g");
-   
-  coordinates.ADRESSE=  coordinates.ADRESSE.replace("/",", ");
+    
+    if (coordinates.ADRESSE)
+        coordinates.ADRESSE = coordinates.ADRESSE.replace("/", ", ");
 
           document.getElementById("match").value = coordinates.ADRESSE;
                 geocoder = new google.maps.Geocoder();
 	            var mapElement = document.getElementById("map");
-             if  ( coordinates.LAT  <= 90 ) {
-                
-                 n = coordinates.ADRESSE.indexOf("/");
-                 if (n>0)
-                     zoom = 5;
-                     else
-		            zoom = 18 ;
+	            if (coordinates.LAT <= 90 && coordinates.LAT != " " && coordinates.LAT != "" ) {
+
 		        } else {
 		            coordinates.LAT=49 ;coordinates.LON = 3;
-		       
+		            coordinates.ZOOM = coordinates.ZOOM | 18;
 		            geocoder.geocode({ 'address': coordinates.ADRESSE }, function (results, status) {
 		                /* Si l'adresse a pu être géolocalisée */
@@ -36,8 +32,8 @@
 		                }
 		            });
-                 
-		            zoom = 4;
+
+		           
 		        }
- 
+  zoom = coordinates.ZOOM;
    LatLng = new google.maps.LatLng(coordinates.LAT, coordinates.LON);
   
@@ -113,10 +109,12 @@
                 document.Envoie.lat.value=latLng.lat() ;
                 document.Envoie.lon.value = latLng.lng();
+               
                 
                 }
            
-           function updateMarkerAddress(str) {               
-                  document.getElementById('markerAdress').innerHTML = str; 
-
+           function updateMarkerAddress(str) {
+               document.getElementById('markerAdress').innerHTML = str;
+        
+               jQuery("#match").val(str);
             }
 
@@ -161,46 +159,64 @@
       }
   });
-        }
-
-
-
-
-        jQuery().ready(function () {
-
-
-            jQuery('.cluetip').cluetip({
-                width: 300, height: 100,
-                splitTitle: '|'
-            }
+}
+
+//=======================================================
+function On_Click(a, b, c) {
+    document.Envoie.lat.value = b;
+    document.Envoie.lon.value = c;
+
+    coordinates = {LAT:a,
+     LON : b} ;
+    LatLng = new google.maps.LatLng(coordinates.LAT, coordinates.LON);
+    updateMarkerPosition(LatLng);
+
+
+}
+
+jQuery(window).load(
+
+      function () {
+//Récupérer tous les inputs radios appartenant à un même groupe
+ /*         a = jQuery('input[type=hidden][name=Selectthumbnail]');
+          b = a.length;
+          c = jQuery('input[type=hidden]:checked').length;
+          d = jQuery('input[type=hidden][name="Selectthumbnail"]').attr('value'); 
+*/
+
+        //  onLoad();
+      }); 
+
+jQuery(document).ready(function () {
+
+
+    jQuery('.cluetip').cluetip({
+        width: 300, height: 100,
+        splitTitle: '|'
+    }
   );
-
-            // Resize possible  
-            jQuery("#cadre").resizable({
-                handles: "all",
-                animate: true,
-                animateDuration: "slow",
-                animateEasing: "swing",
-                preventDefault: true,
-                preserveCursor: true,
-                autoHide: true,
-                ghost: true
-            });
-
-            jQuery("#match").keydown(function (e) {
-
-                // e.target         pour FireFox
-                // event.srcElement pour IE
-                var Obj = e ? e.target : event.srcElement;
-                if (Obj.tagName != "INPUT") return false;
-
-
-                var Code = e.keyCode || e.which;
-                if (Code != 13) return true;
-                    coordinates.ADRESSE=   document.getElementById("match").value  ;
-                    codeAddress();
-                return false;
-            });
-
-
-        });
-
+  jQuery("#search").click(function (e) {
+
+        coordinates = { ADRESSE: jQuery("#match").val(),
+                        LAT:0,LON:0,ZOOM: 18 
+                       };
+        codeAddress();
+        return false;
+    });
+
+    jQuery("#match").keydown(function (e) {
+        // e.target         pour FireFox
+        // event.srcElement pour IE
+        var Obj = e ? e.target : event.srcElement;
+        if (Obj.tagName != "INPUT") return false;
+        var Code = e.keyCode || e.which;
+        if (Code != 13) return true;
+        coordinates = { ADRESSE: jQuery("#match").val(),
+                        LAT:0,LON:0,ZOOM: 18 
+                       };
+        codeAddress();
+        return false;
+    });
+
+
+});
+
Index: extensions/edit_gmaps/admin/js/fieldset.js
===================================================================
--- extensions/edit_gmaps/admin/js/fieldset.js	(revision 8501)
+++ extensions/edit_gmaps/admin/js/fieldset.js	(revision 8501)
@@ -0,0 +1,176 @@
+ if (typeof ef_animate_fast == "undefined") 
+      var ef_animate_fast =  true;
+
+      // Smart Fieldsets initialization/ 
+      if (typeof ef_plus_bullet_path == "undefined") 
+      {       
+         var ef_plus_bullet_path = './plugins/edit_gmaps/admin/icon/plus.png';
+         var ef_minus_bullet_path = './plugins/edit_gmaps/admin/icon/minus.png';
+ 
+      }
+
+     if (typeof ef_separator == "undefined")  
+     var ef_separator = '&nbsp;: ';
+
+      function ef_reduce(fieldset_id, fast) {
+          var l_m = jQuery('#' + fieldset_id + ' legend');
+          if (ef_reduce.arguments.length < 2) fast = ef_animate_fast;
+          if (!l_m.is('.ef_command')) l_m.addClass('ef_command');
+          if (!jQuery('#' + fieldset_id).is(':hidden'))
+              l_m.trigger('ef_reduce_private', fast);
+          l_m.removeClass('ef_command');
+
+      }
+
+      function ef_maximize(fieldset_id, fast) {
+          var l_r = jQuery('#' + fieldset_id + '_reduced_legend');
+          if (ef_maximize.arguments.length < 2) fast = ef_animate_fast;
+          if (!l_r.is('.ef_command')) l_r.addClass('ef_command');
+          if (jQuery('#' + fieldset_id).is(':hidden'))
+              l_r.trigger('ef_maximize_private', fast);
+          l_r.removeClass('ef_command');
+      }
+
+    
+      function ef_init(fieldset_id, cache_id) {
+          jQuery(document).ready(function () {
+              var f_m = jQuery('#' + fieldset_id);
+              var l_m = jQuery('#' + fieldset_id + ' legend');
+              var l_txt = l_m.text();
+              var f_r = f_m;
+              var l_r = l_m;
+
+              if (ef_minus_bullet_path != '') l_m.prepend(
+          '<img alt = "" title = ""' +
+          'src = "' + ef_minus_bullet_path + '"' + '>&nbsp;'
+        );
+              l_m.addClass('ef_legends');
+              l_m.addClass('ef_click_ok');
+   
+
+              f_r = jQuery('#' + fieldset_id + " ").clone();
+              l_r = jQuery('#' + fieldset_id + " LEGEND").clone();
+              f_r.empty();
+              l_r.appendTo(f_r);
+ 
+              f_r.attr('id', fieldset_id + '_reduced');
+              f_r.insertAfter(f_m);
+               f_r.css({display: 'none'   });
+              
+   
+              l_r.attr('id', fieldset_id + '_reduced_legend');
+              l_r.addClass('ef_legends');
+              l_r.addClass('ef_click_ok');
+
+               
+
+              l_r.css({                
+                  outlineColor: "invert",
+                  opacity: 0
+              });  
+                        
+     if (ef_plus_bullet_path == '') 
+         l_r.append(
+          '<span style = "padding-left:' + l_m.css('padding-left') + ';">' +
+          l_txt + '</' + 'span>' + ef_separator
+         );
+              else 
+              {
+
+              lg= jQuery(l_r).find("img") ;
+              if(lg.length>0)
+                  lg.get(0).src = ef_plus_bullet_path ;
+
+              l_r.append('&nbsp;' + ef_separator  );
+         }
+
+             f_r.append('<span id="' + cache_id +'" > </span>') ;
+                   jQuery('.ef_legends').css('cursor', 'pointer');
+              l_m.bind('ef_reduce_private', function (event, fast) { // Reduce
+             
+                  if (l_m.is('.ef_command, .ef_click_ok')) {
+                      if (fast) {
+                          f_m.hide();
+                          f_r.show();
+                          f_r.find('*').css({opacity: 1});
+                      }
+                      else {
+                          f_m.find('*').not('.ef_legends, img').animate(
+                                 {opacity: 0} ,
+                                200,
+                                function () {
+                                    f_m.slideUp(400);
+                                    f_r.slideDown(400, function () {
+                                            f_r.find('*').css({opacity: 1});
+                                    });
+                                }
+                            );
+                      }
+                  }
+              });
+              l_r.bind('ef_maximize_private', function (event, fast) { // Maximize
+                  if (l_r.is('.ef_command, .ef_click_ok')) {
+                      if (fast) {
+                          f_r.hide();
+                          f_m.show();
+                      } else {
+                          f_r.find('*').css({opacity: 0});
+                          f_r.slideUp(400);
+                          f_m.slideDown(400, function () {
+                              f_m.find('*').not('.ef_legends, img').animate(
+                                                                    {opacity: 1},
+                                                                            200
+                                                                              );
+                                 });
+                        }
+                  }
+              });
+              l_m.click(function () { // Reduce
+                  l_m.trigger('ef_reduce_private', ef_animate_fast);
+              });
+              l_r.click(function () { // Maximize
+                  l_r.trigger('ef_maximize_private', ef_animate_fast);
+              });
+          });
+      }
+
+
+      jQuery(document).ready(function () {
+          if (jQuery(".fieldset").length >= 1)
+              jQuery(".fieldset").each(
+                function (i) {
+                    id0 = jQuery(this).attr("id");
+                    if (id0 == "") jQuery(this).attr("id", "Cadre_" + i);
+                    id0 = jQuery(this).attr("id");
+                    // Update of the '#cache' value when changing the selected value in the fieldset
+                    jQuery("#" + id0 + ' .inputs').click(function () {
+                        jQuery("#" + id0).text(jQuery("#" + id0 + ' .inputs:checked').next().text());
+                    });
+                });
+          // Some changes of the defaults, nothing to see with Smart Fieldsets
+          //   jQuery('input').attr('checked', 'true');
+          jQuery('code').css('font-size', 'larger');
+          jQuery('#ef_presentation label, #ef_presentation input').css('cursor', 'pointer');
+      });
+
+
+
+      jQuery(document).ready(function () {
+          if (jQuery(".fieldset").length >= 1) {
+              jQuery(".fieldset").each(
+              function (i) {
+                  id0 = jQuery(this).attr("id");
+                  ef_init(id0, 'cache' + i);
+
+              })
+          }
+          if (no_affiche) {
+              ef_reduce("geoposition", true)
+          } else {
+              ef_reduce("Elements", true)
+          }
+
+      })
+
+             
+           
