Index: applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CacheControl.java
===================================================================
--- applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CacheControl.java	(revision 25889)
+++ applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CacheControl.java	(revision 26228)
@@ -210,7 +210,7 @@
     private String WMSFileExtension() {
         String ext = String.valueOf((wmsLayer.getLambertZone() + 1));
-        if (Main.proj instanceof LambertCC9Zones)
+        if (Main.getProjection() instanceof LambertCC9Zones)
             ext = cLambertCC9Z + ext;
-        else if (Main.proj instanceof UTM_France_DOM)
+        else if (Main.getProjection() instanceof UTM_France_DOM)
             ext = cUTM20N + ext;
         return ext;
Index: applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CadastreInterface.java
===================================================================
--- applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CadastreInterface.java	(revision 25889)
+++ applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CadastreInterface.java	(revision 26228)
@@ -58,6 +58,6 @@
     final String cInterfaceRasterTA = "afficherCarteTa.do";
     final String cInterfaceRasterFeuille = "afficherCarteFeuille.do";
-    final String cImageLinkStart = "title=\"image\"><a href=\"#\" onClick=\"popup('afficherCarteFeuille.do?f=";
-    final String cTAImageLinkStart = "title=\"image\"><a href=\"#\" onClick=\"popup('afficherCarteTa.do?f=";
+    final String cImageLinkStart = "<a href=\"#\" class=\"raster\" onClick=\"popup('afficherCarteFeuille.do?f=";
+    final String cTAImageLinkStart = "<a href=\"#\" class=\"raster\" onClick=\"popup('afficherCarteTa.do?f=";
     final String cImageNameStart = ">Feuille ";
     final String cTAImageNameStart = "Tableau d'assemblage <strong>";
Index: applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CadastrePlugin.java
===================================================================
--- applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CadastrePlugin.java	(revision 25889)
+++ applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CadastrePlugin.java	(revision 26228)
@@ -122,4 +122,6 @@
  *                 - move the grabber from CadastrPlugin singleton to each wmsLayer instance to allow grabbing
  *                   of multiple municipalities in parallel.
+ * 2.2 01-Jul-2011 - replace deprecated Main.proj by newest Main.getProjection()
+ *                 - fix list of raster images (Feuilles) parsing failing after a Cadastre server change/maintenance 
  */
 public class CadastrePlugin extends Plugin {
@@ -350,7 +352,7 @@
 
     public static boolean isCadastreProjection() {
-        return Main.proj.toString().equals(new Lambert().toString())
-            || Main.proj.toString().equals(new UTM_France_DOM().toString())
-            || Main.proj.toString().equals(new LambertCC9Zones().toString());
+        return Main.getProjection().toString().equals(new Lambert().toString())
+            || Main.getProjection().toString().equals(new UTM_France_DOM().toString())
+            || Main.getProjection().toString().equals(new LambertCC9Zones().toString());
     }
 
Index: applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/DownloadSVGBuilding.java
===================================================================
--- applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/DownloadSVGBuilding.java	(revision 25889)
+++ applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/DownloadSVGBuilding.java	(revision 26228)
@@ -114,5 +114,5 @@
             Way wayToAdd = new Way();
             for (EastNorth eastNorth : path) {
-                Node nodeToAdd = new Node(Main.proj.eastNorth2latlon(eastNorth));
+                Node nodeToAdd = new Node(Main.getProjection().eastNorth2latlon(eastNorth));
                 // check if new node is not already created by another new path
                 Node nearestNewNode = checkNearestNode(nodeToAdd, svgDataSet.getNodes());
Index: applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/DownloadSVGTask.java
===================================================================
--- applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/DownloadSVGTask.java	(revision 25889)
+++ applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/DownloadSVGTask.java	(revision 26228)
@@ -116,5 +116,5 @@
         List<Node> nodeList = new ArrayList<Node>();
         for (EastNorth eastNorth : eastNorths.get(bestPath)) {
-            nodeList.add(new Node(Main.proj.eastNorth2latlon(eastNorth)));
+            nodeList.add(new Node(Main.getProjection().eastNorth2latlon(eastNorth)));
         }
         Way wayToAdd = new Way();
Index: applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/EastNorthBound.java
===================================================================
--- applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/EastNorthBound.java	(revision 25889)
+++ applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/EastNorthBound.java	(revision 26228)
@@ -33,5 +33,5 @@
 
     public Bounds toBounds() {
-        return new Bounds(Main.proj.eastNorth2latlon(min), Main.proj.eastNorth2latlon(max));
+        return new Bounds(Main.getProjection().eastNorth2latlon(min), Main.getProjection().eastNorth2latlon(max));
     }
 
Index: applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/MenuActionGrabPlanImage.java
===================================================================
--- applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/MenuActionGrabPlanImage.java	(revision 25889)
+++ applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/MenuActionGrabPlanImage.java	(revision 26228)
@@ -141,5 +141,5 @@
             return;
         if (ignoreMouseClick) return; // In case we are currently just allowing zooming to read lambert coordinates
-        EastNorth ea = Main.proj.latlon2eastNorth(Main.map.mapView.getLatLon(e.getX(), e.getY()));
+        EastNorth ea = Main.getProjection().latlon2eastNorth(Main.map.mapView.getLatLon(e.getX(), e.getY()));
         System.out.println("clic:"+countMouseClicked+" ,"+ea+", mode:"+mode);
         if (clickOnTheMap) {
Index: applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/MenuActionLoadFromCache.java
===================================================================
--- applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/MenuActionLoadFromCache.java	(revision 25889)
+++ applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/MenuActionLoadFromCache.java	(revision 26228)
@@ -38,8 +38,8 @@
                 String ext = (filename.lastIndexOf(".")==-1)?"":filename.substring(filename.lastIndexOf(".")+1,filename.length());
                 if ((ext.length() == 3 && ext.substring(0, CacheControl.cLambertCC9Z.length()).equals(CacheControl.cLambertCC9Z) &&
-                    !(Main.proj instanceof LambertCC9Zones))
+                    !(Main.getProjection() instanceof LambertCC9Zones))
                     || (ext.length() == 4 && ext.substring(0, CacheControl.cUTM20N.length()).equals(CacheControl.cUTM20N) &&
-                            !(Main.proj instanceof UTM_France_DOM))
-                    || (ext.length() == 1) && !(Main.proj instanceof Lambert)) {
+                            !(Main.getProjection() instanceof UTM_France_DOM))
+                    || (ext.length() == 1) && !(Main.getProjection() instanceof Lambert)) {
                         JOptionPane.showMessageDialog(Main.parent, tr("{0} not allowed with the current projection", filename), tr("Error"), JOptionPane.ERROR_MESSAGE);
                         continue;
@@ -89,9 +89,9 @@
         int layoutZone = new MenuActionLoadFromCache().getCurrentProjZone();
         if (layoutZone != -1) {
-            if (Main.proj instanceof Lambert)
+            if (Main.getProjection() instanceof Lambert)
                 fc.addChoosableFileFilter(CacheFileLambert4ZoneFilter.filters[layoutZone]);
-            else if (Main.proj instanceof LambertCC9Zones)
+            else if (Main.getProjection() instanceof LambertCC9Zones)
                 fc.addChoosableFileFilter(CacheFileLambert9ZoneFilter.filters[layoutZone]);
-            else if (Main.proj instanceof UTM_France_DOM)
+            else if (Main.getProjection() instanceof UTM_France_DOM)
                 fc.addChoosableFileFilter(CacheFileUTM20NFilter.filters[layoutZone]);
         }
@@ -107,10 +107,10 @@
     private int getCurrentProjZone() {
         int zone = -1;
-        if (Main.proj instanceof LambertCC9Zones)
-            zone = ((LambertCC9Zones)Main.proj).getLayoutZone();
-        else if (Main.proj instanceof Lambert)
-            zone = ((Lambert)Main.proj).getLayoutZone();
-        else if (Main.proj instanceof UTM_France_DOM)
-            zone = ((UTM_France_DOM)Main.proj).getCurrentGeodesic();
+        if (Main.getProjection() instanceof LambertCC9Zones)
+            zone = ((LambertCC9Zones)Main.getProjection()).getLayoutZone();
+        else if (Main.getProjection() instanceof Lambert)
+            zone = ((Lambert)Main.getProjection()).getLayoutZone();
+        else if (Main.getProjection() instanceof UTM_France_DOM)
+            zone = ((UTM_France_DOM)Main.getProjection()).getCurrentGeodesic();
         return zone;
     }
Index: applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/MenuActionNewLocation.java
===================================================================
--- applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/MenuActionNewLocation.java	(revision 25889)
+++ applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/MenuActionNewLocation.java	(revision 26228)
@@ -116,10 +116,10 @@
             // add the layer if it doesn't exist
             int zone = -1;
-            if (Main.proj instanceof LambertCC9Zones)
-                zone = ((LambertCC9Zones)Main.proj).getLayoutZone();
-            else if (Main.proj instanceof Lambert)
-                zone = ((Lambert)Main.proj).getLayoutZone();
-            else if (Main.proj instanceof UTM_France_DOM)
-                zone = ((UTM_France_DOM)Main.proj).getCurrentGeodesic();
+            if (Main.getProjection() instanceof LambertCC9Zones)
+                zone = ((LambertCC9Zones)Main.getProjection()).getLayoutZone();
+            else if (Main.getProjection() instanceof Lambert)
+                zone = ((Lambert)Main.getProjection()).getLayoutZone();
+            else if (Main.getProjection() instanceof UTM_France_DOM)
+                zone = ((UTM_France_DOM)Main.getProjection()).getCurrentGeodesic();
             wmsLayer = new WMSLayer(location, codeCommune, zone);
             wmsLayer.setDepartement(codeDepartement);
Index: applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/WMSLayer.java
===================================================================
--- applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/WMSLayer.java	(revision 25889)
+++ applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/WMSLayer.java	(revision 26228)
@@ -138,5 +138,5 @@
         } else {
             if (isRaster) {
-                b = new Bounds(Main.proj.eastNorth2latlon(rasterMin), Main.proj.eastNorth2latlon(rasterMax));
+                b = new Bounds(Main.getProjection().eastNorth2latlon(rasterMin), Main.getProjection().eastNorth2latlon(rasterMax));
                 divideBbox(b, Integer.parseInt(Main.pref.get("cadastrewms.rasterDivider",
                         CadastrePreferenceSetting.DEFAULT_RASTER_DIVIDER)));
@@ -158,6 +158,6 @@
      */
     private void divideBbox(Bounds b, int factor) {
-        EastNorth lambertMin = Main.proj.latlon2eastNorth(b.getMin());
-        EastNorth lambertMax = Main.proj.latlon2eastNorth(b.getMax());
+        EastNorth lambertMin = Main.getProjection().latlon2eastNorth(b.getMin());
+        EastNorth lambertMax = Main.getProjection().latlon2eastNorth(b.getMax());
         double minEast = lambertMin.east();
         double minNorth = lambertMin.north();
@@ -322,6 +322,6 @@
         GeorefImage georefImage =
             new GeorefImage(null,
-            Main.proj.latlon2eastNorth(bounds.getMin()),
-            Main.proj.latlon2eastNorth(bounds.getMax()));
+            Main.getProjection().latlon2eastNorth(bounds.getMin()),
+            Main.getProjection().latlon2eastNorth(bounds.getMax()));
         for (GeorefImage img : images) {
             if (img.overlap(georefImage))
@@ -399,7 +399,7 @@
      */
     public void setRasterBounds(Bounds bounds) {
-        EastNorth rasterCenter = Main.proj.latlon2eastNorth(bounds.getCenter());
-        EastNorth eaMin = Main.proj.latlon2eastNorth(bounds.getMin());
-        EastNorth eaMax = Main.proj.latlon2eastNorth(bounds.getMax());
+        EastNorth rasterCenter = Main.getProjection().latlon2eastNorth(bounds.getCenter());
+        EastNorth eaMin = Main.getProjection().latlon2eastNorth(bounds.getMin());
+        EastNorth eaMax = Main.getProjection().latlon2eastNorth(bounds.getMax());
         double rasterSizeX = communeBBox.max.getX() - communeBBox.min.getX();
         double rasterSizeY = communeBBox.max.getY() - communeBBox.min.getY();
