Index: applications/editors/josm/plugins/addrinterpolation/src/org/openstreetmap/josm/plugins/AddrInterpolation/AddrInterpolationAction.java
===================================================================
--- applications/editors/josm/plugins/addrinterpolation/src/org/openstreetmap/josm/plugins/AddrInterpolation/AddrInterpolationAction.java	(revision 17746)
+++ applications/editors/josm/plugins/addrinterpolation/src/org/openstreetmap/josm/plugins/AddrInterpolation/AddrInterpolationAction.java	(revision 17762)
@@ -32,6 +32,5 @@
 
 	public void actionPerformed(ActionEvent e) {
-		AddrInterpolationDialog addrDialog = new AddrInterpolationDialog(tr("Define Address Interpolation"), "AddrInterpolation",
-				tr("Define Address Interpolation"), null, 100);
+		AddrInterpolationDialog addrDialog = new AddrInterpolationDialog(tr("Define Address Interpolation"));
 
 
Index: applications/editors/josm/plugins/addrinterpolation/src/org/openstreetmap/josm/plugins/AddrInterpolation/AddrInterpolationDialog.java
===================================================================
--- applications/editors/josm/plugins/addrinterpolation/src/org/openstreetmap/josm/plugins/AddrInterpolation/AddrInterpolationDialog.java	(revision 17746)
+++ applications/editors/josm/plugins/addrinterpolation/src/org/openstreetmap/josm/plugins/AddrInterpolation/AddrInterpolationDialog.java	(revision 17762)
@@ -17,4 +17,6 @@
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
+import java.awt.event.FocusAdapter;
+import java.awt.event.FocusEvent;
 import java.awt.event.KeyAdapter;
 import java.awt.event.KeyEvent;
@@ -28,4 +30,5 @@
 import javax.swing.JButton;
 import javax.swing.JComboBox;
+import javax.swing.JDialog;
 import javax.swing.JLabel;
 import javax.swing.JOptionPane;
@@ -43,7 +46,5 @@
 import org.openstreetmap.josm.data.osm.RelationMember;
 import org.openstreetmap.josm.data.osm.Way;
-import org.openstreetmap.josm.gui.dialogs.ToggleDialog;
 import org.openstreetmap.josm.tools.ImageProvider;
-import org.openstreetmap.josm.tools.Shortcut;
 import org.openstreetmap.josm.tools.UrlLabel;
 
@@ -56,5 +57,5 @@
 
 
-public class AddrInterpolationDialog extends ToggleDialog implements ActionListener  {
+public class AddrInterpolationDialog extends JDialog implements ActionListener  {
 
 	private Way selectedStreet = null;
@@ -82,4 +83,6 @@
 
 	private boolean relationChanged = false; // Whether to re-trigger data changed for relation
+	// Track whether interpolation method is known so that auto detect doesn't override a previous choice.
+	private boolean interpolationMethodSet = false;
 
 
@@ -90,7 +93,5 @@
 
 
-	public AddrInterpolationDialog(String name, String iconName,
-			String tooltip, Shortcut shortcut, int preferredHeight) {
-		super(name, iconName, tooltip, shortcut, preferredHeight);
+	public AddrInterpolationDialog(String name) {
 
 		if (!FindAndSaveSelections()) {
@@ -120,5 +121,5 @@
 			{
 				if (addrInterpolationWay != null) {
-					addrInterpolationList.requestFocus();
+					startTextField.requestFocus();
 				}
 				else {
@@ -197,6 +198,6 @@
 
 
-		JLabel[] textLabels = {numberingLabel, startLabel, endLabel};
-		Component[] editFields = {addrInterpolationList, startTextField, endTextField};
+		JLabel[] textLabels = {startLabel, endLabel, numberingLabel};
+		Component[] editFields = {startTextField, endTextField, addrInterpolationList};
 		AddEditControlRows(textLabels, editFields,	editControlsPane);
 
@@ -234,4 +235,18 @@
 		endTextField.addKeyListener(enterProcessor);
 		cityTextField.addKeyListener(enterProcessor);
+		addrInterpolationList.addKeyListener(enterProcessor);
+
+
+		// Watch when Interpolation Method combo box is selected so that
+		// it can auto-detect method based on entered numbers.
+		addrInterpolationList.addFocusListener(new FocusAdapter() {
+			@Override
+			public void focusGained(FocusEvent fe){
+				if (!interpolationMethodSet) {
+					AutoDetectInterpolationMethod();
+					interpolationMethodSet = true;  // Don't auto detect over a previous choice
+				}
+			}
+		});
 
 
@@ -270,4 +285,76 @@
 
 		return editControlsPane;
+	}
+
+
+
+	// Call after both starting and ending housenumbers have been entered - usually when
+	// combo box gets focus.
+	private void AutoDetectInterpolationMethod() {
+
+		String startValueString = ReadTextField(startTextField);
+		String endValueString = ReadTextField(endTextField);
+		if (startValueString.equals("") || endValueString.equals("")) {
+			// Not all values entered yet
+			return;
+		}
+
+		String selectedMethod = GetInterpolationMethod();  // Currently selected method
+
+		// String[] addrInterpolationTags = { "odd", "even", "all", "alphabetic" };  // Tag values for map
+
+		if (isLong(startValueString) && isLong(endValueString)) {
+			// Have 2 numeric values
+			long startValue = Long.parseLong( startValueString );
+			long endValue = Long.parseLong( endValueString );
+
+			if (isEven(startValue)) {
+				if (isEven(endValue)) {
+					SelectInterpolationMethod("even");
+				}
+				else {
+					SelectInterpolationMethod("all");
+				}
+			} else {
+				if (!isEven(endValue)) {
+					SelectInterpolationMethod("odd");
+				}
+				else {
+					SelectInterpolationMethod("all");
+				}
+			}
+
+
+		} else {
+			// Test for possible alpha
+			char startingChar = startValueString.charAt(startValueString.length()-1);
+			char endingChar = endValueString.charAt(endValueString.length()-1);
+
+			if ( (!IsNumeric("" + startingChar)) &&  (!IsNumeric("" + endingChar)) ) {
+				// Both end with alpha
+				SelectInterpolationMethod("alphabetic");
+			}
+
+
+
+		}
+
+
+	}
+
+
+
+	// Set Interpolation Method combo box to method specified by 'currentMethod' (an OSM key)
+	private void SelectInterpolationMethod(String currentMethod) {
+		int currentIndex = 0;
+		// Must scan OSM key values because combo box is already loaded with translated strings
+		for (int i=0; i<addrInterpolationTags.length; i++) {
+			if (addrInterpolationTags[i].equals(currentMethod)) {
+				currentIndex = i;
+				break;
+			}
+		}
+		addrInterpolationList.setSelectedIndex(currentIndex);
+
 	}
 
@@ -348,13 +435,6 @@
 			if (currentMethod != null) {
 
-				int currentIndex = 0;
-				// Must scan key values because combo box is already loaded with translated strings
-				for (int i=0; i<addrInterpolationTags.length; i++) {
-					if (addrInterpolationTags[i].equals(currentMethod)) {
-						currentIndex = i;
-						break;
-					}
-				}
-				addrInterpolationList.setSelectedIndex(currentIndex);
+				SelectInterpolationMethod(currentMethod);
+				interpolationMethodSet = true;  // Don't auto detect over a previous choice
 			}
 
