Index: applications/editors/josm/plugins/wmsplugin/src/wmsplugin/HTMLGrabber.java
===================================================================
--- applications/editors/josm/plugins/wmsplugin/src/wmsplugin/HTMLGrabber.java	(revision 16308)
+++ applications/editors/josm/plugins/wmsplugin/src/wmsplugin/HTMLGrabber.java	(revision 16308)
@@ -0,0 +1,49 @@
+package wmsplugin;
+
+import java.awt.image.BufferedImage;
+import java.io.IOException;
+import java.net.URL;
+import java.text.MessageFormat;
+import java.util.ArrayList;
+import java.util.StringTokenizer;
+
+import javax.imageio.ImageIO;
+
+import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.data.ProjectionBounds;
+import org.openstreetmap.josm.gui.MapView;
+import org.openstreetmap.josm.io.CacheFiles;
+
+public class HTMLGrabber extends WMSGrabber {
+    HTMLGrabber(ProjectionBounds b, GeorefImage image, MapView mv, WMSLayer layer, CacheFiles cache) {
+        super(b, image, mv, layer, cache);
+        this.baseURL = layer.baseURL.replaceFirst("html:", "");
+    }
+
+    @Override
+    protected BufferedImage grab(URL url) throws IOException {
+        String urlstring = url.toExternalForm();
+
+        BufferedImage cached = cache.getImg(urlstring);
+        if(cached != null) return cached;
+
+        ArrayList<String> cmdParams = new ArrayList<String>();
+        StringTokenizer st = new StringTokenizer(MessageFormat.format(
+        Main.pref.get("wmsplugin.browser", "webkit-image {0}"), urlstring));
+        while( st.hasMoreTokens() )
+            cmdParams.add(st.nextToken());
+
+        ProcessBuilder builder = new ProcessBuilder( cmdParams);
+
+        Process browser;
+        try {
+            browser = builder.start();
+        } catch(IOException ioe) {
+            throw new IOException( "Could not start browser. Please check that the executable path is correct.\n" + ioe.getMessage() );
+        }
+
+        BufferedImage img = ImageIO.read(browser.getInputStream());
+        cache.saveImg(urlstring, img);
+        return img;
+    }
+}
Index: applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSDownloadAction.java
===================================================================
--- applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSDownloadAction.java	(revision 16290)
+++ applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSDownloadAction.java	(revision 16308)
@@ -19,5 +19,5 @@
 
     public void actionPerformed(ActionEvent e) {
-        System.out.println(info.url);
+        //System.out.println(info.url);
 
         WMSLayer wmsLayer = new WMSLayer(info.name, info.url, info.cookies);
Index: applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSGrabber.java
===================================================================
--- applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSGrabber.java	(revision 16290)
+++ applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSGrabber.java	(revision 16308)
@@ -43,5 +43,5 @@
         this.baseURL = layer.baseURL;
         /* URL containing placeholders? */
-        urlWithPatterns = baseURL != null && baseURL.contains("{1}");
+        urlWithPatterns = baseURL != null && baseURL.contains("{") && baseURL.contains("}");
     }
 
@@ -62,5 +62,4 @@
             image.max = b.max;
 
-System.out.println(url + " " + b + " " + image.min + " " + image.max);
             if(image.isVisible(mv)) { //don't download, if the image isn't visible already
                 image.image = grab(url);
@@ -81,6 +80,6 @@
         if(Main.proj instanceof Mercator) // don't use mercator code directly
         {
-            LatLon sw = Main.proj.eastNorth2latlon(new EastNorth(s, w));
-            LatLon ne = Main.proj.eastNorth2latlon(new EastNorth(n, e));
+            LatLon sw = Main.proj.eastNorth2latlon(new EastNorth(w, s));
+            LatLon ne = Main.proj.eastNorth2latlon(new EastNorth(e, n));
             proj = "EPSG:4326";
             s = sw.lat();
@@ -89,14 +88,5 @@
             e = ne.lon();
         }
-/*        else if(!(Main.proj instanceof Epsg4326))
-        {
-            EastNorth sw = Main.proj.latlon2eastNorth(new LatLon(s, w));
-            EastNorth ne = Main.proj.latlon2eastNorth(new LatLon(n, e));
-            s = sw.north();
-            w = sw.east();
-            n = ne.north();
-            e = ne.east();
-        }
-*/
+
         String str = baseURL;
         String bbox = latLonFormat.format(w) + ","
@@ -106,7 +96,12 @@
 
         if (urlWithPatterns) {
-            str = MessageFormat.format(str, proj, bbox, wi, ht);
+            str = str.replaceAll("{proj}", proj)
+            .replaceAll("{bbox}", bbox)
+            .replaceAll("{width}", String.valueOf(wi))
+            .replaceAll("{height}", String.valueOf(ht));
         } else {
-            if(!str.endsWith("?"))
+            if(!str.contains("?"))
+                str += "?";
+            else if(!str.endsWith("?"))
                 str += "&";
             str += "bbox="
Index: applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSPlugin.java
===================================================================
--- applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSPlugin.java	(revision 16290)
+++ applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSPlugin.java	(revision 16308)
@@ -48,11 +48,4 @@
 
     public WMSPlugin() {
-        try
-        {
-            copy("/resources/ymap.html", "ymap.html");
-        }
-        catch(IOException e) {
-            e.printStackTrace();
-        }
         refreshMenu();
         cache.setExpire(cache.EXPIRE_MONTHLY, false);
@@ -190,6 +183,6 @@
 
     public static Grabber getGrabber(ProjectionBounds bounds, GeorefImage img, MapView mv, WMSLayer layer){
-        if(layer.baseURL.startsWith("yahoo://"))
-            return new YAHOOGrabber(bounds, img, mv, layer, cache);
+        if(layer.baseURL.startsWith("html:"))
+            return new HTMLGrabber(bounds, img, mv, layer, cache);
         else
             return new WMSGrabber(bounds, img, mv, layer, cache);
Index: applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSPreferenceEditor.java
===================================================================
--- applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSPreferenceEditor.java	(revision 16290)
+++ applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSPreferenceEditor.java	(revision 16308)
@@ -17,4 +17,5 @@
 import javax.swing.Box;
 import javax.swing.JButton;
+import javax.swing.JComboBox;
 import javax.swing.JLabel;
 import javax.swing.JOptionPane;
@@ -32,4 +33,5 @@
     private Map<String,String> orig;
     private DefaultTableModel model;
+    private JComboBox browser;
     private HashMap<Integer, WMSInfo> oldValues = new HashMap<Integer, WMSInfo>();
 
@@ -69,6 +71,6 @@
                 JPanel p = new JPanel(new GridBagLayout());
                 p.add(new JLabel(tr("Menu Name")), GBC.std().insets(0,0,5,0));
-                JTextField key = new JTextField(10);
-                JTextField value = new JTextField(10);
+                JTextField key = new JTextField(40);
+                JTextField value = new JTextField(40);
                 p.add(key, GBC.eop().insets(5,0,0,0).fill(GBC.HORIZONTAL));
                 p.add(new JLabel(tr("WMS URL")), GBC.std().insets(0,0,5,0));
@@ -113,4 +115,13 @@
         p.add(buttonPanel);
         p.add(Box.createHorizontalGlue(), GBC.eol().fill(GBC.HORIZONTAL));
+        browser = new JComboBox(new String[]{
+        "webkit-image {0}",
+        "gnome-web-photo --mode=photo --format=png {0} /dev/stdout",
+        "gnome-web-photo-fixed {0}",
+        "webkit-image-gtk {0}"});
+        browser.setEditable(true);
+        browser.setSelectedItem(Main.pref.get("wmsplugin.browser", "webkit-image {0}"));
+        p.add(new JLabel(tr("Downloader:")), GBC.eol().fill(GBC.HORIZONTAL));
+        p.add(browser, GBC.eol().fill(GBC.HORIZONTAL));
     }
 
@@ -152,4 +163,5 @@
         if (change) WMSPlugin.refreshMenu();
 
+        Main.pref.put("wmsplugin.browser", browser.getEditor().getItem().toString());
         return false;
     }
Index: applications/editors/josm/plugins/wmsplugin/src/wmsplugin/YAHOOGrabber.java
===================================================================
--- applications/editors/josm/plugins/wmsplugin/src/wmsplugin/YAHOOGrabber.java	(revision 16290)
+++ 	(revision )
@@ -1,55 +1,0 @@
-package wmsplugin;
-
-import java.awt.image.BufferedImage;
-import java.io.IOException;
-import java.net.URL;
-import java.text.MessageFormat;
-import java.util.ArrayList;
-import java.util.StringTokenizer;
-
-import javax.imageio.ImageIO;
-
-import org.openstreetmap.josm.data.ProjectionBounds;
-import org.openstreetmap.josm.gui.MapView;
-import org.openstreetmap.josm.io.CacheFiles;
-
-
-public class YAHOOGrabber extends WMSGrabber {
-    protected String browserCmd;
-
-    YAHOOGrabber(ProjectionBounds b, GeorefImage image, MapView mv, WMSLayer layer, CacheFiles cache) {
-        super(b, image, mv, layer, cache);
-        this.baseURL = "file:///" + WMSPlugin.getPrefsPath() + "ymap.html?";
-        this.browserCmd = layer.baseURL.replaceFirst("yahoo://", "");
-    }
-
-    @Override
-    protected BufferedImage grab(URL url) throws IOException {
-        String urlstring = url.toExternalForm();
-        // work around a problem in URL removing 2 slashes
-        if(!urlstring.startsWith("file:///"))
-            urlstring = urlstring.replaceFirst("file:", "file://");
-
-        BufferedImage cached = cache.getImg(urlstring);
-        if(cached != null) return cached;
-
-        ArrayList<String> cmdParams = new ArrayList<String>();
-        StringTokenizer st = new StringTokenizer(MessageFormat.format(browserCmd, urlstring));
-        while( st.hasMoreTokens() )
-            cmdParams.add(st.nextToken());
-
-        System.out.println("WMS::Browsing YAHOO: " + cmdParams);
-        ProcessBuilder builder = new ProcessBuilder( cmdParams);
-
-        Process browser;
-        try {
-            browser = builder.start();
-        } catch(IOException ioe) {
-            throw new IOException( "Could not start browser. Please check that the executable path is correct.\n" + ioe.getMessage() );
-        }
-
-        BufferedImage img = ImageIO.read(browser.getInputStream());
-        cache.saveImg(urlstring, img);
-        return img;
-    }
-}
