Index: /extensions/GMaps/admin/gmaps_category_maps.tpl
===================================================================
--- /extensions/GMaps/admin/gmaps_category_maps.tpl	(revision 16010)
+++ /extensions/GMaps/admin/gmaps_category_maps.tpl	(revision 16011)
@@ -8,5 +8,4 @@
 
 {combine_script  id="gpc.ui.iconSelector" path="plugins/GrumPluginClasses/js/ui.iconSelector.js" require="jquery.ui"}
-{combine_script  id="gpc.ui.categorySelector" path="plugins/GrumPluginClasses/js/ui.categorySelector.js" require="jquery.ui"}
 {combine_script  id="maps.google.com/api" path="http://maps.google.com/maps/api/js?sensor=false"}
 
@@ -204,5 +203,5 @@
                   url: "{/literal}{$datas.urlRequest}{literal}",
                   async: true,
-                  data: { ajaxfct:"admin.assoc.getAssoc", id:properties.id },
+                  data: { ajaxfct:"admin.assoc.getAssoc", token:'{/literal}{$token}{literal}', id:properties.id },
                   success:
                     function(msg)
@@ -245,5 +244,5 @@
                         url: "{/literal}{$datas.urlRequest}{literal}",
                         async: true,
-                        data: { ajaxfct:"admin.assoc.deleteAssoc", id:id },
+                        data: { ajaxfct:"admin.assoc.deleteAssoc", token:'{/literal}{$token}{literal}', id:id },
                         success:
                           function(msg)
@@ -328,5 +327,5 @@
           url: "{/literal}{$datas.urlRequest}{literal}",
           async: true,
-          data: { ajaxfct:"admin.assoc.getList" },
+          data: { ajaxfct:"admin.assoc.getList", token:'{/literal}{$token}{literal}' },
           success:
             function(msg)
@@ -383,5 +382,5 @@
           url: "{/literal}{$datas.urlRequest}{literal}",
           async: true,
-          data: { ajaxfct:"admin.assoc.setAssoc", id:properties.id, datas:datas },
+          data: { ajaxfct:"admin.assoc.setAssoc", token:'{/literal}{$token}{literal}', id:properties.id, datas:datas },
           success:
             function(msg)
Index: /extensions/GMaps/admin/gmaps_category_maps_iListMaps.tpl
===================================================================
--- /extensions/GMaps/admin/gmaps_category_maps_iListMaps.tpl	(revision 16010)
+++ /extensions/GMaps/admin/gmaps_category_maps_iListMaps.tpl	(revision 16011)
@@ -15,13 +15,10 @@
 
     <td width="40px">
-      <img src="{$themeconf.admin_icon_dir}/edit_s.png"
-           class="button" alt="{'gmaps_edit'|@translate}"
-           title="{'gmaps_edit'|@translate}"
-           onclick='am.editAssoc({$data.id});'/>
-      <img src="{$themeconf.admin_icon_dir}/delete.png"
-           class="button"
-           alt="{'gmaps_delete'|@translate}"
-           title="{'gmaps_delete'|@translate}"
-           onclick='am.deleteAssoc({$data.id});'/>
+      <span class="buttonEdit"
+            title="{'gmaps_edit'|@translate}"
+            onclick='am.editAssoc({$data.id});'/>
+      <span class="buttonDelete"
+            title="{'gmaps_delete'|@translate}"
+            onclick='am.deleteAssoc({$data.id});'/>
     </td>
   </tr>
Index: /extensions/GMaps/admin/gmaps_kmlfiles.tpl
===================================================================
--- /extensions/GMaps/admin/gmaps_kmlfiles.tpl	(revision 16010)
+++ /extensions/GMaps/admin/gmaps_kmlfiles.tpl	(revision 16011)
@@ -79,5 +79,5 @@
                   url: "{/literal}{$datas.urlRequest}{literal}",
                   async: true,
-                  data: { ajaxfct:"admin.kmlFiles.getFile", id:properties.id },
+                  data: { ajaxfct:"admin.kmlFiles.getFile", token:'{/literal}{$token}{literal}', id:properties.id },
                   success:
                     function(msg)
@@ -122,5 +122,5 @@
                         url: "{/literal}{$datas.urlRequest}{literal}",
                         async: true,
-                        data: { ajaxfct:"admin.kmlFiles.deleteFile", id:id },
+                        data: { ajaxfct:"admin.kmlFiles.deleteFile", token:'{/literal}{$token}{literal}', id:id },
                         success:
                           function(msg)
@@ -181,5 +181,5 @@
           url: "{/literal}{$datas.urlRequest}{literal}",
           async: true,
-          data: { ajaxfct:"admin.kmlFiles.getList" },
+          data: { ajaxfct:"admin.kmlFiles.getList", token:'{/literal}{$token}{literal}' },
           success:
             function(msg)
@@ -243,5 +243,5 @@
             url: "{/literal}{$datas.urlRequest}{literal}",
             async: true,
-            data: { ajaxfct:"admin.kmlFiles.setFile", id:properties.id, name:$('#iBDKmlName').val() },
+            data: { ajaxfct:"admin.kmlFiles.setFile", token:'{/literal}{$token}{literal}', id:properties.id, name:$('#iBDKmlName').val() },
             success:
               function(msg)
@@ -333,4 +333,5 @@
         <td>{'gmaps_name'|@translate}</td>
         <td>
+          <input type='hidden' id='iToken' name ="token" value='{$token}'>
           <input type='hidden' id='iBDKmlId' name ="id" value=''>
           <input type='hidden' id='iBDKmlAjaxFct' name="ajaxfct" value='admin.kmlFiles.setFile'>
Index: /extensions/GMaps/admin/gmaps_kmlfiles_iListFiles.tpl
===================================================================
--- /extensions/GMaps/admin/gmaps_kmlfiles_iListFiles.tpl	(revision 16010)
+++ /extensions/GMaps/admin/gmaps_kmlfiles_iListFiles.tpl	(revision 16011)
@@ -9,13 +9,10 @@
 
     <td width="40px">
-      <img src="{$themeconf.admin_icon_dir}/edit_s.png"
-           class="button" alt="{'gmaps_edit'|@translate}"
-           title="{'gmaps_edit'|@translate}"
-           onclick='km.editKmlFile({$data.id});'/>
-      <img src="{$themeconf.admin_icon_dir}/delete.png"
-           class="button"
-           alt="{'gmaps_delete'|@translate}"
-           title="{'gmaps_delete'|@translate}"
-           onclick='km.deleteKmlFile({$data.id});'/>
+      <span class="buttonEdit"
+            title="{'gmaps_edit'|@translate}"
+            onclick='km.editKmlFile({$data.id});'/>
+      <span class="buttonDelete"
+            title="{'gmaps_delete'|@translate}"
+            onclick='km.deleteKmlFile({$data.id});'/>
     </td>
   </tr>
Index: /extensions/GMaps/admin/gmaps_maps.tpl
===================================================================
--- /extensions/GMaps/admin/gmaps_maps.tpl	(revision 16010)
+++ /extensions/GMaps/admin/gmaps_maps.tpl	(revision 16011)
@@ -435,5 +435,5 @@
                   url: "{/literal}{$datas.urlRequest}{literal}",
                   async: true,
-                  data: { ajaxfct:"admin.maps.getMap", id:properties.id },
+                  data: { ajaxfct:"admin.maps.getMap", token:'{/literal}{$token}{literal}', id:properties.id },
                   success:
                     function(msg)
@@ -481,5 +481,5 @@
                         url: "{/literal}{$datas.urlRequest}{literal}",
                         async: true,
-                        data: { ajaxfct:"admin.maps.deleteMap", id:id },
+                        data: { ajaxfct:"admin.maps.deleteMap", token:'{/literal}{$token}{literal}', id:id },
                         success:
                           function(msg)
@@ -603,5 +603,5 @@
           url: "{/literal}{$datas.urlRequest}{literal}",
           async: true,
-          data: { ajaxfct:"admin.maps.getList" },
+          data: { ajaxfct:"admin.maps.getList", token:'{/literal}{$token}{literal}' },
           success:
             function(msg)
@@ -670,5 +670,5 @@
           url: "{/literal}{$datas.urlRequest}{literal}",
           async: true,
-          data: { ajaxfct:"admin.maps.setMap", id:properties.id, datas:datas },
+          data: { ajaxfct:"admin.maps.setMap", token:'{/literal}{$token}{literal}', id:properties.id, datas:datas },
           success:
             function(msg)
Index: /extensions/GMaps/admin/gmaps_maps_iListMaps.tpl
===================================================================
--- /extensions/GMaps/admin/gmaps_maps_iListMaps.tpl	(revision 16010)
+++ /extensions/GMaps/admin/gmaps_maps_iListMaps.tpl	(revision 16011)
@@ -13,11 +13,8 @@
 
     <td width="40px">
-      <img src="{$themeconf.admin_icon_dir}/edit_s.png"
-           class="button" alt="{'gmaps_edit'|@translate}"
+      <span class="buttonEdit"
            title="{'gmaps_edit'|@translate}"
            onclick='udm.editMap({$data.id});'/>
-      <img src="{$themeconf.admin_icon_dir}/delete.png"
-           class="button"
-           alt="{'gmaps_delete'|@translate}"
+      <span class="buttonDelete"
            title="{'gmaps_delete'|@translate}"
            onclick='udm.deleteMap({$data.id});'/>
Index: /extensions/GMaps/gmaps.css
===================================================================
--- /extensions/GMaps/gmaps.css	(revision 16010)
+++ /extensions/GMaps/gmaps.css	(revision 16011)
@@ -7,11 +7,5 @@
 #iListKml table  { width:100%; text-align:left; border-collapse: collapse; }
 
-#iListMaps.roma table tr:hover,
-#iListAssoc.roma table tr:hover,
-#iListKml.roma table tr:hover  { cursor:pointer; background:#303030; }
 
-#iListMaps.clear table tr:hover,
-#iListAssoc.clear table tr:hover,
-#iListKml.clear table tr:hover { cursor:pointer; color: #D54E21; background:#dbe8f3; }
 
 #iBDAssocCatId {
@@ -76,5 +70,13 @@
 }
 
-// fix IE8 compatibility bugs from GPC 3.2.0 (fixed in next release)
+/* fix IE8 compatibility bugs from GPC 3.2.0 (fixed in next release) */
 .formtable, .formtable P { margin-left:0px;  }
 .tabsheet2 { list-style:none; }
+
+.buttonEdit,
+.buttonDelete {
+  width:15px;
+  height:15px;
+  display:inline-block;
+  background:url(./../GrumPluginClasses/icons/buttons.png) no-repeat 0 0 transparent;
+}
Index: /extensions/GMaps/gmaps2.css
===================================================================
--- /extensions/GMaps/gmaps2.css	(revision 16010)
+++ /extensions/GMaps/gmaps2.css	(revision 16011)
@@ -137,3 +137,5 @@
 }
 
-
+.icon_gmaps {
+  border:none;
+}
Index: /extensions/GMaps/gmaps_aip.class.inc.php
===================================================================
--- /extensions/GMaps/gmaps_aip.class.inc.php	(revision 16010)
+++ /extensions/GMaps/gmaps_aip.class.inc.php	(revision 16011)
@@ -78,4 +78,6 @@
   public function initEvents()
   {
+    global $template;
+
     parent::initEvents();
 
@@ -85,7 +87,6 @@
       GPCRequestBuilder::loadJSandCSS();
     }
-    add_event_handler('loc_end_page_header', array(&$this->css, 'applyCSS'));
-    GPCCss::applyGpcCss();
-  }
+  }
+
 
   /**
@@ -100,4 +101,5 @@
 
     $template->set_filename('plugin_admin_content', dirname(__FILE__)."/admin/gmaps_admin.tpl");
+    GPCCore::setTemplateToken();
 
     switch($_GET['tab'])
@@ -232,6 +234,6 @@
     global $template;
 
+    GPCCore::addUI('categorySelector');
     GPCCore::addHeaderCSS('iconSelector', 'plugins/GrumPluginClasses/css/iconSelector_'.$template->get_themeconf('name').'.css');
-    GPCCore::addHeaderCSS('categorySelector', 'plugins/GrumPluginClasses/css/categorySelector_'.$template->get_themeconf('name').'.css');
 
     $template->set_filename('body_page',
Index: /extensions/GMaps/gmaps_aip_release.class.inc.php
===================================================================
--- /extensions/GMaps/gmaps_aip_release.class.inc.php	(revision 16010)
+++ /extensions/GMaps/gmaps_aip_release.class.inc.php	(revision 16011)
@@ -35,13 +35,4 @@
 
   /*
-    initialize events call for the plugin
-  */
-  public function initEvents()
-  {
-    parent::initEvents();
-    add_event_handler('loc_end_page_header', array(&$this->css, 'applyCSS'));
-  }
-
-  /*
     display administration page
   */
Index: /extensions/GMaps/gmaps_ajax.php
===================================================================
--- /extensions/GMaps/gmaps_ajax.php	(revision 16010)
+++ /extensions/GMaps/gmaps_ajax.php	(revision 16011)
@@ -25,8 +25,6 @@
    */
   if(!isset($_REQUEST['ajaxfct'])) $_REQUEST['ajaxfct']='';
-  if(preg_match('/^admin\./i', $_REQUEST['ajaxfct']))
-  {
-    define('IN_ADMIN', true);
-  }
+  if(preg_match('/^admin\./i', $_REQUEST['ajaxfct'])) define('IN_ADMIN', true);
+  if(!defined('AJAX_CALL')) define('AJAX_CALL', true);
 
   // the common.inc.php file loads all the main.inc.php plugins files
@@ -59,29 +57,29 @@
       global $user;
 
-      if(!isset($_REQUEST['ajaxfct'])) $_REQUEST['ajaxfct']='';
       if(!isset($_REQUEST['errcode'])) $_REQUEST['errcode']='';
+      GPCAjax::checkToken();
 
       // check if asked function is valid
-      if(!($_REQUEST['ajaxfct']=='admin.maps.getList' or
-           $_REQUEST['ajaxfct']=='admin.maps.setMap' or
-           $_REQUEST['ajaxfct']=='admin.maps.getMap' or
-           $_REQUEST['ajaxfct']=='admin.maps.deleteMap' or
-           $_REQUEST['ajaxfct']=='admin.assoc.getList' or
-           $_REQUEST['ajaxfct']=='admin.assoc.setAssoc' or
-           $_REQUEST['ajaxfct']=='admin.assoc.getAssoc' or
-           $_REQUEST['ajaxfct']=='admin.assoc.deleteAssoc' or
-           $_REQUEST['ajaxfct']=='admin.kmlFiles.getList' or
-           $_REQUEST['ajaxfct']=='admin.kmlFiles.setFile' or
-           $_REQUEST['ajaxfct']=='admin.kmlFiles.getFile' or
-           $_REQUEST['ajaxfct']=='admin.kmlFiles.deleteFile' or
-
-           $_REQUEST['ajaxfct']=='public.maps.init' or
-           $_REQUEST['ajaxfct']=='public.maps.getMarkers'
-           )) $_REQUEST['ajaxfct']='';
-
-      if(preg_match('/^admin\./i', $_REQUEST['ajaxfct']) and !is_admin()) $_REQUEST['ajaxfct']='';
-
-
-      if($_REQUEST['ajaxfct']!='')
+      if(!($_REQUEST[GPC_AJAX]=='admin.maps.getList' or
+           $_REQUEST[GPC_AJAX]=='admin.maps.setMap' or
+           $_REQUEST[GPC_AJAX]=='admin.maps.getMap' or
+           $_REQUEST[GPC_AJAX]=='admin.maps.deleteMap' or
+           $_REQUEST[GPC_AJAX]=='admin.assoc.getList' or
+           $_REQUEST[GPC_AJAX]=='admin.assoc.setAssoc' or
+           $_REQUEST[GPC_AJAX]=='admin.assoc.getAssoc' or
+           $_REQUEST[GPC_AJAX]=='admin.assoc.deleteAssoc' or
+           $_REQUEST[GPC_AJAX]=='admin.kmlFiles.getList' or
+           $_REQUEST[GPC_AJAX]=='admin.kmlFiles.setFile' or
+           $_REQUEST[GPC_AJAX]=='admin.kmlFiles.getFile' or
+           $_REQUEST[GPC_AJAX]=='admin.kmlFiles.deleteFile' or
+
+           $_REQUEST[GPC_AJAX]=='public.maps.init' or
+           $_REQUEST[GPC_AJAX]=='public.maps.getMarkers'
+           )) $_REQUEST[GPC_AJAX]='';
+
+      if(preg_match('/^admin\./i', $_REQUEST[GPC_AJAX]) and !is_admin()) $_REQUEST[GPC_AJAX]='';
+
+
+      if($_REQUEST[GPC_AJAX]!='')
       {
         /*
@@ -96,11 +94,11 @@
          *  admin.kmlFiles.getFile
          */
-        if($_REQUEST['ajaxfct']=="admin.maps.getMap" or
-           $_REQUEST['ajaxfct']=="admin.assoc.getAssoc" or
-           $_REQUEST['ajaxfct']=="admin.kmlFiles.getFile")
+        if($_REQUEST[GPC_AJAX]=="admin.maps.getMap" or
+           $_REQUEST[GPC_AJAX]=="admin.assoc.getAssoc" or
+           $_REQUEST[GPC_AJAX]=="admin.kmlFiles.getFile")
         {
           if(!isset($_REQUEST['id']) or
              !is_numeric($_REQUEST['id']) or
-             $_REQUEST['id']=='') $_REQUEST['ajaxfct']='';
+             $_REQUEST['id']=='') $_REQUEST[GPC_AJAX]='';
         }
 
@@ -111,11 +109,11 @@
          *  admin.kmlFiles.deleteFile
          */
-        if($_REQUEST['ajaxfct']=="admin.maps.deleteMap" or
-           $_REQUEST['ajaxfct']=="admin.assoc.deleteAssoc" or
-           $_REQUEST['ajaxfct']=="admin.kmlFiles.deleteFile")
+        if($_REQUEST[GPC_AJAX]=="admin.maps.deleteMap" or
+           $_REQUEST[GPC_AJAX]=="admin.assoc.deleteAssoc" or
+           $_REQUEST[GPC_AJAX]=="admin.kmlFiles.deleteFile")
         {
           if(!isset($_REQUEST['id']) or
              !is_numeric($_REQUEST['id']) or
-             $_REQUEST['id']=='') $_REQUEST['ajaxfct']='';
+             $_REQUEST['id']=='') $_REQUEST[GPC_AJAX]='';
         }
 
@@ -123,10 +121,10 @@
          * check admin.maps.setMap values
          */
-        if($_REQUEST['ajaxfct']=="admin.maps.setMap")
+        if($_REQUEST[GPC_AJAX]=="admin.maps.setMap")
         {
           if(!isset($_REQUEST['id']) or
              !isset($_REQUEST['datas']) or !is_array($_REQUEST['datas']))
           {
-            $_REQUEST['ajaxfct']='';
+            $_REQUEST[GPC_AJAX]='';
           }
           else
@@ -147,5 +145,5 @@
                  ))
             {
-              $_REQUEST['ajaxfct']='';
+              $_REQUEST[GPC_AJAX]='';
             }
             else
@@ -153,8 +151,8 @@
               if(!($_REQUEST['datas']['displayType']=='IC' or
                   $_REQUEST['datas']['displayType']=='IP' or
-                  $_REQUEST['datas']['displayType']=='MP')) $_REQUEST['ajaxfct']='';
+                  $_REQUEST['datas']['displayType']=='MP')) $_REQUEST[GPC_AJAX]='';
 
               if(!($_REQUEST['datas']['sizeMode']=='A' or
-                  $_REQUEST['datas']['sizeMode']=='F')) $_REQUEST['ajaxfct']='';
+                  $_REQUEST['datas']['sizeMode']=='F')) $_REQUEST[GPC_AJAX]='';
 
               if(!is_numeric($_REQUEST['datas']['width']) or
@@ -199,10 +197,10 @@
          * check admin.maps.setAssoc values
          */
-        if($_REQUEST['ajaxfct']=="admin.assoc.setAssoc")
+        if($_REQUEST[GPC_AJAX]=="admin.assoc.setAssoc")
         {
           if(!isset($_REQUEST['id']) or
              !isset($_REQUEST['datas']) or !is_array($_REQUEST['datas']))
           {
-            $_REQUEST['ajaxfct']='';
+            $_REQUEST[GPC_AJAX]='';
           }
           else
@@ -217,12 +215,12 @@
                  isset($_REQUEST['datas']['title']) ))
             {
-              $_REQUEST['ajaxfct']='';
+              $_REQUEST[GPC_AJAX]='';
             }
             else
             {
               if($_REQUEST['datas']['categoryId']=='' or
-                 $_REQUEST['datas']['categoryId']<0) $_REQUEST['ajaxfct']='';
-
-              if($_REQUEST['datas']['mapId']=='') $_REQUEST['ajaxfct']='';
+                 $_REQUEST['datas']['categoryId']<0) $_REQUEST[GPC_AJAX]='';
+
+              if($_REQUEST['datas']['mapId']=='') $_REQUEST[GPC_AJAX]='';
 
               if(!($_REQUEST['datas']['applySubCat']=='y' or
@@ -240,9 +238,9 @@
          * check admin.kmlFiles.setFile values
          */
-        if($_REQUEST['ajaxfct']=="admin.kmlFiles.setFile")
+        if($_REQUEST[GPC_AJAX]=="admin.kmlFiles.setFile")
         {
           if(!isset($_REQUEST['id']) )
           {
-            $_REQUEST['ajaxfct']='';
+            $_REQUEST[GPC_AJAX]='';
           }
           else
@@ -251,5 +249,5 @@
             {
               if(!(isset($_FILES['file']['name']) and
-                   isset($_FILES['file']['tmp_name']))) $_REQUEST['ajaxfct']='';
+                   isset($_FILES['file']['tmp_name']))) $_REQUEST[GPC_AJAX]='';
             }
           }
@@ -261,10 +259,10 @@
          * check public.maps.getMarkers values
          */
-        if($_REQUEST['ajaxfct']=="public.maps.getMarkers")
+        if($_REQUEST[GPC_AJAX]=="public.maps.getMarkers")
         {
           if(!isset($_REQUEST['datas']) or
              !is_array($_REQUEST['datas']))
           {
-            $_REQUEST['ajaxfct']='';
+            $_REQUEST[GPC_AJAX]='';
           }
           else
@@ -281,5 +279,5 @@
                  isset($_REQUEST['datas']['bounds']['west']) ))
             {
-              $_REQUEST['ajaxfct']='';
+              $_REQUEST[GPC_AJAX]='';
             }
             if(!isset($_REQUEST['datas']['loadIndex'])) $_REQUEST['datas']['loadIndex']='';
@@ -290,7 +288,7 @@
          * check public.maps.getMarkerInfos values
          */
-        if($_REQUEST['ajaxfct']=="public.maps.init")
-        {
-          if(!isset($_REQUEST['category'])) $_REQUEST['ajaxfct']='';
+        if($_REQUEST[GPC_AJAX]=="public.maps.init")
+        {
+          if(!isset($_REQUEST['category'])) $_REQUEST[GPC_AJAX]='';
           if(!isset($_REQUEST['mapId'])) $_REQUEST['mapId']=null;
         }
@@ -305,5 +303,5 @@
     {
       $result="<p class='errors'>An error has occured</p>";
-      switch($_REQUEST['ajaxfct'])
+      switch($_REQUEST[GPC_AJAX])
       {
         case 'admin.maps.getList':
@@ -539,5 +537,5 @@
       {
         $sql="DELETE FROM ".$this->tables['category_maps']."
-              WHERE map_id='$id';";
+              WHERE mapId='$id';";
         $result=pwg_query($sql);
         if($result) return('ok');
Index: /extensions/GMaps/gmaps_clear.css
===================================================================
--- /extensions/GMaps/gmaps_clear.css	(revision 16011)
+++ /extensions/GMaps/gmaps_clear.css	(revision 16011)
@@ -0,0 +1,19 @@
+#iListMaps.clear table tr:hover,
+#iListAssoc.clear table tr:hover,
+#iListKml.clear table tr:hover { cursor:pointer; color: #D54E21; background:#dbe8f3; }
+
+
+
+.buttonDelete {
+  background-position:-255px -90px;
+}
+.buttonDelete:hover {
+  background-position:-255px -105px;
+}
+.buttonEdit {
+  background-position:-240px -90px;
+}
+.buttonEdit:hover {
+  background-position:-240px -105px;
+}
+
Index: /extensions/GMaps/gmaps_pip.class.inc.php
===================================================================
--- /extensions/GMaps/gmaps_pip.class.inc.php	(revision 16010)
+++ /extensions/GMaps/gmaps_pip.class.inc.php	(revision 16011)
@@ -52,10 +52,8 @@
       )
   );
-  protected $css2;
 
   public function __construct($prefixeTable, $filelocation)
   {
     parent::__construct($prefixeTable, $filelocation);
-    $this->css2 = new GPCCss(dirname($this->getFileLocation()).'/'.$this->getPluginNameFiles()."2.css");
     $this->loadConfig();
     $this->initEvents();
@@ -86,13 +84,16 @@
   {
     parent::initEvents();
-
     add_event_handler('loc_begin_index', array(&$this, 'displayCategoryPageMap'));
     if(!isset($_GET['slideshow'])) add_event_handler('loc_begin_picture', array(&$this, 'displayPicturePageMap'), EVENT_HANDLER_PRIORITY_NEUTRAL+5);
     add_event_handler('amd_jpegMD_loaded', array(&$this, 'preparePictureMaps'));
-    add_event_handler('loc_end_page_header', array(&$this->css2, 'applyCSS'));
     add_event_handler('render_category_description',  array(&$this, 'categoryMarkup'), EVENT_HANDLER_PRIORITY_NEUTRAL-5, 2);
   }
 
 
+  public function loadCSS()
+  {
+    //parent::loadCSS(); // -- do not call ancestor!
+    GPCCore::addHeaderCSS('gmaps.css2', 'plugins/'.$this->getDirectory().'/'.$this->getPluginNameFiles()."2.css");
+  }
 
   /* -------------------------------------------------------------------------
@@ -213,4 +214,5 @@
             gmaps =
               {
+                token:'".get_pwg_token()."',
                 lang:{
                   boundmap:'".l10n('gmaps_i_boundmap')."',
@@ -306,4 +308,5 @@
 var gmaps =
   {
+    token:'".get_pwg_token()."',
     geolocated:".($nb>0?'true':'false').",
     forceDisplay:".($nb==0?'true':'false').",
@@ -503,4 +506,5 @@
   var gmaps =
     {
+      token:'".get_pwg_token()."',
       geolocated:".($this->picture['geolocated']?'true':'false').",
       forceDisplay:".($this->picture['forceDisplay']?'true':'false').",
Index: /extensions/GMaps/gmaps_roma.css
===================================================================
--- /extensions/GMaps/gmaps_roma.css	(revision 16011)
+++ /extensions/GMaps/gmaps_roma.css	(revision 16011)
@@ -0,0 +1,17 @@
+#iListMaps.roma table tr:hover,
+#iListAssoc.roma table tr:hover,
+#iListKml.roma table tr:hover  { cursor:pointer; background:#303030; }
+
+.buttonDelete {
+  background-position:-255px -15px;
+}
+.buttonDelete:hover {
+  background-position:-255px -0px;
+}
+.buttonEdit {
+  background-position:-240px -15px;
+}
+.buttonEdit:hover {
+  background-position:-240px -0px;
+}
+
Index: /extensions/GMaps/gmaps_root.class.inc.php
===================================================================
--- /extensions/GMaps/gmaps_root.class.inc.php	(revision 16010)
+++ /extensions/GMaps/gmaps_root.class.inc.php	(revision 16011)
@@ -14,5 +14,4 @@
   --------------------------------------------------------------------------- */
   include_once(PHPWG_PLUGINS_PATH.'GrumPluginClasses/classes/CommonPlugin.class.inc.php');
-  include_once(PHPWG_PLUGINS_PATH.'GrumPluginClasses/classes/GPCCss.class.inc.php');
 
   class GMaps_root extends CommonPlugin
@@ -22,5 +21,4 @@
     const ID_MODE_MAP='M';
 
-    protected $css;
     protected $maps=array();
     protected $forceDisplay=0;
@@ -86,36 +84,16 @@
 
       $this->setTablesList(array('maps', 'category_maps', 'cache', 'cache_id', 'kmlfiles'));
-      $this->css = new GPCCss(dirname($this->getFileLocation()).'/'.$this->getPluginNameFiles().".css");
-    }
-
-    public function __destruct()
-    {
-      parent::__destruct();
-    }
-
-    public function initEvents()
-    {
-    }
-
-
-    /*
-      surchage of CommonPlugin->saveConfig function
-    */
-    public function saveConfig()
-    {
-      if(parent::saveConfig())
-      {
-        return(true);
-      }
-      return(false);
-    }
-
-    /*
-      surchage of CommonPlugin->saveConfig function
-    */
-    public function loadConfig()
-    {
-      parent::loadConfig();
-    }
+    }
+
+    public function loadCSS()
+    {
+      global $template;
+
+      parent::loadCSS();
+      GPCCore::addUI('gpcCSS');
+      GPCCore::addHeaderCSS('gmaps.css', 'plugins/'.$this->getDirectory().'/'.$this->getPluginNameFiles().".css");
+      GPCCore::addHeaderCSS('gmaps.cssT', 'plugins/'.$this->getDirectory().'/'.$this->getPluginNameFiles().'_'.$template->get_themeconf('name').".css");
+    }
+
 
     /*
@@ -129,5 +107,4 @@
       );
     }
-
 
     /**
Index: /extensions/GMaps/js/gmapsCategory.js
===================================================================
--- /extensions/GMaps/js/gmapsCategory.js	(revision 16010)
+++ /extensions/GMaps/js/gmapsCategory.js	(revision 16011)
@@ -121,5 +121,5 @@
         url: "plugins/GMaps/gmaps_ajax.php",
         async: true,
-        data: { ajaxfct:"public.maps.getMarkers", datas:datas },
+        data: { ajaxfct:"public.maps.getMarkers", token:gmaps.token, datas:datas },
         success:
           function(msg)
@@ -548,5 +548,5 @@
                   url: "plugins/GMaps/gmaps_ajax.php",
                   async: true,
-                  data: { ajaxfct:"public.maps.init", category:gmaps.categoryId, mapId:'n' },
+                  data: { ajaxfct:"public.maps.init", token:gmaps.token, category:gmaps.categoryId, mapId:'n' },
                   success:
                     function(msg)
Index: /extensions/GMaps/js/gmapsMarkup.js
===================================================================
--- /extensions/GMaps/js/gmapsMarkup.js	(revision 16010)
+++ /extensions/GMaps/js/gmapsMarkup.js	(revision 16011)
@@ -147,5 +147,5 @@
         url: "plugins/GMaps/gmaps_ajax.php",
         async: true,
-        data: { ajaxfct:"public.maps.getMarkers", datas:datas },
+        data: { ajaxfct:"public.maps.getMarkers", token:gmaps.token, datas:datas },
         success:
           function(msg)
@@ -498,5 +498,5 @@
         url: "plugins/GMaps/gmaps_ajax.php",
         async: true,
-        data: { ajaxfct:"public.maps.init", category:gmapsMarkup.categoryId, mapId:'y' },
+        data: { ajaxfct:"public.maps.init", token:gmaps.token, category:gmapsMarkup.categoryId, mapId:'y' },
         success:
           function(msg)
Index: /extensions/GMaps/main.inc.php
===================================================================
--- /extensions/GMaps/main.inc.php	(revision 16010)
+++ /extensions/GMaps/main.inc.php	(revision 16011)
@@ -160,18 +160,21 @@
 global $prefixeTable;
 
-if(defined('IN_ADMIN'))
+if(!defined('AJAX_CALL'))
 {
-  //GMaps admin interface loaded and active only if in admin page
-  include_once("gmaps_aim.class.inc.php");
-  $obj=new GMaps_AIM($prefixeTable, __FILE__);
-  $obj->initEvents();
-}
-else
-{
-  if(CommonPlugin::checkGPCRelease(GMAPS_GPC_NEEDED))
+  if(defined('IN_ADMIN'))
   {
-    //GMaps public interface loaded and active only if in public page
-    include_once("gmaps_pip.class.inc.php");
-    $obj=new GMaps_PIP($prefixeTable, __FILE__);
+    //GMaps admin interface loaded and active only if in admin page
+    include_once("gmaps_aim.class.inc.php");
+    $obj=new GMaps_AIM($prefixeTable, __FILE__);
+    $obj->initEvents();
+  }
+  else
+  {
+    if(CommonPlugin::checkGPCRelease(GMAPS_GPC_NEEDED) and !mobile_theme())
+    {
+      //GMaps public interface loaded and active only if in public page
+      include_once("gmaps_pip.class.inc.php");
+      $obj=new GMaps_PIP($prefixeTable, __FILE__);
+    }
   }
 }
Index: /extensions/GMaps/templates/gmaps_dialog_area_choose.tpl
===================================================================
--- /extensions/GMaps/templates/gmaps_dialog_area_choose.tpl	(revision 16010)
+++ /extensions/GMaps/templates/gmaps_dialog_area_choose.tpl	(revision 16011)
@@ -46,5 +46,5 @@
         url: "plugins/GMaps/gmaps_ajax.php",
         async: true,
-        data: { ajaxfct:"public.maps.init", category:0 },
+        data: { ajaxfct:"public.maps.init", token:'{/literal}{$token}{literal}', category:0 },
         success: function (msg)
           {
@@ -224,5 +224,5 @@
         url: "plugins/GMaps/gmaps_ajax.php",
         async: true,
-        data: { ajaxfct:"public.maps.getMarkers", datas:datas },
+        data: { ajaxfct:"public.maps.getMarkers", token:'{/literal}{$token}{literal}', datas:datas },
         success:
           function(msg)
