Index: applications/editors/josm/plugins/toms/src/toms/dialogs/SmpDialogAction.java
===================================================================
--- applications/editors/josm/plugins/toms/src/toms/dialogs/SmpDialogAction.java	(revision 22721)
+++ applications/editors/josm/plugins/toms/src/toms/dialogs/SmpDialogAction.java	(revision 22722)
@@ -78,5 +78,4 @@
 		public void selectionChanged(Collection<? extends OsmPrimitive> newSelection) {
 			Node node;
-			Map<String, String> keys = null;
 			Selection = newSelection;
 
@@ -89,10 +88,5 @@
 						if (node.compareTo(SelNode) != 0) {
 							SelNode = node;
-
-							keys = node.getKeys();
-							if (keys.containsKey("seamark")
-									|| keys.containsKey("seamark:type")) {
-								parseSeaMark();
-							}
+							parseSeaMark();
 						}
 				}
@@ -318,508 +312,94 @@
 
 		// Soweit das Vorspiel. Ab hier beginnt das Parsen
-		String str = null;
-		String name;
+		String type = "";
+		String str = "";
 
 		keys = node.getKeys();
-		name = "";
 
 		// vorsorglich den Namen holen und verwenden, wenn es ein
 		// Seezeichen ist. Name kann durch die weiteren Tags ueber-
 		// schrieben werden
-		if (keys.containsKey("name"))
-			name = keys.get("name");
-
-		if (keys.containsKey("seamark:name")) {
-			name = keys.get("seamark:name");
-		}
-
-		if (keys.containsKey("seamark") || keys.containsKey("seamark:type")) {
-
-			if (keys.containsKey("seamark:buoy_lateral:category")
-					|| keys.containsKey("seamark:beacon_lateral:category")) {
-
-				buoy = null; // Prototyp der Lateraltonne
-				String cat; // Kathegorie
-
-				if ((keys.containsKey("seamark:buoy_lateral:colour") == false)
-						&& (keys.containsKey("seamark:beacon_lateral:colour") == false)) {
-					buoy = new BuoyUkn(this, "Parse-Error: Buoy without colour");
-					buoy.setNode(node);
-					return;
-				}
-
-				if (name.equals("")) {
-					if (keys.containsKey("seamark:buoy_lateral:name"))
-						name = keys.get("seamark:buoy_lateral:name");
-					if (keys.containsKey("seamark:beacon_lateral:name"))
-						name = keys.get("seamark:beacon_lateral:name");
-				}
-
-				if (keys.containsKey("seamark:buoy_lateral:category") == true) {
-					str = keys.get("seamark:buoy_lateral:colour");
-					cat = keys.get("seamark:buoy_lateral:category");
-				} else {
-					str = keys.get("seamark:beacon_lateral:colour");
-					cat = keys.get("seamark:beacon_lateral:category");
-				}
-
-				if (cat.equals("port")) {
-
-					buoy = new BuoyLat(this, SeaMark.PORT_HAND);
-					if (str.compareTo("red") == 0) {
-						buoy.setRegion(SeaMark.IALA_A);
-						buoy.setColour(SeaMark.RED);
+
+		if (keys.containsKey("seamark:type")) {
+			type = keys.get("seamark:type");
+
+			if (type.equals("buoy_lateral") || type.equals("beacon_lateral")
+					|| keys.containsKey("seamark:buoy_lateral")
+					|| keys.containsKey("seamark:beacon_lateral")) {
+				buoy = new BuoyLat(this, node);
+				return;
+
+			} else if (type.equals("buoy_cardinal") || type.equals("beacon_cardinal")
+					|| keys.containsKey("seamark:buoy_cardinal")
+					|| keys.containsKey("seamark:beacon_cardinal")) {
+				buoy = new BuoyCard(this, node);
+				return;
+
+			} else if (type.equals("buoy_safe_water")
+					|| type.equals("beacon_safe_water")
+					|| keys.containsKey("seamark:buoy_safe_water")
+					|| keys.containsKey("seamark:beacon_safe_water")) {
+				buoy = new BuoySaw(this, node);
+				return;
+
+			} else if (type.equals("buoy_special_purpose")
+					|| type.equals("beacon_special_purpose")
+					|| keys.containsKey("seamark:buoy_special_purpose")
+					|| keys.containsKey("seamark:beacon_special_purpose")) {
+				buoy = new BuoySpec(this, node);
+				return;
+
+			} else if (type.equals("buoy_isolated_danger")
+					|| type.equals("beacon_isolated_danger")
+					|| (keys.containsKey("seamark:buoy_isolated_danger"))
+					|| (keys.containsKey("seamark:beacon_isolated_danger"))) {
+				buoy = new BuoyIsol(this, node);
+				return;
+
+			} else if (type.equals("light_float")) {
+				if (keys.containsKey("seamark:light_float:colour")) {
+					str = keys.get("seamark:light_float:colour");
+					if (str.equals("red") || str.equals("green")
+							|| str.equals("red;green;red") || str.equals("green;red;green")) {
+						buoy = new BuoyLat(this, node);
+						return;
+					} else if (str.equals("black;yellow")
+							|| str.equals("black;yellow;black") || str.equals("yellow;black")
+							|| str.equals("yellow;black;yellow")) {
+						buoy = new BuoyCard(this, node);
+						return;
+					} else if (str.equals("black;red;black")) {
+						buoy = new BuoyIsol(this, node);
+						return;
+					} else if (str.equals("red;white")) {
+						buoy = new BuoySaw(this, node);
+						return;
+					} else if (str.equals("yellow")) {
+						buoy = new BuoySaw(this, node);
+						return;
 					} else {
-						buoy.setRegion(SeaMark.IALA_B);
-						buoy.setColour(SeaMark.GREEN);
-					}
-					buoy.setName(name);
-				}
-
-				if (cat.compareTo("starboard") == 0) {
-
-					buoy = new BuoyLat(this, SeaMark.STARBOARD_HAND);
-					if (str.compareTo("green") == 0) {
-						buoy.setRegion(SeaMark.IALA_A);
-						buoy.setColour(SeaMark.GREEN);
-					} else {
-						buoy.setRegion(SeaMark.IALA_B);
-						buoy.setColour(SeaMark.RED);
-					}
-					buoy.setName(name);
-				}
-
-				if (cat.compareTo("preferred_channel_port") == 0) {
-
-					buoy = new BuoyLat(this, SeaMark.PREF_PORT_HAND);
-					if (str.compareTo("red;green;red") == 0) {
-						buoy.setRegion(SeaMark.IALA_A);
-						buoy.setColour(SeaMark.RED_GREEN_RED);
-					} else {
-						buoy.setRegion(SeaMark.IALA_B);
-						buoy.setColour(SeaMark.GREEN_RED_GREEN);
-					}
-
-					buoy.setName(name);
-				}
-
-				if (cat.compareTo("preferred_channel_starboard") == 0) {
-
-					buoy = new BuoyLat(this, SeaMark.PREF_STARBOARD_HAND);
-					if (str.compareTo("green;red;green") == 0) {
-						buoy.setRegion(SeaMark.IALA_A);
-						buoy.setColour(SeaMark.GREEN_RED_GREEN);
-					} else {
-						buoy.setRegion(SeaMark.IALA_B);
-						buoy.setColour(SeaMark.RED_GREEN_RED);
-					}
-
-					buoy.setName(name);
-				}
-
-				// b != null true, wenn eine gültige Lateraltonne gefunden wurde
-				if (buoy != null) {
-					if (buoy.parseTopMark(node) == false) {
-						str = buoy.getErrMsg();
-						if (str == null)
-							buoy.setValid(false);
-					}
-
-					if (buoy.parseLight(node) == false) {
-						str = buoy.getErrMsg();
-						if (str == null)
-							buoy.setValid(false);
-					}
-
-					if (buoy.parseShape(node) == false) {
-						str = buoy.getErrMsg();
-						if (str == null)
-							buoy = new BuoyUkn(this, str);
-						return;
-					}
-
-					buoy.setNode(node);
-					buoy.setValid(true);
-					cbM01StyleOfMark.setSelectedIndex(buoy.getStyleIndex());
-					buoy.paintSign();
-
-					return;
-
-				} else { // Ende if(b != null)
-					buoy = new BuoyUkn(this, "Parse-Error: Seamark not set");
-					buoy.setNode(node);
-					return;
-				} // Ende else if(b != null)
-			} else // Ende if(keys.containsKey("seamark:buoy_lateral:category") ==
-							// true)
-			// Test auf Kardinal-
-			if ((keys.containsKey("seamark:buoy_cardinal:category") == true)
-					|| (keys.containsKey("seamark:beacon_cardinal:category") == true)) {
-
-				buoy = null; // Prototyp der Kardinaltonne
-				String cat; // Kathegorie
-
-				if ((keys.containsKey("seamark:buoy_cardinal:colour") == false)
-						&& (keys.containsKey("seamark:beacon_cardinal:colour") == false)) {
-					buoy = new BuoyUkn(this, "Parse-Error: No colour set");
-					buoy.setNode(node);
-					return;
-				}
-
-				if (name.compareTo("") == 0) {
-					if (keys.containsKey("seamark:buoy_cardinal:name"))
-						name = keys.get("seamark:buoy_cardinal:name");
-					if (keys.containsKey("seamark:beacon_cardinal:name"))
-						name = keys.get("seamark:beacon_cardinal:name");
-				}
-
-				if (keys.containsKey("seamark:buoy_cardinal:category") == true) {
-					str = keys.get("seamark:buoy_cardinal:colour");
-					cat = keys.get("seamark:buoy_cardinal:category");
-				} else {
-					str = keys.get("seamark:beacon_cardinal:colour");
-					cat = keys.get("seamark:beacon_cardinal:category");
-				}
-
-				// Test auf Kardinaltonne Nord
-				if (str.compareTo("black;yellow") == 0) {
-
-					buoy = new BuoyCard(this, SeaMark.CARD_NORTH);
-
-					if (cat.compareTo("north") != 0)
-						buoy.setErrMsg("Parse-Error: falsche category");
-
-					buoy.setName(name);
-				} // Ende if(str.compareTo("black;yellow")== 0)
-
-				// Test auf Kardinaltonne Ost
-				if (str.compareTo("black;yellow;black") == 0) {
-
-					buoy = new BuoyCard(this, SeaMark.CARD_EAST);
-
-					if (cat.compareTo("east") != 0)
-						buoy.setErrMsg("Parse-Error: falsche category");
-
-					buoy.setName(name);
-				} // Ende if(str.compareTo("black;yellow;black")== 0)
-
-				// Test auf Kardinaltonne Sued
-				if (str.compareTo("yellow;black") == 0) {
-
-					buoy = new BuoyCard(this, SeaMark.CARD_SOUTH);
-
-					if (cat.compareTo("south") != 0)
-						buoy.setErrMsg("Parse-Error: falsche category");
-
-					buoy.setName(name);
-				} // Ende if(str.compareTo("yellow;black")== 0)
-
-				// Test auf Kardinaltonne West
-				if (str.compareTo("yellow;black;yellow") == 0) {
-
-					buoy = new BuoyCard(this, SeaMark.CARD_WEST);
-
-					if (cat.compareTo("west") != 0)
-						buoy.setErrMsg("Parse-Error: falsche category");
-
-					buoy.setName(name);
-				} // Ende if(str.compareTo("yellow;black;black")== 0)
-
-				// b != null true, wenn eine gültige Kardinaltonne gefunden wurde
-				if (buoy != null) {
-
-					if (buoy.parseLight(node) == false) {
-						str = buoy.getErrMsg();
-						if (str == null)
-							buoy.setValid(false);
-					}
-
-					if (buoy.parseShape(node) == false) {
-						str = buoy.getErrMsg();
-						if (str == null)
-							buoy = new BuoyUkn(this, str);
-						return;
-					}
-
-					buoy.setNode(node);
-					buoy.setValid(true);
-					cbM01StyleOfMark.setSelectedIndex(buoy.getStyleIndex());
-					buoy.paintSign();
-
-					return;
-
-				} else { // Ende if(b != null)
-					buoy = new BuoyUkn(this, "Parse-Error: Seamark not set");
-					buoy.setNode(node);
-					return;
-				} // Ende else if(b != null)
-
+						buoy = new BuoyUkn(this, "Parse-Error: Invalid colour");
+						buoy.setNode(node);
+						return;
+					}
+				} else if (keys.containsKey("seamark:light_float:topmark")) {
+					if (keys.containsKey("seamark:light_float:topmark:shape")) {
+						str = keys.get("seamark:light_float:topmark:shape");
+						if (str.equals("cylinder") || str.equals("cone, point up")) {
+							buoy = new BuoyLat(this, node);
+							return;
+						}
+					} else if (keys.containsKey("seamark:light_float:topmark:colour")) {
+						str = keys.get("seamark:light_float:topmark:colour");
+						if (str.equals("red") || str.equals("green")) {
+							buoy = new BuoyLat(this, node);
+							return;
+						}
+					}
+				}
 			}
-
-			// Test buoy_safewater
-			if (keys.containsKey("seamark:buoy_safe_water:shape") == true) {
-
-				if (keys.containsKey("seamark:buoy_safe_water:colour") == false) {
-					buoy = new BuoyUkn(this, "Parse-Error: No colour set");
-					buoy.setNode(node);
-					return;
-				}
-
-				str = keys.get("seamark:buoy_safe_water:colour");
-				if (str.compareTo("red;white") != 0) {
-					buoy = new BuoyUkn(this, "Parse-Error: Invalid colour");
-					buoy.setNode(node);
-					return;
-				}
-
-				buoy = new BuoySaw(this, SeaMark.SAFE_WATER);
-				buoy.setName(name);
-				buoy.setColour(SeaMark.RED_WHITE);
-
-				if (buoy.parseTopMark(node) == false) {
-					str = buoy.getErrMsg();
-					if (str == null)
-						buoy.setValid(false);
-				}
-
-				if (buoy.parseLight(node) == false) {
-					str = buoy.getErrMsg();
-					if (str == null)
-						buoy.setValid(false);
-				}
-
-				if (buoy.parseShape(node) == false) {
-					str = buoy.getErrMsg();
-					if (str == null)
-						buoy = new BuoyUkn(this, str);
-					buoy.setNode(node);
-					return;
-				}
-
-				buoy.setValid(true);
-				buoy.setNode(node);
-				cbM01StyleOfMark.setSelectedIndex(buoy.getStyleIndex());
-				buoy.paintSign();
-
-				return;
-
-			}
-
-			// Test buoy_special_purpose
-			if (keys.containsKey("seamark:buoy_special_purpose:shape") == true) {
-
-				if (keys.containsKey("seamark:buoy_special_purpose:colour") == false) {
-					buoy = new BuoyUkn(this, "Parse-Error: No colour set");
-					buoy.setNode(node);
-					return;
-				}
-
-				str = keys.get("seamark:buoy_special_purpose:colour");
-				if (str.compareTo("yellow") != 0) {
-					buoy = new BuoyUkn(this, "Parse-Error: Invalid colour");
-					buoy.setNode(node);
-					return;
-				}
-
-				buoy = new BuoySpec(this, SeaMark.SPECIAL_PURPOSE);
-				buoy.setName(name);
-				buoy.setColour(SeaMark.YELLOW);
-
-				if (buoy.parseTopMark(node) == false) {
-					str = buoy.getErrMsg();
-					if (str == null)
-						buoy.setValid(false);
-				}
-
-				if (buoy.parseLight(node) == false) {
-					str = buoy.getErrMsg();
-					if (str == null)
-						buoy.setValid(false);
-				}
-
-				if (buoy.parseShape(node) == false) {
-					str = buoy.getErrMsg();
-					if (str == null)
-						buoy = new BuoyUkn(this, str);
-					buoy.setNode(node);
-					return;
-				}
-
-				buoy.setValid(true);
-				buoy.setNode(node);
-				cbM01StyleOfMark.setSelectedIndex(buoy.getStyleIndex());
-				buoy.paintSign();
-
-				return;
-
-			}
-
-			// Test buoy_isolated_danger
-			if ((keys.containsKey("seamark:buoy_isolated_danger:colour") == true)
-					|| (keys.containsKey("seamark:beacon_isolated_danger:colour") == true)) {
-
-				if ((keys.containsKey("seamark:buoy_isolated_danger:colour") == true)
-						&& (keys.containsKey("seamark:buoy_isolated_danger:shape") == false)) {
-					buoy = new BuoyUkn(this, "Parse-Error: No shape set");
-					buoy.setNode(node);
-					return;
-				}
-
-				if (keys.containsKey("seamark:buoy_isolated_danger:colour") == true)
-					str = keys.get("seamark:buoy_isolated_danger:colour");
-				else
-					str = keys.get("seamark:beacon_isolated_danger:colour");
-				if (str.compareTo("black;red;black") != 0) {
-					buoy = new BuoyUkn(this, "Parse-Error: Invalid colour");
-					buoy.setNode(node);
-					return;
-				}
-
-				buoy = new BuoyIsol(this, SeaMark.ISOLATED_DANGER);
-				buoy.setName(name);
-				buoy.setColour(SeaMark.BLACK_RED_BLACK);
-
-				if (buoy.parseTopMark(node) == false) {
-					str = buoy.getErrMsg();
-					if (str == null)
-						buoy.setValid(false);
-				}
-
-				if (buoy.parseLight(node) == false) {
-					str = buoy.getErrMsg();
-					if (str == null)
-						buoy.setValid(false);
-				}
-
-				if (buoy.parseShape(node) == false) {
-					str = buoy.getErrMsg();
-					if (str == null)
-						buoy = new BuoyUkn(this, str);
-					buoy.setNode(node);
-					return;
-				}
-
-				buoy.setValid(true);
-				buoy.setNode(node);
-				cbM01StyleOfMark.setSelectedIndex(buoy.getStyleIndex());
-				buoy.paintSign();
-
-				return;
-
-			}
-
-			// Test light_float
-
-			if ((keys.containsKey("seamark:type") == true)
-					&& (keys.get("seamark:type").equals("light_float"))) {
-
-				if (keys.containsKey("seamark:light_float:colour") == false) {
-					buoy = new BuoyUkn(this, "Parse-Error: No colour set");
-					buoy.setNode(node);
-					return;
-				}
-
-				str = keys.get("seamark:light_float:colour");
-				if (str.equals("red") || str.equals("green")
-						|| str.equals("red;green;red") || str.equals("green;red;green")) {
-					boolean region = Main.pref.get("tomsplugin.IALA").equals("B");
-					if (str.equals("red")) {
-						if ((keys.containsKey("seamark:topmark:shape") && keys.get(
-								"seamark:topmark:shape").equals("cylinder"))
-								|| (region == SeaMark.IALA_A)) {
-							buoy = new BuoyLat(this, SeaMark.PORT_HAND);
-						} else {
-							buoy = new BuoyLat(this, SeaMark.STARBOARD_HAND);
-						}
-						buoy.setColour(SeaMark.RED);
-					} else if (str.equals("green")) {
-						if ((keys.containsKey("seamark:topmark:shape") && keys.get(
-								"seamark:topmark:shape").equals("cone, point up"))
-								|| (region == SeaMark.IALA_A)) {
-							buoy = new BuoyLat(this, SeaMark.STARBOARD_HAND);
-						} else {
-							buoy = new BuoyLat(this, SeaMark.PORT_HAND);
-						}
-						buoy.setColour(SeaMark.GREEN);
-					} else if (str.equals("red;green;red")) {
-						if ((keys.containsKey("seamark:topmark:shape") && keys.get(
-								"seamark:topmark:shape").equals("cylinder"))
-								|| (region == SeaMark.IALA_A)) {
-							buoy = new BuoyLat(this, SeaMark.PREF_PORT_HAND);
-						} else {
-							buoy = new BuoyLat(this, SeaMark.PREF_STARBOARD_HAND);
-						}
-						buoy.setColour(SeaMark.RED_GREEN_RED);
-					} else if (str.equals("green;red;green")) {
-						if ((keys.containsKey("seamark:topmark:shape") && keys.get(
-								"seamark:topmark:shape").equals("cone, point up"))
-								|| (region == SeaMark.IALA_A)) {
-							buoy = new BuoyLat(this, SeaMark.PREF_STARBOARD_HAND);
-						} else {
-							buoy = new BuoyLat(this, SeaMark.PREF_PORT_HAND);
-						}
-						buoy.setColour(SeaMark.GREEN_RED_GREEN);
-					}
-				} else if (str.equals("black;yellow")) {
-					buoy = new BuoyCard(this, SeaMark.CARD_NORTH);
-					buoy.setColour(SeaMark.BLACK_YELLOW);
-				} else if (str.equals("black;yellow;black")) {
-					buoy = new BuoyCard(this, SeaMark.CARD_EAST);
-					buoy.setColour(SeaMark.BLACK_YELLOW_BLACK);
-				} else if (str.equals("yellow;black")) {
-					buoy = new BuoyCard(this, SeaMark.CARD_SOUTH);
-					buoy.setColour(SeaMark.YELLOW_BLACK);
-				} else if (str.equals("yellow;black;yellow")) {
-					buoy = new BuoyCard(this, SeaMark.CARD_WEST);
-					buoy.setColour(SeaMark.YELLOW_BLACK_YELLOW);
-				} else if (str.equals("black;red;black")) {
-					buoy = new BuoyIsol(this, SeaMark.ISOLATED_DANGER);
-					buoy.setColour(SeaMark.BLACK_RED_BLACK);
-				} else if (str.equals("red;white")) {
-					buoy = new BuoySaw(this, SeaMark.SAFE_WATER);
-					buoy.setColour(SeaMark.RED_WHITE);
-				} else if (str.equals("yellow")) {
-					buoy = new BuoySaw(this, SeaMark.SPECIAL_PURPOSE);
-					buoy.setColour(SeaMark.YELLOW);
-				} else {
-					buoy = new BuoyUkn(this, "Parse-Error: Invalid colour");
-					buoy.setNode(node);
-					return;
-				}
-
-				buoy.setName(name);
-
-				if (buoy.parseTopMark(node) == false) {
-					str = buoy.getErrMsg();
-					if (str == null)
-						buoy.setValid(false);
-				}
-
-				if (buoy.parseLight(node) == false) {
-					str = buoy.getErrMsg();
-					if (str == null)
-						buoy.setValid(false);
-				}
-
-				if (buoy.parseShape(node) == false) {
-					str = buoy.getErrMsg();
-					if (str == null)
-						buoy = new BuoyUkn(this, str);
-					buoy.setNode(node);
-					return;
-				}
-
-				buoy.setValid(true);
-				buoy.setNode(node);
-				cbM01StyleOfMark.setSelectedIndex(buoy.getStyleIndex());
-				buoy.paintSign();
-
-				return;
-
-			}
-		} // Ende if(keys.containsKey("seamark") || keys.containsKey("seamark:type")
-			// )
-
-		buoy = new BuoyUkn(this, "Parse-Error: Seamark not set");
+		}
+
+		buoy = new BuoyUkn(this, "Seamark not set");
 		buoy.setNode(node);
 		return;
@@ -831,4 +411,5 @@
 			dM01SeaMap = new JDialog();
 			dM01SeaMap.setSize(new Dimension(353, 373));
+			// dM01SeaMap.setSize(new Dimension(400, 400));
 			dM01SeaMap.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
 			dM01SeaMap.setModal(false);
@@ -978,15 +559,17 @@
 					int type = cbM01TypeOfMark.getSelectedIndex();
 
-					if (buoy == null)
+					if (buoy == null) {
 						buoy = new BuoyUkn(dia, "Seamark not set");
-					;
-					if (type == buoy.getBuoyIndex() && type != 0) {
-						return;
-					}
+						return;
+					}
+					if ((type == 0) || (type == buoy.getBuoyIndex()))
+						return;
 
 					n = buoy.getNode();
+					if (n == null)
+						n = onode;
 					name = buoy.getName();
-
 					switch (type) {
+
 					case SeaMark.UNKNOWN_CAT:
 						if (!(buoy instanceof BuoyUkn))
@@ -996,54 +579,14 @@
 
 					case SeaMark.PORT_HAND:
-						if (!(buoy instanceof BuoyLat))
-							buoy = new BuoyLat(dia, SeaMark.PORT_HAND);
-						if (buoy.getRegion() != SeaMark.IALA_B) {
-							buoy.setColour(SeaMark.RED);
-							buoy.setRegion(SeaMark.IALA_A);
-							tbM01Region.setSelected(SeaMark.IALA_A);
-						} else {
-							buoy.setColour(SeaMark.GREEN);
-						}
-						break;
-
 					case SeaMark.STARBOARD_HAND:
-						if (!(buoy instanceof BuoyLat))
-							buoy = new BuoyLat(dia, SeaMark.STARBOARD_HAND);
-						if (buoy.getRegion() != SeaMark.IALA_B) {
-							buoy.setColour(SeaMark.GREEN);
-							buoy.setRegion(SeaMark.IALA_A);
-							tbM01Region.setSelected(SeaMark.IALA_A);
-						} else {
-							buoy.setColour(SeaMark.RED);
-						}
-						break;
-
 					case SeaMark.PREF_PORT_HAND:
-						if (!(buoy instanceof BuoyLat))
-							buoy = new BuoyLat(dia, SeaMark.PREF_PORT_HAND);
-						if (buoy.getRegion() != SeaMark.IALA_B) {
-							buoy.setColour(SeaMark.RED_GREEN_RED);
-							buoy.setRegion(SeaMark.IALA_A);
-							tbM01Region.setSelected(SeaMark.IALA_A);
-						} else {
-							buoy.setColour(SeaMark.GREEN_RED_GREEN);
-						}
-						break;
-
 					case SeaMark.PREF_STARBOARD_HAND:
 						if (!(buoy instanceof BuoyLat))
-							buoy = new BuoyLat(dia, SeaMark.PREF_STARBOARD_HAND);
-						if (buoy.getRegion() != SeaMark.IALA_B) {
-							buoy.setColour(SeaMark.GREEN_RED_GREEN);
-							buoy.setRegion(SeaMark.IALA_A);
-							tbM01Region.setSelected(SeaMark.IALA_A);
-						} else {
-							buoy.setColour(SeaMark.RED_GREEN_RED);
-						}
+							buoy = new BuoyLat(dia, n);
 						break;
 
 					case SeaMark.SAFE_WATER:
 						if (!(buoy instanceof BuoySaw))
-							buoy = new BuoySaw(dia, SeaMark.SAFE_WATER);
+							buoy = new BuoySaw(dia, n);
 						break;
 
@@ -1053,20 +596,16 @@
 					case SeaMark.CARD_WEST:
 						if (!(buoy instanceof BuoyCard))
-							buoy = new BuoyCard(dia, type);
+							buoy = new BuoyCard(dia, n);
 						break;
 
 					case SeaMark.ISOLATED_DANGER:
 						if (!(buoy instanceof BuoyIsol))
-							buoy = new BuoyIsol(dia, SeaMark.ISOLATED_DANGER);
+							buoy = new BuoyIsol(dia, n);
 						break;
 
 					case SeaMark.SPECIAL_PURPOSE:
 						if (!(buoy instanceof BuoySpec))
-							buoy = new BuoySpec(dia, SeaMark.SPECIAL_PURPOSE);
+							buoy = new BuoySpec(dia, n);
 						break;
-					/*
-					 * case SeaMark.LIGHT: if (!(buoy instanceof BuoyNota)) buoy = new
-					 * BuoyNota(dia, type); break;
-					 */
 					default:
 						if (!(buoy instanceof BuoyUkn))
Index: applications/editors/josm/plugins/toms/src/toms/seamarks/SeaMark.java
===================================================================
--- applications/editors/josm/plugins/toms/src/toms/seamarks/SeaMark.java	(revision 22721)
+++ applications/editors/josm/plugins/toms/src/toms/seamarks/SeaMark.java	(revision 22722)
@@ -107,8 +107,4 @@
 	public abstract void paintSign();
 
-	public abstract boolean parseTopMark(Node node);
-
-	public abstract boolean parseLight(Node node);
-
 	public abstract void saveSign();
 
Index: applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/Buoy.java
===================================================================
--- applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/Buoy.java	(revision 22721)
+++ applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/Buoy.java	(revision 22722)
@@ -191,16 +191,4 @@
 	}
 
-	public boolean parseShape(Node node, String str) {
-		boolean ret = true;
-		Map<String, String> keys;
-
-		keys = node.getKeys();
-		if (keys.containsKey(str) == false) {
-			setErrMsg("Parse-Error: Seezeichen ohne Form");
-			return false;
-		}
-		return ret;
-	}
-
 	private boolean TopMark = false;
 
@@ -236,4 +224,5 @@
 
 		dlg.cbM01TypeOfMark.setSelectedIndex(getBuoyIndex());
+		dlg.cbM01StyleOfMark.setSelectedIndex(getStyleIndex());
 
 		dlg.cM01TopMark.setSelected(hasTopMark());
@@ -337,8 +326,4 @@
 	}
 
-	public boolean parseShape(Node node) {
-		return false;
-	}
-
 	public void refreshStyles() {
 	}
Index: applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyCard.java
===================================================================
--- applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyCard.java	(revision 22721)
+++ applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyCard.java	(revision 22722)
@@ -17,6 +17,11 @@
 public class BuoyCard extends Buoy {
 
-	public BuoyCard(SmpDialogAction dia, int type) {
+	public BuoyCard(SmpDialogAction dia, Node node) {
 		super(dia);
+
+		String str;
+		Map<String, String> keys;
+		keys = node.getKeys();
+		setNode(node);
 
 		dlg.cbM01StyleOfMark.removeAllItems();
@@ -32,212 +37,59 @@
 		dlg.tbM01Region.setEnabled(false);
 
-		setBuoyIndex(type);
-		setStyleIndex(0);
-		setLightColour("W");
-
-		switch (type) {
-		case CARD_NORTH:
-			setColour(SeaMark.BLACK_YELLOW);
-			break;
-		case CARD_EAST:
-			setColour(SeaMark.BLACK_YELLOW_BLACK);
-			break;
-		case CARD_SOUTH:
-			setColour(SeaMark.YELLOW_BLACK);
-			break;
-		case CARD_WEST:
-			setColour(SeaMark.YELLOW_BLACK_YELLOW);
-			break;
-		default:
-		}
-
-		refreshLights();
-		paintSign();
-	}
-
-	public void refreshLights() {
-		int type = getBuoyIndex();
-
-		dlg.cbM01Kennung.removeAllItems();
-		dlg.cbM01Kennung.addItem("Not set");
-		dlg.cbM01Kennung.setSelectedIndex(0);
-
-		switch (type) {
-		case SeaMark.CARD_NORTH:
-			dlg.cbM01Kennung.addItem("Q");
-			dlg.cbM01Kennung.addItem("VQ");
-			break;
-
-		case SeaMark.CARD_EAST:
-			dlg.cbM01Kennung.addItem("Q(3)");
-			dlg.cbM01Kennung.addItem("VQ(3)");
-			break;
-
-		case SeaMark.CARD_SOUTH:
-			dlg.cbM01Kennung.addItem("Q(6)+LFl");
-			dlg.cbM01Kennung.addItem("VQ(6)+LFl");
-			break;
-
-		case SeaMark.CARD_WEST:
-			dlg.cbM01Kennung.addItem("Q(9)");
-			dlg.cbM01Kennung.addItem("VQ(9)");
-			break;
-
-		default:
-		}
-
-	}
-
-	public void paintSign() {
-		super.paintSign();
-
-		dlg.sM01StatusBar.setText(getErrMsg());
-
-		dlg.tfM01Name.setEnabled(true);
-		dlg.tfM01Name.setText(getName());
-
-		dlg.cM01TopMark.setSelected(true);
-		dlg.cM01TopMark.setEnabled(false);
-		dlg.cM01Fired.setEnabled(true);
-
-		String image = "/images/Cardinal";
-
-		switch (getStyleIndex()) {
-		case SeaMark.CARD_PILLAR:
-			image += "_Pillar";
-			break;
-
-		case SeaMark.CARD_SPAR:
-			image += "_Spar";
-			break;
-
-		case SeaMark.CARD_BEACON:
-			image += "_Beacon";
-			break;
-
-		case SeaMark.CARD_TOWER:
-			image += "_Tower";
-			break;
-
-		case SeaMark.CARD_FLOAT:
-			image += "_Float";
-			break;
-
-		default:
-			return;
-		}
-
-		switch (getBuoyIndex()) {
-		case CARD_NORTH:
-			image += "_North";
-			break;
-		case CARD_EAST:
-			image += "_East";
-			break;
-		case CARD_SOUTH:
-			image += "_South";
-			break;
-		case CARD_WEST:
-			image += "_West";
-			break;
-		default:
-			return;
-		}
-
-		if (image != "") {
-			if (isFired()) {
-				image += "_Lit";
-
-				if (getLightChar() != "") {
-					String tmp = null;
-					String c;
-					int i1;
-
-					c = getLightChar();
-					if (c.contains("+")) {
-						i1 = c.indexOf("+");
-						tmp = c.substring(i1, c.length());
-						c = c.substring(0, i1);
-					}
-
-					if (getLightGroup() != "")
-						c = c + "(" + getLightGroup() + ")";
-					if (tmp != null)
-						c = c + tmp;
-
-					dlg.cbM01Kennung.setSelectedItem(c);
-					if (dlg.cbM01Kennung.getSelectedItem().equals("Not set"))
-						c = "";
-				}
-			}
-
-			image += ".png";
-
-			dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(image)));
-		} else
-			dlg.lM01Icon01.setIcon(null);
-	}
-
-	public boolean parseLight(Node node) {
-		String str;
-		boolean ret = true;
-		Map<String, String> keys;
-
-		setFired(false);
-
-		keys = node.getKeys();
-		if (keys.containsKey("seamark:light:colour")) {
-			str = keys.get("seamark:light:colour");
-
-			if (keys.containsKey("seamark:light:character")) {
-				int i1;
-				String tmp = null;
-
-				setLightGroup(keys);
-
-				String c = keys.get("seamark:light:character");
-
-				if (c.contains("+")) {
-					i1 = c.indexOf("+");
-					tmp = c.substring(i1, c.length());
-					c = c.substring(0, i1);
-				}
-
-				if (getLightGroup() != "")
-					if (tmp != null) {
-						c = c + tmp;
-					}
-
-				setLightChar(c);
-				setLightPeriod(keys);
-			}
-
-			if (str.equals("white")) {
-				setFired(true);
-				setLightColour("W");
-
-			} else {
-				if (getErrMsg() == null)
-					setErrMsg("Parse-Error: Licht falsch");
-				else
-					setErrMsg(getErrMsg() + " / Licht falsch");
-
-				ret = false;
-			}
-		}
-
-		return ret;
-	}
-
-	public void setLightColour() {
-		super.setLightColour("W");
-	}
-
-	public boolean parseShape(Node node) {
-		String str;
-		boolean ret = true;
-		Map<String, String> keys;
-
-		keys = node.getKeys();
+		if (keys.containsKey("name"))
+			setName(keys.get("name"));
+
+		if (keys.containsKey("seamark:name"))
+			setName(keys.get("seamark:name"));
+
+		if (keys.containsKey("seamark:buoy_cardinal:name"))
+			setName(keys.get("seamark:buoy_cardinal:name"));
+		else if (keys.containsKey("seamark:beacon_cardinal:name"))
+			setName(keys.get("seamark:beacon_cardinal:name"));
+		else if (keys.containsKey("seamark:light_float:name"))
+			setName(keys.get("seamark:light_float:name"));
+
+		String cat = "";
+		String col = "";
+
+		if (keys.containsKey("seamark:buoy_cardinal:category"))
+			cat = keys.get("seamark:buoy_cardinal:category");
+		else if (keys.containsKey("seamark:beacon_cardinal:category"))
+			cat = keys.get("seamark:beacon_cardinal:category");
+
+		if (keys.containsKey("seamark:buoy_cardinal:colour"))
+			col = keys.get("seamark:buoy_cardinal:colour");
+		else if (keys.containsKey("seamark:beacon_cardinal:colour"))
+			col = keys.get("seamark:beacon_cardinal:colour");
+		else if (keys.containsKey("seamark:light_float:colour"))
+			col = keys.get("seamark:light_float:colour");
+
+		if (cat.equals("")) {
+			if (col.equals("black;yellow")) {
+				setBuoyIndex(CARD_NORTH);
+				setColour(BLACK_YELLOW);
+			} else if (col.equals("black;yellow;black")) {
+				setBuoyIndex(CARD_EAST);
+				setColour(BLACK_YELLOW_BLACK);
+			} else if (col.equals("yellow;black")) {
+				setBuoyIndex(CARD_SOUTH);
+				setColour(YELLOW_BLACK);
+			} else if (col.equals("yellow;black;yellow")) {
+				setBuoyIndex(CARD_WEST);
+				setColour(YELLOW_BLACK_YELLOW);
+			}
+		} else if (cat.equals("north")) {
+			setBuoyIndex(CARD_NORTH);
+			setColour(BLACK_YELLOW);
+		} else if (cat.equals("east")) {
+			setBuoyIndex(CARD_EAST);
+			setColour(BLACK_YELLOW_BLACK);
+		} else if (cat.equals("south")) {
+			setBuoyIndex(CARD_SOUTH);
+			setColour(YELLOW_BLACK);
+		} else if (cat.equals("west")) {
+			setBuoyIndex(CARD_WEST);
+			setColour(YELLOW_BLACK_YELLOW);
+		}
 
 		if (keys.containsKey("seamark:buoy_cardinal:shape")) {
@@ -248,6 +100,4 @@
 			else if (str.equals("spar"))
 				setStyleIndex(CARD_SPAR);
-			else
-				ret = false;
 		} else if (keys.containsKey("seamark:beacon_cardinal:colour")) {
 			if (keys.containsKey("seamark:beacon_cardinal:shape")) {
@@ -264,11 +114,169 @@
 			setStyleIndex(CARD_FLOAT);
 		}
-		return ret;
+
+		refreshLights();
+
+		if (keys.containsKey("seamark:light:colour")) {
+			str = keys.get("seamark:light:colour");
+
+			if (keys.containsKey("seamark:light:character")) {
+				int i1;
+				String tmp = null;
+
+				setLightGroup(keys);
+
+				String c = keys.get("seamark:light:character");
+
+				if (c.contains("+")) {
+					i1 = c.indexOf("+");
+					tmp = c.substring(i1, c.length());
+					c = c.substring(0, i1);
+				}
+
+				if (getLightGroup() != "")
+					if (tmp != null) {
+						c = c + tmp;
+					}
+
+				setLightChar(c);
+				setLightPeriod(keys);
+			}
+
+			if (str.equals("white")) {
+				setFired(true);
+				setLightColour("W");
+			}
+		}
+
+		paintSign();
 	}
 
-	public boolean parseTopMark(Node node) {
-		return false;
+	public void refreshLights() {
+		int type = getBuoyIndex();
+
+		dlg.cbM01Kennung.removeAllItems();
+		dlg.cbM01Kennung.addItem("Not set");
+		dlg.cbM01Kennung.setSelectedIndex(0);
+
+		switch (type) {
+		case SeaMark.CARD_NORTH:
+			dlg.cbM01Kennung.addItem("Q");
+			dlg.cbM01Kennung.addItem("VQ");
+			break;
+
+		case SeaMark.CARD_EAST:
+			dlg.cbM01Kennung.addItem("Q(3)");
+			dlg.cbM01Kennung.addItem("VQ(3)");
+			break;
+
+		case SeaMark.CARD_SOUTH:
+			dlg.cbM01Kennung.addItem("Q(6)+LFl");
+			dlg.cbM01Kennung.addItem("VQ(6)+LFl");
+			break;
+
+		case SeaMark.CARD_WEST:
+			dlg.cbM01Kennung.addItem("Q(9)");
+			dlg.cbM01Kennung.addItem("VQ(9)");
+			break;
+
+		default:
+		}
+
 	}
 
+	public void paintSign() {
+		super.paintSign();
+
+		dlg.sM01StatusBar.setText(getErrMsg());
+
+		dlg.tfM01Name.setEnabled(true);
+		dlg.tfM01Name.setText(getName());
+
+		dlg.cM01TopMark.setSelected(true);
+		dlg.cM01TopMark.setEnabled(false);
+		dlg.cM01Fired.setEnabled(true);
+
+		String image = "/images/Cardinal";
+
+		switch (getStyleIndex()) {
+		case SeaMark.CARD_PILLAR:
+			image += "_Pillar";
+			break;
+
+		case SeaMark.CARD_SPAR:
+			image += "_Spar";
+			break;
+
+		case SeaMark.CARD_BEACON:
+			image += "_Beacon";
+			break;
+
+		case SeaMark.CARD_TOWER:
+			image += "_Tower";
+			break;
+
+		case SeaMark.CARD_FLOAT:
+			image += "_Float";
+			break;
+
+		default:
+			return;
+		}
+
+		switch (getBuoyIndex()) {
+		case CARD_NORTH:
+			image += "_North";
+			break;
+		case CARD_EAST:
+			image += "_East";
+			break;
+		case CARD_SOUTH:
+			image += "_South";
+			break;
+		case CARD_WEST:
+			image += "_West";
+			break;
+		default:
+			return;
+		}
+
+		if (!image.equals("")) {
+			if (isFired()) {
+				image += "_Lit";
+
+				if (getLightChar() != "") {
+					String tmp = null;
+					String c;
+					int i1;
+
+					c = getLightChar();
+					if (c.contains("+")) {
+						i1 = c.indexOf("+");
+						tmp = c.substring(i1, c.length());
+						c = c.substring(0, i1);
+					}
+
+					if (getLightGroup() != "")
+						c = c + "(" + getLightGroup() + ")";
+					if (tmp != null)
+						c = c + tmp;
+
+					dlg.cbM01Kennung.setSelectedItem(c);
+					if (dlg.cbM01Kennung.getSelectedItem().equals("Not set"))
+						c = "";
+				}
+			}
+
+			image += ".png";
+
+			dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(image)));
+		} else
+			dlg.lM01Icon01.setIcon(null);
+	}
+
+	public void setLightColour() {
+		super.setLightColour("W");
+	}
+	
 	public void saveSign() {
 		Node node = getNode();
Index: applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyIsol.java
===================================================================
--- applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyIsol.java	(revision 22721)
+++ applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyIsol.java	(revision 22722)
@@ -16,6 +16,11 @@
 
 public class BuoyIsol extends Buoy {
-	public BuoyIsol(SmpDialogAction dia, int type) {
+	public BuoyIsol(SmpDialogAction dia, Node node) {
 		super(dia);
+
+		String str;
+		Map<String, String> keys;
+		keys = node.getKeys();
+		setNode(node);
 
 		dlg.cbM01StyleOfMark.removeAllItems();
@@ -38,195 +43,6 @@
 		setColour(SeaMark.BLACK_RED_BLACK);
 		setLightColour("W");
-		setBuoyIndex(type);
+		setBuoyIndex(ISOLATED_DANGER);
 		setTopMark(true);
-
-		paintSign();
-	}
-
-	public void paintSign() {
-		super.paintSign();
-
-		dlg.sM01StatusBar.setText(getErrMsg());
-
-		dlg.tfM01Name.setEnabled(true);
-		dlg.tfM01Name.setText(getName());
-		dlg.cM01Fired.setEnabled(true);
-		dlg.cM01TopMark.setEnabled(false);
-
-		String image = "/images/Cardinal";
-
-		switch (getStyleIndex()) {
-		case ISOL_PILLAR:
-			image += "_Pillar_Single";
-			break;
-		case ISOL_SPAR:
-			image += "_Spar_Single";
-			break;
-		case ISOL_BEACON:
-			image += "_Beacon_Single";
-			break;
-		case ISOL_TOWER:
-			image += "_Tower_Single";
-			break;
-		case ISOL_FLOAT:
-			image += "_Float_Single";
-			break;
-		default:
-		}
-
-		if (image != "/images/Cardinal") {
-			if (isFired()) {
-				image += "_Lit";
-				if (getLightChar() != "") {
-					String c;
-
-					c = getLightChar();
-					if (getLightGroup() != "")
-						c = c + "(" + getLightGroup() + ")";
-					dlg.cbM01Kennung.setSelectedItem(c);
-				}
-			}
-			image += ".png";
-			dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(image)));
-		} else
-			dlg.lM01Icon01.setIcon(null);
-	}
-
-	public void saveSign() {
-		Node node = getNode();
-
-		if (node == null) {
-			return;
-		}
-
-		switch (getStyleIndex()) {
-		case ISOL_PILLAR:
-			super.saveSign("buoy_isolated_danger");
-			Main.main.undoRedo.add(new ChangePropertyCommand(node,
-					"seamark:buoy_isolated_danger:shape", "pillar"));
-			break;
-		case ISOL_SPAR:
-			super.saveSign("buoy_isolated_danger");
-			Main.main.undoRedo.add(new ChangePropertyCommand(node,
-					"seamark:buoy_isolated_danger:shape", "spar"));
-			break;
-		case ISOL_BEACON:
-			super.saveSign("beacon_isolated_danger");
-			break;
-		case ISOL_TOWER:
-			super.saveSign("beacon_isolated_danger");
-			Main.main.undoRedo.add(new ChangePropertyCommand(node,
-					"seamark:beacon_isolated_danger:shape", "tower"));
-			break;
-		case ISOL_FLOAT:
-			super.saveSign("light_float");
-			break;
-		default:
-		}
-		
-		switch (getStyleIndex()) {
-		case ISOL_PILLAR:
-		case ISOL_SPAR:
-			Main.main.undoRedo.add(new ChangePropertyCommand(node,
-					"seamark:buoy_isolated_danger:colour_pattern", "horizontal stripes"));
-			Main.main.undoRedo.add(new ChangePropertyCommand(node,
-					"seamark:buoy_isolated_danger:colour", "black;red;black"));
-			break;
-		case ISOL_BEACON:
-		case ISOL_TOWER:
-			Main.main.undoRedo
-					.add(new ChangePropertyCommand(node,
-							"seamark:beacon_isolated_danger:colour_pattern",
-							"horizontal stripes"));
-			Main.main.undoRedo.add(new ChangePropertyCommand(node,
-					"seamark:beacon_isolated_danger:colour", "black;red;black"));
-			break;
-		case ISOL_FLOAT:
-			Main.main.undoRedo.add(new ChangePropertyCommand(node,
-					"seamark:light_float:colour_pattern", "horizontal stripes"));
-			Main.main.undoRedo.add(new ChangePropertyCommand(node,
-					"seamark:light_float:colour", "black;red;black"));
-			break;
-		}
-
-		saveTopMarkData("2 spheres", "black");
-
-		saveLightData("white");
-
-	}
-
-	public boolean parseTopMark(Node node) {
-		if (node == null) {
-			return false;
-		}
-
-		String str;
-		boolean ret = true;
-		Map<String, String> keys;
-
-		setTopMark(false);
-
-		keys = node.getKeys();
-		if (keys.containsKey("seamark:topmark:shape")) {
-			str = keys.get("seamark:topmark:shape");
-
-			if (str.equals("2 spheres")) {
-				setTopMark(true);
-
-			} else {
-				setErrMsg("Parse-Error: Topmark invalid");
-				ret = false;
-			}
-		}
-
-		return ret;
-	}
-
-	public boolean parseLight(Node node) {
-		String str;
-		boolean ret = true;
-		Map<String, String> keys;
-
-		setFired(false);
-
-		keys = node.getKeys();
-		if (keys.containsKey("seamark:light:colour")) {
-			str = keys.get("seamark:light:colour");
-
-			if (keys.containsKey("seamark:light:character")) {
-				setLightGroup(keys);
-				String c = keys.get("seamark:light:character");
-				setLightChar(c);
-				setLightPeriod(keys);
-			}
-
-			if (str.equals("white")) {
-				setFired(true);
-				setLightColour("W");
-
-			} else {
-				if (getErrMsg() == null)
-					setErrMsg("Parse-Error: Invalid light");
-				else
-					setErrMsg(getErrMsg() + " / Invalid light");
-
-				ret = false;
-			}
-
-		}
-
-		return ret;
-	}
-
-	public void setLightColour() {
-		super.setLightColour("W");
-	}
-
-	public boolean parseShape(Node node) {
-		String str;
-		boolean ret = true;
-		Map<String, String> keys;
-
-		keys = node.getKeys();
 
 		if (keys.containsKey("seamark:buoy_isolated_danger:shape")) {
@@ -237,6 +53,4 @@
 			else if (str.equals("spar"))
 				setStyleIndex(ISOL_SPAR);
-			else
-				ret = false;
 		} else if (keys.containsKey("seamark:beacon_isolated_danger:colour")) {
 			if (keys.containsKey("seamark:beacon_isolated_danger:shape")) {
@@ -253,5 +67,145 @@
 			setStyleIndex(CARD_FLOAT);
 		}
-		return ret;
+
+		if (keys.containsKey("seamark:topmark:shape")) {
+			str = keys.get("seamark:topmark:shape");
+			if (str.equals("2 spheres")) {
+				setTopMark(true);
+			}
+		}
+
+		if (keys.containsKey("seamark:light:colour")) {
+			str = keys.get("seamark:light:colour");
+
+			if (keys.containsKey("seamark:light:character")) {
+				setLightGroup(keys);
+				String c = keys.get("seamark:light:character");
+				setLightChar(c);
+				setLightPeriod(keys);
+			}
+
+			if (str.equals("white")) {
+				setFired(true);
+				setLightColour("W");
+			}
+		}
+
+		paintSign();
+	}
+
+	public void paintSign() {
+		super.paintSign();
+
+		dlg.sM01StatusBar.setText(getErrMsg());
+
+		dlg.tfM01Name.setEnabled(true);
+		dlg.tfM01Name.setText(getName());
+		dlg.cM01Fired.setEnabled(true);
+		dlg.cM01TopMark.setEnabled(false);
+
+		String image = "/images/Cardinal";
+
+		switch (getStyleIndex()) {
+		case ISOL_PILLAR:
+			image += "_Pillar_Single";
+			break;
+		case ISOL_SPAR:
+			image += "_Spar_Single";
+			break;
+		case ISOL_BEACON:
+			image += "_Beacon_Single";
+			break;
+		case ISOL_TOWER:
+			image += "_Tower_Single";
+			break;
+		case ISOL_FLOAT:
+			image += "_Float_Single";
+			break;
+		default:
+		}
+
+		if (!image.equals("/images/Cardinal")) {
+			if (isFired()) {
+				image += "_Lit";
+				if (getLightChar() != "") {
+					String c;
+
+					c = getLightChar();
+					if (getLightGroup() != "")
+						c = c + "(" + getLightGroup() + ")";
+					dlg.cbM01Kennung.setSelectedItem(c);
+				}
+			}
+			image += ".png";
+			dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(image)));
+		} else
+			dlg.lM01Icon01.setIcon(null);
+	}
+
+	public void saveSign() {
+		Node node = getNode();
+
+		if (node == null) {
+			return;
+		}
+
+		switch (getStyleIndex()) {
+		case ISOL_PILLAR:
+			super.saveSign("buoy_isolated_danger");
+			Main.main.undoRedo.add(new ChangePropertyCommand(node,
+					"seamark:buoy_isolated_danger:shape", "pillar"));
+			break;
+		case ISOL_SPAR:
+			super.saveSign("buoy_isolated_danger");
+			Main.main.undoRedo.add(new ChangePropertyCommand(node,
+					"seamark:buoy_isolated_danger:shape", "spar"));
+			break;
+		case ISOL_BEACON:
+			super.saveSign("beacon_isolated_danger");
+			break;
+		case ISOL_TOWER:
+			super.saveSign("beacon_isolated_danger");
+			Main.main.undoRedo.add(new ChangePropertyCommand(node,
+					"seamark:beacon_isolated_danger:shape", "tower"));
+			break;
+		case ISOL_FLOAT:
+			super.saveSign("light_float");
+			break;
+		default:
+		}
+
+		switch (getStyleIndex()) {
+		case ISOL_PILLAR:
+		case ISOL_SPAR:
+			Main.main.undoRedo.add(new ChangePropertyCommand(node,
+					"seamark:buoy_isolated_danger:colour_pattern", "horizontal stripes"));
+			Main.main.undoRedo.add(new ChangePropertyCommand(node,
+					"seamark:buoy_isolated_danger:colour", "black;red;black"));
+			break;
+		case ISOL_BEACON:
+		case ISOL_TOWER:
+			Main.main.undoRedo
+					.add(new ChangePropertyCommand(node,
+							"seamark:beacon_isolated_danger:colour_pattern",
+							"horizontal stripes"));
+			Main.main.undoRedo.add(new ChangePropertyCommand(node,
+					"seamark:beacon_isolated_danger:colour", "black;red;black"));
+			break;
+		case ISOL_FLOAT:
+			Main.main.undoRedo.add(new ChangePropertyCommand(node,
+					"seamark:light_float:colour_pattern", "horizontal stripes"));
+			Main.main.undoRedo.add(new ChangePropertyCommand(node,
+					"seamark:light_float:colour", "black;red;black"));
+			break;
+		}
+
+		saveTopMarkData("2 spheres", "black");
+
+		saveLightData("white");
+
+	}
+
+	public void setLightColour() {
+		super.setLightColour("W");
 	}
 
Index: applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyLat.java
===================================================================
--- applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyLat.java	(revision 22721)
+++ applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyLat.java	(revision 22722)
@@ -16,6 +16,11 @@
 
 public class BuoyLat extends Buoy {
-	public BuoyLat(SmpDialogAction dia, int type) {
+	public BuoyLat(SmpDialogAction dia, Node node) {
 		super(dia);
+
+		String str;
+		Map<String, String> keys;
+		keys = node.getKeys();
+		setNode(node);
 
 		dlg.cbM01Kennung.removeAllItems();
@@ -32,5 +37,4 @@
 		dlg.cbM01Kennung.setSelectedIndex(0);
 
-		setBuoyIndex(type);
 		setStyleIndex(0);
 		setLightColour();
@@ -43,826 +47,131 @@
 		dlg.tbM01Region.setEnabled(true);
 
+		if (keys.containsKey("name"))
+			setName(keys.get("name"));
+
+		if (keys.containsKey("seamark:name"))
+			setName(keys.get("seamark:name"));
+
+		if (keys.containsKey("seamark:buoy_lateral:name"))
+			setName(keys.get("seamark:buoy_lateral:name"));
+		else if (keys.containsKey("seamark:beacon_lateral:name"))
+			setName(keys.get("seamark:beacon_lateral:name"));
+		else if (keys.containsKey("seamark:light_float:name"))
+			setName(keys.get("seamark:light_float:name"));
+
+		String cat = "";
+		String col = "";
+
+		if (keys.containsKey("seamark:buoy_lateral:category"))
+			cat = keys.get("seamark:buoy_lateral:category");
+		else if (keys.containsKey("seamark:beacon_lateral:category"))
+			cat = keys.get("seamark:beacon_lateral:category");
+
+		if (keys.containsKey("seamark:buoy_lateral:colour"))
+			col = keys.get("seamark:buoy_lateral:colour");
+		else if (keys.containsKey("seamark:beacon_lateral:colour"))
+			col = keys.get("seamark:beacon_lateral:colour");
+		else if (keys.containsKey("seamark:light_float:colour"))
+			col = keys.get("seamark:light_float:colour");
+
+		if (cat.equals("")) {
+			if (col.equals("red")) {
+				setColour(RED);
+				if (getRegion() == IALA_A)
+					setBuoyIndex(PORT_HAND);
+				else
+					setBuoyIndex(STARBOARD_HAND);
+			} else if (col.equals("green")) {
+				setColour(GREEN);
+				if (getRegion() == IALA_A)
+					setBuoyIndex(STARBOARD_HAND);
+				else
+					setBuoyIndex(PORT_HAND);
+			} else if (col.equals("red;green;red")) {
+				setColour(RED_GREEN_RED);
+				if (getRegion() == IALA_A)
+					setBuoyIndex(PREF_PORT_HAND);
+				else
+					setBuoyIndex(PREF_STARBOARD_HAND);
+			} else if (col.equals("green;red;green")) {
+				setColour(GREEN_RED_GREEN);
+				if (getRegion() == IALA_A)
+					setBuoyIndex(PREF_STARBOARD_HAND);
+				else
+					setBuoyIndex(PREF_PORT_HAND);
+			}
+		} else if (cat.equals("port")) {
+
+			setBuoyIndex(PORT_HAND);
+
+			if (col.equals("red")) {
+				setRegion(SeaMark.IALA_A);
+				setColour(SeaMark.RED);
+			} else if (col.equals("green")) {
+				setRegion(SeaMark.IALA_B);
+				setColour(SeaMark.GREEN);
+			} else {
+				if (getRegion() == IALA_A)
+					setColour(SeaMark.RED);
+				else
+					setColour(SeaMark.GREEN);
+			}
+		} else if (cat.compareTo("starboard") == 0) {
+
+			setBuoyIndex(STARBOARD_HAND);
+
+			if (col.compareTo("green") == 0) {
+				setRegion(SeaMark.IALA_A);
+				setColour(SeaMark.GREEN);
+			} else if (col.equals("red")) {
+				setRegion(SeaMark.IALA_B);
+				setColour(SeaMark.RED);
+			} else {
+				if (getRegion() == IALA_A)
+					setColour(SeaMark.GREEN);
+				else
+					setColour(SeaMark.RED);
+			}
+		} else if (cat.compareTo("preferred_channel_port") == 0) {
+
+			setBuoyIndex(PREF_PORT_HAND);
+
+			if (col.compareTo("red;green;red") == 0) {
+				setRegion(SeaMark.IALA_A);
+				setColour(SeaMark.RED_GREEN_RED);
+			} else if (col.compareTo("green;red;green") == 0) {
+				setRegion(SeaMark.IALA_B);
+				setColour(SeaMark.GREEN_RED_GREEN);
+			} else {
+				if (getRegion() == IALA_A)
+					setColour(SeaMark.RED_GREEN_RED);
+				else
+					setColour(SeaMark.GREEN_RED_GREEN);
+			}
+
+		} else if (cat.compareTo("preferred_channel_starboard") == 0) {
+
+			setBuoyIndex(PREF_STARBOARD_HAND);
+
+			if (col.compareTo("green;red;green") == 0) {
+				setRegion(SeaMark.IALA_A);
+				setColour(SeaMark.GREEN_RED_GREEN);
+			} else if (col.compareTo("red;green;red") == 0) {
+				setRegion(SeaMark.IALA_B);
+				setColour(SeaMark.RED_GREEN_RED);
+			} else {
+				if (getRegion() == IALA_A)
+					setColour(SeaMark.GREEN_RED_GREEN);
+				else
+					setColour(SeaMark.RED_GREEN_RED);
+			}
+		}
+
 		refreshStyles();
-
-		paintSign();
-	}
-
-	public void refreshStyles() {
-		int type = getBuoyIndex();
-		int style = getStyleIndex();
-
-		dlg.cbM01StyleOfMark.removeAllItems();
-		dlg.cbM01StyleOfMark.addItem("Not set");
-
-		switch (type) {
-		case PORT_HAND:
-			dlg.cbM01StyleOfMark.addItem("Can Buoy");
-			dlg.cbM01StyleOfMark.addItem("Pillar Buoy");
-			dlg.cbM01StyleOfMark.addItem("Spar Buoy");
-			dlg.cbM01StyleOfMark.addItem("Beacon");
-			dlg.cbM01StyleOfMark.addItem("Tower");
-			dlg.cbM01StyleOfMark.addItem("Float");
-			dlg.cbM01StyleOfMark.addItem("Perch");
-			break;
-
-		case STARBOARD_HAND:
-			dlg.cbM01StyleOfMark.addItem("Cone Buoy");
-			dlg.cbM01StyleOfMark.addItem("Pillar Buoy");
-			dlg.cbM01StyleOfMark.addItem("Spar Buoy");
-			dlg.cbM01StyleOfMark.addItem("Beacon");
-			dlg.cbM01StyleOfMark.addItem("Tower");
-			dlg.cbM01StyleOfMark.addItem("Float");
-			dlg.cbM01StyleOfMark.addItem("Perch");
-			break;
-
-		case PREF_PORT_HAND:
-			dlg.cbM01StyleOfMark.addItem("Can Buoy");
-			dlg.cbM01StyleOfMark.addItem("Pillar Buoy");
-			dlg.cbM01StyleOfMark.addItem("Spar Buoy");
-			dlg.cbM01StyleOfMark.addItem("Beacon");
-			dlg.cbM01StyleOfMark.addItem("Tower");
-			dlg.cbM01StyleOfMark.addItem("Float");
-			break;
-
-		case PREF_STARBOARD_HAND:
-			dlg.cbM01StyleOfMark.addItem("Cone Buoy");
-			dlg.cbM01StyleOfMark.addItem("Pillar Buoy");
-			dlg.cbM01StyleOfMark.addItem("Spar Buoy");
-			dlg.cbM01StyleOfMark.addItem("Beacon");
-			dlg.cbM01StyleOfMark.addItem("Tower");
-			dlg.cbM01StyleOfMark.addItem("Float");
-			break;
-
-		default:
-		}
-
-		if (style >= dlg.cbM01StyleOfMark.getItemCount())
-			style = 0;
-		setStyleIndex(style);
-		dlg.cbM01StyleOfMark.setSelectedIndex(style);
-
-	}
-
-	public void paintSign() {
-		super.paintSign();
-
-		dlg.sM01StatusBar.setText(getErrMsg());
-
-		dlg.tfM01Name.setEnabled(true);
-		dlg.tfM01Name.setText(getName());
-		dlg.cM01Fired.setEnabled(true);
-		dlg.cM01TopMark.setEnabled(true);
-
-		String image = "/images/Lateral";
-
-		int cat = getBuoyIndex();
-		boolean region = getRegion();
-		int style = getStyleIndex();
-
-		switch (getBuoyIndex()) {
-		case SeaMark.PORT_HAND:
-			if (region != SeaMark.IALA_B)
-				switch (style) {
-				case LAT_CAN:
-					image += "_Can_Red";
-					break;
-				case LAT_PILLAR:
-					image += "_Pillar_Red";
-					break;
-				case LAT_SPAR:
-					image += "_Spar_Red";
-					break;
-				case LAT_BEACON:
-					image += "_Beacon_Red";
-					break;
-				case LAT_TOWER:
-					image += "_Tower_Red";
-					break;
-				case LAT_FLOAT:
-					image += "_Float_Red";
-					break;
-				case LAT_PERCH:
-					image += "_Perch_Port";
-					break;
-				default:
-				}
-			else
-				switch (style) {
-				case LAT_CAN:
-					image += "_Can_Green";
-					break;
-				case LAT_PILLAR:
-					image += "_Pillar_Green";
-					break;
-				case LAT_SPAR:
-					image += "_Spar_Green";
-					break;
-				case LAT_BEACON:
-					image += "_Beacon_Green";
-					break;
-				case LAT_TOWER:
-					image += "_Tower_Green";
-					break;
-				case LAT_FLOAT:
-					image += "_Float_Green";
-					break;
-				case LAT_PERCH:
-					image += "_Perch_Port";
-					break;
-				default:
-				}
-			break;
-
-		case SeaMark.STARBOARD_HAND:
-			if (region != SeaMark.IALA_B)
-				switch (style) {
-				case LAT_CONE:
-					image += "_Cone_Green";
-					break;
-				case LAT_PILLAR:
-					image += "_Pillar_Green";
-					break;
-				case LAT_SPAR:
-					image += "_Spar_Green";
-					break;
-				case LAT_BEACON:
-					image += "_Beacon_Green";
-					break;
-				case LAT_TOWER:
-					image += "_Tower_Green";
-					break;
-				case LAT_FLOAT:
-					image += "_Float_Green";
-					break;
-				case LAT_PERCH:
-					image += "_Perch_Starboard";
-					break;
-				default:
-				}
-			else
-				switch (style) {
-				case LAT_CONE:
-					image += "_Cone_Red";
-					break;
-				case LAT_PILLAR:
-					image += "_Pillar_Red";
-					break;
-				case LAT_SPAR:
-					image += "_Spar_Red";
-					break;
-				case LAT_BEACON:
-					image += "_Beacon_Red";
-					break;
-				case LAT_TOWER:
-					image += "_Tower_Red";
-					break;
-				case LAT_FLOAT:
-					image += "_Float_Red";
-					break;
-				case LAT_PERCH:
-					image += "_Perch_Starboard";
-					break;
-				default:
-				}
-			break;
-
-		case SeaMark.PREF_PORT_HAND:
-			if (region != SeaMark.IALA_B)
-				switch (style) {
-				case LAT_CAN:
-					image += "_Can_Red_Green_Red";
-					break;
-				case LAT_PILLAR:
-					image += "_Pillar_Red_Green_Red";
-					break;
-				case LAT_SPAR:
-					image += "_Spar_Red_Green_Red";
-					break;
-				case LAT_BEACON:
-					image += "_Beacon_Red_Green_Red";
-					break;
-				case LAT_TOWER:
-					image += "_Tower_Red_Green_Red";
-					break;
-				case LAT_FLOAT:
-					image += "_Float_Red_Green_Red";
-					break;
-				default:
-				}
-			else
-				switch (style) {
-				case LAT_CAN:
-					image += "_Can_Green_Red_Green";
-					break;
-				case LAT_PILLAR:
-					image += "_Pillar_Green_Red_Green";
-					break;
-				case LAT_SPAR:
-					image += "_Spar_Green_Red_Green";
-					break;
-				case LAT_BEACON:
-					image += "_Beacon_Green_Red_Green";
-					break;
-				case LAT_TOWER:
-					image += "_Tower_Green_Red_Green";
-					break;
-				case LAT_FLOAT:
-					image += "_Float_Green_Red_Green";
-					break;
-				default:
-				}
-			break;
-
-		case SeaMark.PREF_STARBOARD_HAND:
-			if (region != SeaMark.IALA_B)
-				switch (style) {
-				case LAT_CONE:
-					image += "_Cone_Green_Red_Green";
-					break;
-				case LAT_PILLAR:
-					image += "_Pillar_Green_Red_Green";
-					break;
-				case LAT_SPAR:
-					image += "_Spar_Green_Red_Green";
-					break;
-				case LAT_BEACON:
-					image += "_Beacon_Green_Red_Green";
-					break;
-				case LAT_TOWER:
-					image += "_Tower_Green_Red_Green";
-					break;
-				case LAT_FLOAT:
-					image += "_Float_Green_Red_Green";
-					break;
-				default:
-				}
-			else
-				switch (style) {
-				case LAT_CONE:
-					image += "_Cone_Red_Green_Red";
-					break;
-				case LAT_PILLAR:
-					image += "_Pillar_Red_Green_Red";
-					break;
-				case LAT_SPAR:
-					image += "_Spar_Red_Green_Red";
-					break;
-				case LAT_BEACON:
-					image += "_Beacon_Red_Green_Red";
-					break;
-				case LAT_TOWER:
-					image += "_Tower_Red_Green_Red";
-					break;
-				case LAT_FLOAT:
-					image += "_Float_Red_Green_Red";
-					break;
-				default:
-				}
-			break;
-
-		default:
-		}
-
-		if (image != "/images/Lateral") {
-
-			if (hasTopMark()) {
-				if (cat == PORT_HAND || cat == PREF_PORT_HAND)
-					image += "_Can";
-				else
-					image += "_Cone";
-			}
-
-			if (isFired())
-				image += "_Lit";
-			if (getLightChar() != "") {
-				String c;
-
-				c = getLightChar();
-				if (getLightGroup() != "")
-					c = c + "(" + getLightGroup() + ")";
-
-				dlg.cbM01Kennung.setSelectedItem(c);
-				if (dlg.cbM01Kennung.getSelectedItem().equals("Not set"))
-					c = "";
-			}
-
-			image += ".png";
-
-			dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(image)));
-		} else
-			dlg.lM01Icon01.setIcon(null);
-	}
-
-	public void saveSign() {
-		Node node = getNode();
-
-		if (node == null) {
-			return;
-		}
-
-		int cat = getBuoyIndex();
-		String shape = "";
-		String colour = "";
-
-		switch (cat) {
-
-		case PORT_HAND:
-			switch (getStyleIndex()) {
-			case LAT_CAN:
-				super.saveSign("buoy_lateral");
-				Main.main.undoRedo.add(new ChangePropertyCommand(node,
-						"seamark:buoy_lateral:shape", "can"));
-				break;
-			case LAT_PILLAR:
-				super.saveSign("buoy_lateral");
-				Main.main.undoRedo.add(new ChangePropertyCommand(node,
-						"seamark:buoy_lateral:shape", "pillar"));
-				break;
-			case LAT_SPAR:
-				super.saveSign("buoy_lateral");
-				Main.main.undoRedo.add(new ChangePropertyCommand(node,
-						"seamark:buoy_lateral:shape", "spar"));
-				break;
-			case LAT_BEACON:
-				super.saveSign("beacon_lateral");
-				break;
-			case LAT_TOWER:
-				super.saveSign("beacon_lateral");
-				Main.main.undoRedo.add(new ChangePropertyCommand(node,
-						"seamark:beacon_lateral:shape", "tower"));
-				break;
-			case LAT_FLOAT:
-				super.saveSign("light_float");
-				break;
-			case LAT_PERCH:
-				super.saveSign("buoy_lateral");
-				Main.main.undoRedo.add(new ChangePropertyCommand(node,
-						"seamark:buoy_lateral:shape", "perch"));
-				break;
-			default:
-			}
-			switch (getStyleIndex()) {
-			case LAT_CAN:
-			case LAT_PILLAR:
-			case LAT_SPAR:
-			case LAT_PERCH:
-				Main.main.undoRedo.add(new ChangePropertyCommand(node,
-						"seamark:buoy_lateral:category", "port"));
-				if (getRegion() != SeaMark.IALA_B) {
-					Main.main.undoRedo.add(new ChangePropertyCommand(node,
-							"seamark:buoy_lateral:colour", "red"));
-					colour = "red";
-				} else {
-					Main.main.undoRedo.add(new ChangePropertyCommand(node,
-							"seamark:buoy_lateral:colour", "green"));
-					colour = "green";
-				}
-				break;
-			case LAT_BEACON:
-			case LAT_TOWER:
-				Main.main.undoRedo.add(new ChangePropertyCommand(node,
-						"seamark:beacon_lateral:category", "port"));
-				if (getRegion() != SeaMark.IALA_B) {
-					Main.main.undoRedo.add(new ChangePropertyCommand(node,
-							"seamark:beacon_lateral:colour", "red"));
-					colour = "red";
-				} else {
-					Main.main.undoRedo.add(new ChangePropertyCommand(node,
-							"seamark:beacon_lateral:colour", "green"));
-					colour = "green";
-				}
-				break;
-			case LAT_FLOAT:
-				if (getRegion() != SeaMark.IALA_B) {
-					Main.main.undoRedo.add(new ChangePropertyCommand(node,
-							"seamark:light_float:colour", "red"));
-					colour = "red";
-				} else {
-					Main.main.undoRedo.add(new ChangePropertyCommand(node,
-							"seamark:light_float:colour", "green"));
-					colour = "green";
-				}
-				break;
-			}
-			shape = "cylinder";
-			break;
-
-		case PREF_PORT_HAND:
-			switch (getStyleIndex()) {
-			case LAT_CAN:
-				super.saveSign("buoy_lateral");
-				Main.main.undoRedo.add(new ChangePropertyCommand(node,
-						"seamark:buoy_lateral:shape", "can"));
-				break;
-			case LAT_PILLAR:
-				super.saveSign("buoy_lateral");
-				Main.main.undoRedo.add(new ChangePropertyCommand(node,
-						"seamark:buoy_lateral:shape", "pillar"));
-				break;
-			case LAT_SPAR:
-				super.saveSign("buoy_lateral");
-				Main.main.undoRedo.add(new ChangePropertyCommand(node,
-						"seamark:buoy_lateral:shape", "spar"));
-				break;
-			case LAT_BEACON:
-				super.saveSign("beacon_lateral");
-				break;
-			case LAT_TOWER:
-				super.saveSign("beacon_lateral");
-				Main.main.undoRedo.add(new ChangePropertyCommand(node,
-						"seamark:beacon_lateral:shape", "tower"));
-				break;
-			case LAT_FLOAT:
-				super.saveSign("light_float");
-				break;
-			default:
-			}
-			switch (getStyleIndex()) {
-			case LAT_CAN:
-			case LAT_PILLAR:
-			case LAT_SPAR:
-				Main.main.undoRedo.add(new ChangePropertyCommand(node,
-						"seamark:buoy_lateral:category", "preferred_channel_port"));
-				Main.main.undoRedo.add(new ChangePropertyCommand(node,
-						"seamark:buoy_lateral:colour_pattern", "horizontal stripes"));
-				if (getRegion() != SeaMark.IALA_B) {
-					Main.main.undoRedo.add(new ChangePropertyCommand(node,
-							"seamark:buoy_lateral:colour", "red;green;red"));
-					colour = "red";
-				} else {
-					Main.main.undoRedo.add(new ChangePropertyCommand(node,
-							"seamark:buoy_lateral:colour", "green;red;green"));
-					colour = "green";
-				}
-				break;
-			case LAT_BEACON:
-			case LAT_TOWER:
-				Main.main.undoRedo.add(new ChangePropertyCommand(node,
-						"seamark:beacon_lateral:category", "preferred_channel_port"));
-				Main.main.undoRedo.add(new ChangePropertyCommand(node,
-						"seamark:beacon_lateral:colour_pattern", "horizontal stripes"));
-				if (getRegion() != SeaMark.IALA_B) {
-					Main.main.undoRedo.add(new ChangePropertyCommand(node,
-							"seamark:beacon_lateral:colour", "red;green;red"));
-					colour = "red";
-				} else {
-					Main.main.undoRedo.add(new ChangePropertyCommand(node,
-							"seamark:beacon_lateral:colour", "green;red;green"));
-					colour = "green";
-				}
-				break;
-			case LAT_FLOAT:
-				Main.main.undoRedo.add(new ChangePropertyCommand(node,
-						"seamark:light_float:colour_pattern", "horizontal stripes"));
-				if (getRegion() != SeaMark.IALA_B) {
-					Main.main.undoRedo.add(new ChangePropertyCommand(node,
-							"seamark:light_float:colour", "red;green;red"));
-					colour = "red";
-				} else {
-					Main.main.undoRedo.add(new ChangePropertyCommand(node,
-							"seamark:light_float:colour", "green;red;green"));
-					colour = "green";
-				}
-				break;
-			}
-			shape = "cylinder";
-			break;
-
-		case STARBOARD_HAND:
-			switch (getStyleIndex()) {
-			case LAT_CONE:
-				super.saveSign("buoy_lateral");
-				Main.main.undoRedo.add(new ChangePropertyCommand(node,
-						"seamark:buoy_lateral:shape", "conical"));
-				break;
-			case LAT_PILLAR:
-				super.saveSign("buoy_lateral");
-				Main.main.undoRedo.add(new ChangePropertyCommand(node,
-						"seamark:buoy_lateral:shape", "pillar"));
-				break;
-			case LAT_SPAR:
-				super.saveSign("buoy_lateral");
-				Main.main.undoRedo.add(new ChangePropertyCommand(node,
-						"seamark:buoy_lateral:shape", "spar"));
-				break;
-			case LAT_BEACON:
-				super.saveSign("beacon_lateral");
-				Main.main.undoRedo.add(new ChangePropertyCommand(node,
-						"seamark:beacon_lateral:shape", "stake"));
-				break;
-			case LAT_TOWER:
-				super.saveSign("beacon_lateral");
-				Main.main.undoRedo.add(new ChangePropertyCommand(node,
-						"seamark:beacon_lateral:shape", "tower"));
-				break;
-			case LAT_FLOAT:
-				super.saveSign("light_float");
-				break;
-			case LAT_PERCH:
-				super.saveSign("buoy_lateral");
-				Main.main.undoRedo.add(new ChangePropertyCommand(node,
-						"seamark:buoy_lateral:shape", "perch"));
-				break;
-			default:
-			}
-			switch (getStyleIndex()) {
-			case LAT_CAN:
-			case LAT_PILLAR:
-			case LAT_SPAR:
-				Main.main.undoRedo.add(new ChangePropertyCommand(node,
-						"seamark:buoy_lateral:category", "starboard"));
-				if (getRegion() != SeaMark.IALA_B) {
-					Main.main.undoRedo.add(new ChangePropertyCommand(node,
-							"seamark:buoy_lateral:colour", "green"));
-					colour = "green";
-				} else {
-					Main.main.undoRedo.add(new ChangePropertyCommand(node,
-							"seamark:buoy_lateral:colour", "red"));
-					colour = "red";
-				}
-				break;
-			case LAT_BEACON:
-			case LAT_TOWER:
-				Main.main.undoRedo.add(new ChangePropertyCommand(node,
-						"seamark:beacon_lateral:category", "starboard"));
-				if (getRegion() != SeaMark.IALA_B) {
-					Main.main.undoRedo.add(new ChangePropertyCommand(node,
-							"seamark:beacon_lateral:colour", "green"));
-					colour = "green";
-				} else {
-					Main.main.undoRedo.add(new ChangePropertyCommand(node,
-							"seamark:beacon_lateral:colour", "red"));
-					colour = "red";
-				}
-				break;
-			case LAT_FLOAT:
-				if (getRegion() != SeaMark.IALA_B) {
-					Main.main.undoRedo.add(new ChangePropertyCommand(node,
-							"seamark:light_float:colour", "green"));
-					colour = "green";
-				} else {
-					Main.main.undoRedo.add(new ChangePropertyCommand(node,
-							"seamark:light_float:colour", "red"));
-					colour = "red";
-				}
-				break;
-			}
-			shape = "cone, point up";
-			break;
-
-		case PREF_STARBOARD_HAND:
-			switch (getStyleIndex()) {
-			case LAT_CONE:
-				super.saveSign("buoy_lateral");
-				Main.main.undoRedo.add(new ChangePropertyCommand(node,
-						"seamark:buoy_lateral:shape", "conical"));
-				break;
-			case LAT_PILLAR:
-				super.saveSign("buoy_lateral");
-				Main.main.undoRedo.add(new ChangePropertyCommand(node,
-						"seamark:buoy_lateral:shape", "pillar"));
-				break;
-			case LAT_SPAR:
-				super.saveSign("buoy_lateral");
-				Main.main.undoRedo.add(new ChangePropertyCommand(node,
-						"seamark:buoy_lateral:shape", "spar"));
-				break;
-			case LAT_BEACON:
-				super.saveSign("beacon_lateral");
-				Main.main.undoRedo.add(new ChangePropertyCommand(node,
-						"seamark:beacon_lateral:shape", "stake"));
-				break;
-			case LAT_TOWER:
-				super.saveSign("beacon_lateral");
-				Main.main.undoRedo.add(new ChangePropertyCommand(node,
-						"seamark:beacon_lateral:shape", "tower"));
-				break;
-			case LAT_FLOAT:
-				super.saveSign("light_float");
-				break;
-			default:
-			}
-			switch (getStyleIndex()) {
-			case LAT_CAN:
-			case LAT_PILLAR:
-			case LAT_SPAR:
-				Main.main.undoRedo.add(new ChangePropertyCommand(node,
-						"seamark:buoy_lateral:category", "preferred_channel_starboard"));
-				Main.main.undoRedo.add(new ChangePropertyCommand(node,
-						"seamark:buoy_lateral:colour_pattern", "horizontal stripes"));
-				if (getRegion() != SeaMark.IALA_B) {
-					Main.main.undoRedo.add(new ChangePropertyCommand(node,
-							"seamark:buoy_lateral:colour", "green;red;green"));
-					colour = "green";
-				} else {
-					Main.main.undoRedo.add(new ChangePropertyCommand(node,
-							"seamark:buoy_lateral:colour", "red;green;red"));
-					colour = "red";
-				}
-				break;
-			case LAT_BEACON:
-			case LAT_TOWER:
-				Main.main.undoRedo.add(new ChangePropertyCommand(node,
-						"seamark:beacon_lateral:category", "preferred_channel_starboard"));
-				Main.main.undoRedo.add(new ChangePropertyCommand(node,
-						"seamark:beacon_lateral:colour_pattern", "horizontal stripes"));
-				if (getRegion() != SeaMark.IALA_B) {
-					Main.main.undoRedo.add(new ChangePropertyCommand(node,
-							"seamark:beacon_lateral:colour", "green;red;green"));
-					colour = "green";
-				} else {
-					Main.main.undoRedo.add(new ChangePropertyCommand(node,
-							"seamark:beacon_lateral:colour", "red;green;red"));
-					colour = "red";
-				}
-				break;
-			case LAT_FLOAT:
-				Main.main.undoRedo.add(new ChangePropertyCommand(node,
-						"seamark:light_float:colour_pattern", "horizontal stripes"));
-				if (getRegion() != SeaMark.IALA_B) {
-					Main.main.undoRedo.add(new ChangePropertyCommand(node,
-							"seamark:light_float:colour", "green;red;green"));
-					colour = "green";
-				} else {
-					Main.main.undoRedo.add(new ChangePropertyCommand(node,
-							"seamark:light_float:colour", "red;green;red"));
-					colour = "red";
-				}
-				break;
-			}
-			shape = "cone, point up";
-			break;
-
-		default:
-		}
-
-		saveTopMarkData(shape, colour);
-		saveLightData(colour);
-
-		Main.pref.put("tomsplugin.IALA", getRegion() ? "B" : "A");
-	}
-
-	public boolean parseTopMark(Node node) {
-		if (node == null) {
-			return false;
-		}
-
-		String str;
-		boolean ret = true;
-		Map<String, String> keys;
-
-		keys = node.getKeys();
-
-		if (keys.containsKey("seamark:topmark:shape")) {
-			str = keys.get("seamark:topmark:shape");
-
-			int cat = getBuoyIndex();
-			switch (cat) {
-			case PORT_HAND:
-			case PREF_PORT_HAND:
-				if (str.equals("cylinder")) {
-					setTopMark(true);
-					setRegion(IALA_A);
-				} else if (str.equals("cone, point up")) {
-					setTopMark(true);
-					setRegion(IALA_B);
-				} else {
-					setTopMark(false);
-					ret = false;
-				}
-				break;
-
-			case STARBOARD_HAND:
-			case PREF_STARBOARD_HAND:
-				if (str.equals("cone, point up")) {
-					setTopMark(true);
-					setRegion(IALA_A);
-				} else if (str.equals("cylinder")) {
-					setTopMark(true);
-					setRegion(IALA_B);
-				} else {
-					setTopMark(false);
-					ret = false;
-				}
-				break;
-
-			default:
-				ret = false;
-			}
-			if (!hasTopMark()) {
-				setErrMsg("Parse-Error: Invalid topmark");
-				ret = false;
-			}
-		}
-		return ret;
-	}
-
-	public boolean parseLight(Node node) {
-		String str;
-		boolean ret = true;
-		Map<String, String> keys;
-
-		setFired(false);
-
-		keys = node.getKeys();
-
-		if (keys.containsKey("seamark:light:colour")) {
-			str = keys.get("seamark:light:colour");
-
-			if (keys.containsKey("seamark:light:character")) {
-				setLightGroup(keys);
-				String c = keys.get("seamark:light:character");
-				setLightChar(c);
-				setLightPeriod(keys);
-			}
-
-			setLightColour(str);
-
-			if (isFired()) {
-
-			} else {
-				if (getErrMsg() == null)
-					setErrMsg("Parse-Error: Invalid light");
-				else
-					setErrMsg(getErrMsg() + " / Invalid light");
-			}
-
-		}
-
-		return ret;
-	}
-
-	public void setLightColour() {
-		if (getRegion() == IALA_A
-				&& (getBuoyIndex() == PORT_HAND || getBuoyIndex() == PREF_PORT_HAND)) {
-			super.setLightColour("R");
-		} else {
-			super.setLightColour("G");
-		}
-	}
-
-	public void setLightColour(String str) {
-		int cat = getBuoyIndex();
-
-		if (str == null) {
-			return;
-		}
-
-		switch (cat) {
-		case PORT_HAND:
-		case PREF_PORT_HAND:
-			if (getRegion() == IALA_A) {
-				if (str.equals("red")) {
-					setFired(true);
-					super.setLightColour("R");
-				} else {
-					super.setLightColour("");
-				}
-			} else {
-				if (str.equals("green")) {
-					setFired(true);
-					super.setLightColour("G");
-				} else {
-					super.setLightColour("");
-				}
-			}
-			break;
-
-		case STARBOARD_HAND:
-		case PREF_STARBOARD_HAND:
-			if (getRegion() == IALA_A) {
-				if (str.equals("green")) {
-					setFired(true);
-					super.setLightColour("G");
-				} else {
-					super.setLightColour("");
-				}
-			} else {
-				if (str.equals("red")) {
-					setFired(true);
-					super.setLightColour("R");
-				} else {
-					super.setLightColour("");
-				}
-			}
-			break;
-
-		default:
-		}
-
-	}
-
-	public boolean parseShape(Node node) {
-		String str;
-		boolean ret = true;
-		Map<String, String> keys;
-
-		keys = node.getKeys();
 
 		if (keys.containsKey("seamark:buoy_lateral:shape")) {
 			str = keys.get("seamark:buoy_lateral:shape");
 
-			int cat = getBuoyIndex();
-			switch (cat) {
+			switch (getBuoyIndex()) {
 			case PORT_HAND:
 				if (str.compareTo("can") == 0)
@@ -872,6 +181,4 @@
 				else if (str.compareTo("spar") == 0)
 					setStyleIndex(LAT_SPAR);
-				else
-					ret = false;
 				break;
 
@@ -883,6 +190,4 @@
 				else if (str.compareTo("spar") == 0)
 					setStyleIndex(LAT_SPAR);
-				else
-					ret = false;
 				break;
 
@@ -894,6 +199,4 @@
 				else if (str.compareTo("spar") == 0)
 					setStyleIndex(LAT_SPAR);
-				else
-					ret = false;
 				break;
 
@@ -905,10 +208,5 @@
 				else if (str.compareTo("spar") == 0)
 					setStyleIndex(LAT_SPAR);
-				else
-					ret = false;
-				break;
-
-			default:
-				ret = false;
+				break;
 			}
 		} else if (keys.containsKey("seamark:beacon_lateral:colour")) {
@@ -925,5 +223,765 @@
 			setStyleIndex(LAT_FLOAT);
 		}
-		return ret;
+
+		if (keys.containsKey("seamark:topmark:shape")) {
+			str = keys.get("seamark:topmark:shape");
+
+			switch (getBuoyIndex()) {
+			case PORT_HAND:
+			case PREF_PORT_HAND:
+				if (str.equals("cylinder")) {
+					setTopMark(true);
+					setRegion(IALA_A);
+				} else if (str.equals("cone, point up")) {
+					setTopMark(true);
+					setRegion(IALA_B);
+				} else {
+					setTopMark(false);
+				}
+				break;
+
+			case STARBOARD_HAND:
+			case PREF_STARBOARD_HAND:
+				if (str.equals("cone, point up")) {
+					setTopMark(true);
+					setRegion(IALA_A);
+				} else if (str.equals("cylinder")) {
+					setTopMark(true);
+					setRegion(IALA_B);
+				} else {
+					setTopMark(false);
+				}
+				break;
+			}
+		}
+
+		if (keys.containsKey("seamark:light:colour")) {
+			setLightColour(keys.get("seamark:light:colour"));
+			setFired(true);
+		}
+
+		if (keys.containsKey("seamark:light:character")) {
+			setLightGroup(keys);
+			setLightChar(keys.get("seamark:light:character"));
+			setLightPeriod(keys);
+		}
+
+		paintSign();
 	}
+
+	public void refreshStyles() {
+		int type = getBuoyIndex();
+		int style = getStyleIndex();
+
+		dlg.cbM01StyleOfMark.removeAllItems();
+		dlg.cbM01StyleOfMark.addItem("Not set");
+
+		switch (type) {
+		case PORT_HAND:
+			dlg.cbM01StyleOfMark.addItem("Can Buoy");
+			dlg.cbM01StyleOfMark.addItem("Pillar Buoy");
+			dlg.cbM01StyleOfMark.addItem("Spar Buoy");
+			dlg.cbM01StyleOfMark.addItem("Beacon");
+			dlg.cbM01StyleOfMark.addItem("Tower");
+			dlg.cbM01StyleOfMark.addItem("Float");
+			dlg.cbM01StyleOfMark.addItem("Perch");
+			break;
+
+		case STARBOARD_HAND:
+			dlg.cbM01StyleOfMark.addItem("Cone Buoy");
+			dlg.cbM01StyleOfMark.addItem("Pillar Buoy");
+			dlg.cbM01StyleOfMark.addItem("Spar Buoy");
+			dlg.cbM01StyleOfMark.addItem("Beacon");
+			dlg.cbM01StyleOfMark.addItem("Tower");
+			dlg.cbM01StyleOfMark.addItem("Float");
+			dlg.cbM01StyleOfMark.addItem("Perch");
+			break;
+
+		case PREF_PORT_HAND:
+			dlg.cbM01StyleOfMark.addItem("Can Buoy");
+			dlg.cbM01StyleOfMark.addItem("Pillar Buoy");
+			dlg.cbM01StyleOfMark.addItem("Spar Buoy");
+			dlg.cbM01StyleOfMark.addItem("Beacon");
+			dlg.cbM01StyleOfMark.addItem("Tower");
+			dlg.cbM01StyleOfMark.addItem("Float");
+			break;
+
+		case PREF_STARBOARD_HAND:
+			dlg.cbM01StyleOfMark.addItem("Cone Buoy");
+			dlg.cbM01StyleOfMark.addItem("Pillar Buoy");
+			dlg.cbM01StyleOfMark.addItem("Spar Buoy");
+			dlg.cbM01StyleOfMark.addItem("Beacon");
+			dlg.cbM01StyleOfMark.addItem("Tower");
+			dlg.cbM01StyleOfMark.addItem("Float");
+			break;
+
+		default:
+		}
+
+		if (style >= dlg.cbM01StyleOfMark.getItemCount())
+			style = 0;
+		setStyleIndex(style);
+		dlg.cbM01StyleOfMark.setSelectedIndex(style);
+
+	}
+
+	public void paintSign() {
+		super.paintSign();
+
+		dlg.sM01StatusBar.setText(getErrMsg());
+
+		dlg.tfM01Name.setEnabled(true);
+		dlg.tfM01Name.setText(getName());
+		dlg.cM01Fired.setEnabled(true);
+		dlg.cM01TopMark.setEnabled(true);
+
+		String image = "/images/Lateral";
+
+		int cat = getBuoyIndex();
+		boolean region = getRegion();
+		int style = getStyleIndex();
+
+		switch (getBuoyIndex()) {
+		case SeaMark.PORT_HAND:
+			if (region != SeaMark.IALA_B)
+				switch (style) {
+				case LAT_CAN:
+					image += "_Can_Red";
+					break;
+				case LAT_PILLAR:
+					image += "_Pillar_Red";
+					break;
+				case LAT_SPAR:
+					image += "_Spar_Red";
+					break;
+				case LAT_BEACON:
+					image += "_Beacon_Red";
+					break;
+				case LAT_TOWER:
+					image += "_Tower_Red";
+					break;
+				case LAT_FLOAT:
+					image += "_Float_Red";
+					break;
+				case LAT_PERCH:
+					image += "_Perch_Port";
+					break;
+				default:
+				}
+			else
+				switch (style) {
+				case LAT_CAN:
+					image += "_Can_Green";
+					break;
+				case LAT_PILLAR:
+					image += "_Pillar_Green";
+					break;
+				case LAT_SPAR:
+					image += "_Spar_Green";
+					break;
+				case LAT_BEACON:
+					image += "_Beacon_Green";
+					break;
+				case LAT_TOWER:
+					image += "_Tower_Green";
+					break;
+				case LAT_FLOAT:
+					image += "_Float_Green";
+					break;
+				case LAT_PERCH:
+					image += "_Perch_Port";
+					break;
+				default:
+				}
+			break;
+
+		case SeaMark.STARBOARD_HAND:
+			if (region != SeaMark.IALA_B)
+				switch (style) {
+				case LAT_CONE:
+					image += "_Cone_Green";
+					break;
+				case LAT_PILLAR:
+					image += "_Pillar_Green";
+					break;
+				case LAT_SPAR:
+					image += "_Spar_Green";
+					break;
+				case LAT_BEACON:
+					image += "_Beacon_Green";
+					break;
+				case LAT_TOWER:
+					image += "_Tower_Green";
+					break;
+				case LAT_FLOAT:
+					image += "_Float_Green";
+					break;
+				case LAT_PERCH:
+					image += "_Perch_Starboard";
+					break;
+				default:
+				}
+			else
+				switch (style) {
+				case LAT_CONE:
+					image += "_Cone_Red";
+					break;
+				case LAT_PILLAR:
+					image += "_Pillar_Red";
+					break;
+				case LAT_SPAR:
+					image += "_Spar_Red";
+					break;
+				case LAT_BEACON:
+					image += "_Beacon_Red";
+					break;
+				case LAT_TOWER:
+					image += "_Tower_Red";
+					break;
+				case LAT_FLOAT:
+					image += "_Float_Red";
+					break;
+				case LAT_PERCH:
+					image += "_Perch_Starboard";
+					break;
+				default:
+				}
+			break;
+
+		case SeaMark.PREF_PORT_HAND:
+			if (region != SeaMark.IALA_B)
+				switch (style) {
+				case LAT_CAN:
+					image += "_Can_Red_Green_Red";
+					break;
+				case LAT_PILLAR:
+					image += "_Pillar_Red_Green_Red";
+					break;
+				case LAT_SPAR:
+					image += "_Spar_Red_Green_Red";
+					break;
+				case LAT_BEACON:
+					image += "_Beacon_Red_Green_Red";
+					break;
+				case LAT_TOWER:
+					image += "_Tower_Red_Green_Red";
+					break;
+				case LAT_FLOAT:
+					image += "_Float_Red_Green_Red";
+					break;
+				default:
+				}
+			else
+				switch (style) {
+				case LAT_CAN:
+					image += "_Can_Green_Red_Green";
+					break;
+				case LAT_PILLAR:
+					image += "_Pillar_Green_Red_Green";
+					break;
+				case LAT_SPAR:
+					image += "_Spar_Green_Red_Green";
+					break;
+				case LAT_BEACON:
+					image += "_Beacon_Green_Red_Green";
+					break;
+				case LAT_TOWER:
+					image += "_Tower_Green_Red_Green";
+					break;
+				case LAT_FLOAT:
+					image += "_Float_Green_Red_Green";
+					break;
+				default:
+				}
+			break;
+
+		case SeaMark.PREF_STARBOARD_HAND:
+			if (region != SeaMark.IALA_B)
+				switch (style) {
+				case LAT_CONE:
+					image += "_Cone_Green_Red_Green";
+					break;
+				case LAT_PILLAR:
+					image += "_Pillar_Green_Red_Green";
+					break;
+				case LAT_SPAR:
+					image += "_Spar_Green_Red_Green";
+					break;
+				case LAT_BEACON:
+					image += "_Beacon_Green_Red_Green";
+					break;
+				case LAT_TOWER:
+					image += "_Tower_Green_Red_Green";
+					break;
+				case LAT_FLOAT:
+					image += "_Float_Green_Red_Green";
+					break;
+				default:
+				}
+			else
+				switch (style) {
+				case LAT_CONE:
+					image += "_Cone_Red_Green_Red";
+					break;
+				case LAT_PILLAR:
+					image += "_Pillar_Red_Green_Red";
+					break;
+				case LAT_SPAR:
+					image += "_Spar_Red_Green_Red";
+					break;
+				case LAT_BEACON:
+					image += "_Beacon_Red_Green_Red";
+					break;
+				case LAT_TOWER:
+					image += "_Tower_Red_Green_Red";
+					break;
+				case LAT_FLOAT:
+					image += "_Float_Red_Green_Red";
+					break;
+				default:
+				}
+			break;
+
+		default:
+		}
+
+		if (!image.equals("/images/Lateral")) {
+
+			if (hasTopMark()) {
+				if (cat == PORT_HAND || cat == PREF_PORT_HAND)
+					image += "_Can";
+				else
+					image += "_Cone";
+			}
+
+			if (isFired())
+				image += "_Lit";
+			if (getLightChar() != "") {
+				String c;
+
+				c = getLightChar();
+				if (getLightGroup() != "")
+					c = c + "(" + getLightGroup() + ")";
+
+				dlg.cbM01Kennung.setSelectedItem(c);
+				if (dlg.cbM01Kennung.getSelectedItem().equals("Not set"))
+					c = "";
+			}
+
+			image += ".png";
+
+			dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(image)));
+		} else
+			dlg.lM01Icon01.setIcon(null);
+	}
+
+	public void saveSign() {
+		Node node = getNode();
+
+		if (node == null) {
+			return;
+		}
+
+		int cat = getBuoyIndex();
+		String shape = "";
+		String colour = "";
+
+		switch (cat) {
+
+		case PORT_HAND:
+			switch (getStyleIndex()) {
+			case LAT_CAN:
+				super.saveSign("buoy_lateral");
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_lateral:shape", "can"));
+				break;
+			case LAT_PILLAR:
+				super.saveSign("buoy_lateral");
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_lateral:shape", "pillar"));
+				break;
+			case LAT_SPAR:
+				super.saveSign("buoy_lateral");
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_lateral:shape", "spar"));
+				break;
+			case LAT_BEACON:
+				super.saveSign("beacon_lateral");
+				break;
+			case LAT_TOWER:
+				super.saveSign("beacon_lateral");
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:beacon_lateral:shape", "tower"));
+				break;
+			case LAT_FLOAT:
+				super.saveSign("light_float");
+				break;
+			case LAT_PERCH:
+				super.saveSign("buoy_lateral");
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_lateral:shape", "perch"));
+				break;
+			default:
+			}
+			switch (getStyleIndex()) {
+			case LAT_CAN:
+			case LAT_PILLAR:
+			case LAT_SPAR:
+			case LAT_PERCH:
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_lateral:category", "port"));
+				if (getRegion() != SeaMark.IALA_B) {
+					Main.main.undoRedo.add(new ChangePropertyCommand(node,
+							"seamark:buoy_lateral:colour", "red"));
+					colour = "red";
+				} else {
+					Main.main.undoRedo.add(new ChangePropertyCommand(node,
+							"seamark:buoy_lateral:colour", "green"));
+					colour = "green";
+				}
+				break;
+			case LAT_BEACON:
+			case LAT_TOWER:
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:beacon_lateral:category", "port"));
+				if (getRegion() != SeaMark.IALA_B) {
+					Main.main.undoRedo.add(new ChangePropertyCommand(node,
+							"seamark:beacon_lateral:colour", "red"));
+					colour = "red";
+				} else {
+					Main.main.undoRedo.add(new ChangePropertyCommand(node,
+							"seamark:beacon_lateral:colour", "green"));
+					colour = "green";
+				}
+				break;
+			case LAT_FLOAT:
+				if (getRegion() != SeaMark.IALA_B) {
+					Main.main.undoRedo.add(new ChangePropertyCommand(node,
+							"seamark:light_float:colour", "red"));
+					colour = "red";
+				} else {
+					Main.main.undoRedo.add(new ChangePropertyCommand(node,
+							"seamark:light_float:colour", "green"));
+					colour = "green";
+				}
+				break;
+			}
+			shape = "cylinder";
+			break;
+
+		case PREF_PORT_HAND:
+			switch (getStyleIndex()) {
+			case LAT_CAN:
+				super.saveSign("buoy_lateral");
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_lateral:shape", "can"));
+				break;
+			case LAT_PILLAR:
+				super.saveSign("buoy_lateral");
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_lateral:shape", "pillar"));
+				break;
+			case LAT_SPAR:
+				super.saveSign("buoy_lateral");
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_lateral:shape", "spar"));
+				break;
+			case LAT_BEACON:
+				super.saveSign("beacon_lateral");
+				break;
+			case LAT_TOWER:
+				super.saveSign("beacon_lateral");
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:beacon_lateral:shape", "tower"));
+				break;
+			case LAT_FLOAT:
+				super.saveSign("light_float");
+				break;
+			default:
+			}
+			switch (getStyleIndex()) {
+			case LAT_CAN:
+			case LAT_PILLAR:
+			case LAT_SPAR:
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_lateral:category", "preferred_channel_port"));
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_lateral:colour_pattern", "horizontal stripes"));
+				if (getRegion() != SeaMark.IALA_B) {
+					Main.main.undoRedo.add(new ChangePropertyCommand(node,
+							"seamark:buoy_lateral:colour", "red;green;red"));
+					colour = "red";
+				} else {
+					Main.main.undoRedo.add(new ChangePropertyCommand(node,
+							"seamark:buoy_lateral:colour", "green;red;green"));
+					colour = "green";
+				}
+				break;
+			case LAT_BEACON:
+			case LAT_TOWER:
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:beacon_lateral:category", "preferred_channel_port"));
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:beacon_lateral:colour_pattern", "horizontal stripes"));
+				if (getRegion() != SeaMark.IALA_B) {
+					Main.main.undoRedo.add(new ChangePropertyCommand(node,
+							"seamark:beacon_lateral:colour", "red;green;red"));
+					colour = "red";
+				} else {
+					Main.main.undoRedo.add(new ChangePropertyCommand(node,
+							"seamark:beacon_lateral:colour", "green;red;green"));
+					colour = "green";
+				}
+				break;
+			case LAT_FLOAT:
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:light_float:colour_pattern", "horizontal stripes"));
+				if (getRegion() != SeaMark.IALA_B) {
+					Main.main.undoRedo.add(new ChangePropertyCommand(node,
+							"seamark:light_float:colour", "red;green;red"));
+					colour = "red";
+				} else {
+					Main.main.undoRedo.add(new ChangePropertyCommand(node,
+							"seamark:light_float:colour", "green;red;green"));
+					colour = "green";
+				}
+				break;
+			}
+			shape = "cylinder";
+			break;
+
+		case STARBOARD_HAND:
+			switch (getStyleIndex()) {
+			case LAT_CONE:
+				super.saveSign("buoy_lateral");
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_lateral:shape", "conical"));
+				break;
+			case LAT_PILLAR:
+				super.saveSign("buoy_lateral");
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_lateral:shape", "pillar"));
+				break;
+			case LAT_SPAR:
+				super.saveSign("buoy_lateral");
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_lateral:shape", "spar"));
+				break;
+			case LAT_BEACON:
+				super.saveSign("beacon_lateral");
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:beacon_lateral:shape", "stake"));
+				break;
+			case LAT_TOWER:
+				super.saveSign("beacon_lateral");
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:beacon_lateral:shape", "tower"));
+				break;
+			case LAT_FLOAT:
+				super.saveSign("light_float");
+				break;
+			case LAT_PERCH:
+				super.saveSign("buoy_lateral");
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_lateral:shape", "perch"));
+				break;
+			default:
+			}
+			switch (getStyleIndex()) {
+			case LAT_CAN:
+			case LAT_PILLAR:
+			case LAT_SPAR:
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_lateral:category", "starboard"));
+				if (getRegion() != SeaMark.IALA_B) {
+					Main.main.undoRedo.add(new ChangePropertyCommand(node,
+							"seamark:buoy_lateral:colour", "green"));
+					colour = "green";
+				} else {
+					Main.main.undoRedo.add(new ChangePropertyCommand(node,
+							"seamark:buoy_lateral:colour", "red"));
+					colour = "red";
+				}
+				break;
+			case LAT_BEACON:
+			case LAT_TOWER:
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:beacon_lateral:category", "starboard"));
+				if (getRegion() != SeaMark.IALA_B) {
+					Main.main.undoRedo.add(new ChangePropertyCommand(node,
+							"seamark:beacon_lateral:colour", "green"));
+					colour = "green";
+				} else {
+					Main.main.undoRedo.add(new ChangePropertyCommand(node,
+							"seamark:beacon_lateral:colour", "red"));
+					colour = "red";
+				}
+				break;
+			case LAT_FLOAT:
+				if (getRegion() != SeaMark.IALA_B) {
+					Main.main.undoRedo.add(new ChangePropertyCommand(node,
+							"seamark:light_float:colour", "green"));
+					colour = "green";
+				} else {
+					Main.main.undoRedo.add(new ChangePropertyCommand(node,
+							"seamark:light_float:colour", "red"));
+					colour = "red";
+				}
+				break;
+			}
+			shape = "cone, point up";
+			break;
+
+		case PREF_STARBOARD_HAND:
+			switch (getStyleIndex()) {
+			case LAT_CONE:
+				super.saveSign("buoy_lateral");
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_lateral:shape", "conical"));
+				break;
+			case LAT_PILLAR:
+				super.saveSign("buoy_lateral");
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_lateral:shape", "pillar"));
+				break;
+			case LAT_SPAR:
+				super.saveSign("buoy_lateral");
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_lateral:shape", "spar"));
+				break;
+			case LAT_BEACON:
+				super.saveSign("beacon_lateral");
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:beacon_lateral:shape", "stake"));
+				break;
+			case LAT_TOWER:
+				super.saveSign("beacon_lateral");
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:beacon_lateral:shape", "tower"));
+				break;
+			case LAT_FLOAT:
+				super.saveSign("light_float");
+				break;
+			default:
+			}
+			switch (getStyleIndex()) {
+			case LAT_CAN:
+			case LAT_PILLAR:
+			case LAT_SPAR:
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_lateral:category", "preferred_channel_starboard"));
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_lateral:colour_pattern", "horizontal stripes"));
+				if (getRegion() != SeaMark.IALA_B) {
+					Main.main.undoRedo.add(new ChangePropertyCommand(node,
+							"seamark:buoy_lateral:colour", "green;red;green"));
+					colour = "green";
+				} else {
+					Main.main.undoRedo.add(new ChangePropertyCommand(node,
+							"seamark:buoy_lateral:colour", "red;green;red"));
+					colour = "red";
+				}
+				break;
+			case LAT_BEACON:
+			case LAT_TOWER:
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:beacon_lateral:category", "preferred_channel_starboard"));
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:beacon_lateral:colour_pattern", "horizontal stripes"));
+				if (getRegion() != SeaMark.IALA_B) {
+					Main.main.undoRedo.add(new ChangePropertyCommand(node,
+							"seamark:beacon_lateral:colour", "green;red;green"));
+					colour = "green";
+				} else {
+					Main.main.undoRedo.add(new ChangePropertyCommand(node,
+							"seamark:beacon_lateral:colour", "red;green;red"));
+					colour = "red";
+				}
+				break;
+			case LAT_FLOAT:
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:light_float:colour_pattern", "horizontal stripes"));
+				if (getRegion() != SeaMark.IALA_B) {
+					Main.main.undoRedo.add(new ChangePropertyCommand(node,
+							"seamark:light_float:colour", "green;red;green"));
+					colour = "green";
+				} else {
+					Main.main.undoRedo.add(new ChangePropertyCommand(node,
+							"seamark:light_float:colour", "red;green;red"));
+					colour = "red";
+				}
+				break;
+			}
+			shape = "cone, point up";
+			break;
+
+		default:
+		}
+
+		saveTopMarkData(shape, colour);
+		saveLightData(colour);
+
+		Main.pref.put("tomsplugin.IALA", getRegion() ? "B" : "A");
+	}
+
+	public void setLightColour() {
+		if (getRegion() == IALA_A
+				&& (getBuoyIndex() == PORT_HAND || getBuoyIndex() == PREF_PORT_HAND)) {
+			super.setLightColour("R");
+		} else {
+			super.setLightColour("G");
+		}
+	}
+
+	public void setLightColour(String str) {
+		int cat = getBuoyIndex();
+
+		if (str == null) {
+			return;
+		}
+
+		switch (cat) {
+		case PORT_HAND:
+		case PREF_PORT_HAND:
+			if (getRegion() == IALA_A) {
+				if (str.equals("red")) {
+					setFired(true);
+					super.setLightColour("R");
+				} else {
+					super.setLightColour("");
+				}
+			} else {
+				if (str.equals("green")) {
+					setFired(true);
+					super.setLightColour("G");
+				} else {
+					super.setLightColour("");
+				}
+			}
+			break;
+
+		case STARBOARD_HAND:
+		case PREF_STARBOARD_HAND:
+			if (getRegion() == IALA_A) {
+				if (str.equals("green")) {
+					setFired(true);
+					super.setLightColour("G");
+				} else {
+					super.setLightColour("");
+				}
+			} else {
+				if (str.equals("red")) {
+					setFired(true);
+					super.setLightColour("R");
+				} else {
+					super.setLightColour("");
+				}
+			}
+			break;
+
+		default:
+		}
+
+	}
+
 }
Index: applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoySaw.java
===================================================================
--- applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoySaw.java	(revision 22721)
+++ applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoySaw.java	(revision 22722)
@@ -16,6 +16,11 @@
 
 public class BuoySaw extends Buoy {
-	public BuoySaw(SmpDialogAction dia, int type) {
+	public BuoySaw(SmpDialogAction dia,  Node node) {
 		super(dia);
+
+		String str;
+		Map<String, String> keys;
+		keys = node.getKeys();
+		setNode(node);
 
 		dlg.cbM01StyleOfMark.removeAllItems();
@@ -40,161 +45,23 @@
 		setColour(SeaMark.RED_WHITE);
 		setLightColour("W");
-		setBuoyIndex(type);
-
-		paintSign();
-	}
-
-	public void paintSign() {
-		super.paintSign();
-
-		dlg.sM01StatusBar.setText(getErrMsg());
-
-		dlg.tfM01Name.setEnabled(true);
-		dlg.tfM01Name.setText(getName());
-		dlg.cM01Fired.setEnabled(true);
-		dlg.cM01TopMark.setEnabled(true);
-
-		String image = "/images/Safe_Water";
-
-		switch (getStyleIndex()) {
-		case SAFE_PILLAR:
-			image += "_Pillar";
-			break;
-		case SAFE_SPAR:
-			image += "_Spar";
-			break;
-		case SAFE_SPHERE:
-			image += "_Sphere";
-			break;
-		case SAFE_BEACON:
-			image += "_Beacon";
-			break;
-		case SAFE_FLOAT:
-			image += "_Float";
-			break;
-		default:
-		}
-
-		if (image != "/images/Safe_Water") {
-
-			if (hasTopMark())
-				image += "_Sphere";
-
-			if (isFired()) {
-				image += "_Lit";
-				if (getLightChar() != "") {
-					String c;
-
-					c = getLightChar();
-
-					dlg.cbM01Kennung.setSelectedItem(c);
-					if (dlg.cbM01Kennung.getSelectedItem().equals("Not set"))
-						c = "";
-				}
-			}
-			image += ".png";
-
-			dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(image)));
-		} else
-			dlg.lM01Icon01.setIcon(null);
-	}
-
-	public void saveSign() {
-		Node node = getNode();
-
-		if (node == null) {
-			return;
-		}
-
-		switch (getStyleIndex()) {
-		case SAFE_PILLAR:
-			super.saveSign("buoy_safe_water");
-			Main.main.undoRedo.add(new ChangePropertyCommand(node,
-					"seamark:buoy_safe_water:shape", "pillar"));
-			break;
-		case SAFE_SPAR:
-			super.saveSign("buoy_safe_water");
-			Main.main.undoRedo.add(new ChangePropertyCommand(node,
-					"seamark:buoy_safe_water:shape", "spar"));
-			break;
-		case SAFE_SPHERE:
-			super.saveSign("buoy_safe_water");
-			Main.main.undoRedo.add(new ChangePropertyCommand(node,
-					"seamark:buoy_safe_water:shape", "sphere"));
-			break;
-		case SAFE_BEACON:
-			super.saveSign("beacon_safe_water");
-			break;
-		case SAFE_FLOAT:
-			super.saveSign("light_float");
-			break;
-		default:
-		}
-
-		switch (getStyleIndex()) {
-		case SAFE_PILLAR:
-		case SAFE_SPAR:
-		case SAFE_SPHERE:
-			Main.main.undoRedo.add(new ChangePropertyCommand(node,
-					"seamark:buoy_safe_water:colour_pattern", "vertical stripes"));
-			Main.main.undoRedo.add(new ChangePropertyCommand(node,
-					"seamark:buoy_safe_water:colour", "red;white"));
-			break;
-		case SAFE_BEACON:
-			Main.main.undoRedo.add(new ChangePropertyCommand(node,
-					"seamark:beacon_safe_water:colour_pattern", "vertical stripes"));
-			Main.main.undoRedo.add(new ChangePropertyCommand(node,
-					"seamark:beacon_safe_water:colour", "red;white"));
-			break;
-		case SAFE_FLOAT:
-			Main.main.undoRedo.add(new ChangePropertyCommand(node,
-					"seamark:light_float:colour_pattern", "vertical stripes"));
-			Main.main.undoRedo.add(new ChangePropertyCommand(node,
-					"seamark:light_float:colour", "red;white"));
-			break;
-		default:
-		}
-
-		saveTopMarkData("spherical", "red");
-
-		saveLightData("white");
-
-	}
-
-	public boolean parseTopMark(Node node) {
-		if (node == null) {
-			return false;
-		}
-
-		String str;
-		boolean ret = true;
-		Map<String, String> keys;
-
-		setTopMark(false);
-
-		keys = node.getKeys();
-		if (keys.containsKey("seamark:topmark:shape")) {
-			str = keys.get("seamark:topmark:shape");
-
-			if (str.compareTo("spherical") == 0 || str.compareTo("sphere") == 0) {
-				setTopMark(true);
-
-			} else {
-				setErrMsg("Parse-Error: Unknown topmark");
-				ret = false;
-			}
-		}
-
-		return ret;
-	}
-
-	public boolean parseLight(Node node) {
-		String str;
-		boolean ret = true;
-		Map<String, String> keys;
-
-		setFired(false);
-
-		keys = node.getKeys();
+		setBuoyIndex(SAFE_WATER);
+
+		if (keys.containsKey("seamark:buoy_safe_water:shape")) {
+			str = keys.get("seamark:buoy_safe_water:shape");
+
+			if (str.equals("pillar"))
+				setStyleIndex(SAFE_PILLAR);
+			else if (str.equals("spar"))
+				setStyleIndex(SAFE_SPAR);
+			else if (str.equals("sphere"))
+				setStyleIndex(SAFE_SPHERE);
+		} else if ((keys.containsKey("seamark:type"))
+				&& (keys.get("seamark:type").equals("light_float"))) {
+			setStyleIndex(SAFE_FLOAT);
+		} else if ((keys.containsKey("seamark:type"))
+				&& (keys.get("seamark:type").equals("beacon_safe_water"))) {
+			setStyleIndex(SAFE_BEACON);
+		}
+
 		if (keys.containsKey("seamark:light:colour")) {
 			str = keys.get("seamark:light:colour");
@@ -209,20 +76,136 @@
 			}
 
-			if (str.compareTo("white") == 0) {
+			if (str.equals("white")) {
 				setFired(true);
 				setLightColour("W");
-
-			} else {
-				if (getErrMsg() == null)
-					setErrMsg("Parse-Error: Licht falsch");
-				else
-					setErrMsg(getErrMsg() + " / Licht falsch");
-
-				ret = false;
-			}
-
-		}
-
-		return ret;
+			}
+		}
+
+		if (keys.containsKey("seamark:topmark:shape")) {
+			str = keys.get("seamark:topmark:shape");
+
+			if (str.equals("spherical") || str.equals("sphere")) {
+				setTopMark(true);
+			}
+		}
+
+		paintSign();
+	}
+
+	public void paintSign() {
+		super.paintSign();
+
+		dlg.sM01StatusBar.setText(getErrMsg());
+
+		dlg.tfM01Name.setEnabled(true);
+		dlg.tfM01Name.setText(getName());
+		dlg.cM01Fired.setEnabled(true);
+		dlg.cM01TopMark.setEnabled(true);
+
+		String image = "/images/Safe_Water";
+
+		switch (getStyleIndex()) {
+		case SAFE_PILLAR:
+			image += "_Pillar";
+			break;
+		case SAFE_SPAR:
+			image += "_Spar";
+			break;
+		case SAFE_SPHERE:
+			image += "_Sphere";
+			break;
+		case SAFE_BEACON:
+			image += "_Beacon";
+			break;
+		case SAFE_FLOAT:
+			image += "_Float";
+			break;
+		default:
+		}
+
+		if (!image.equals("/images/Safe_Water")) {
+
+			if (hasTopMark())
+				image += "_Sphere";
+
+			if (isFired()) {
+				image += "_Lit";
+				if (getLightChar() != "") {
+					String c;
+
+					c = getLightChar();
+
+					dlg.cbM01Kennung.setSelectedItem(c);
+					if (dlg.cbM01Kennung.getSelectedItem().equals("Not set"))
+						c = "";
+				}
+			}
+			image += ".png";
+
+			dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(image)));
+		} else
+			dlg.lM01Icon01.setIcon(null);
+	}
+
+	public void saveSign() {
+		Node node = getNode();
+
+		if (node == null) {
+			return;
+		}
+
+		switch (getStyleIndex()) {
+		case SAFE_PILLAR:
+			super.saveSign("buoy_safe_water");
+			Main.main.undoRedo.add(new ChangePropertyCommand(node,
+					"seamark:buoy_safe_water:shape", "pillar"));
+			break;
+		case SAFE_SPAR:
+			super.saveSign("buoy_safe_water");
+			Main.main.undoRedo.add(new ChangePropertyCommand(node,
+					"seamark:buoy_safe_water:shape", "spar"));
+			break;
+		case SAFE_SPHERE:
+			super.saveSign("buoy_safe_water");
+			Main.main.undoRedo.add(new ChangePropertyCommand(node,
+					"seamark:buoy_safe_water:shape", "sphere"));
+			break;
+		case SAFE_BEACON:
+			super.saveSign("beacon_safe_water");
+			break;
+		case SAFE_FLOAT:
+			super.saveSign("light_float");
+			break;
+		default:
+		}
+
+		switch (getStyleIndex()) {
+		case SAFE_PILLAR:
+		case SAFE_SPAR:
+		case SAFE_SPHERE:
+			Main.main.undoRedo.add(new ChangePropertyCommand(node,
+					"seamark:buoy_safe_water:colour_pattern", "vertical stripes"));
+			Main.main.undoRedo.add(new ChangePropertyCommand(node,
+					"seamark:buoy_safe_water:colour", "red;white"));
+			break;
+		case SAFE_BEACON:
+			Main.main.undoRedo.add(new ChangePropertyCommand(node,
+					"seamark:beacon_safe_water:colour_pattern", "vertical stripes"));
+			Main.main.undoRedo.add(new ChangePropertyCommand(node,
+					"seamark:beacon_safe_water:colour", "red;white"));
+			break;
+		case SAFE_FLOAT:
+			Main.main.undoRedo.add(new ChangePropertyCommand(node,
+					"seamark:light_float:colour_pattern", "vertical stripes"));
+			Main.main.undoRedo.add(new ChangePropertyCommand(node,
+					"seamark:light_float:colour", "red;white"));
+			break;
+		default:
+		}
+
+		saveTopMarkData("spherical", "red");
+
+		saveLightData("white");
+
 	}
 
@@ -231,32 +214,3 @@
 	}
 
-	public boolean parseShape(Node node) {
-		String str;
-		boolean ret = true;
-		Map<String, String> keys;
-
-		keys = node.getKeys();
-
-		if (keys.containsKey("seamark:buoy_safe_water:shape")) {
-			str = keys.get("seamark:buoy_safe_water:shape");
-
-			if (str.compareTo("pillar") == 0)
-				setStyleIndex(SAFE_PILLAR);
-			else if (str.compareTo("spar") == 0)
-				setStyleIndex(SAFE_SPAR);
-			else if (str.compareTo("sphere") == 0)
-				setStyleIndex(SAFE_SPHERE);
-			else
-				ret = false;
-		} else if ((keys.containsKey("seamark:type") == true)
-				&& (keys.get("seamark:type").equals("light_float"))) {
-			setStyleIndex(SAFE_FLOAT);
-		} else if ((keys.containsKey("seamark:type") == true)
-				&& (keys.get("seamark:type").equals("beacon_safe_water"))) {
-			setStyleIndex(SAFE_BEACON);
-		}
-
-		return ret;
-	}
-
 }
Index: applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoySpec.java
===================================================================
--- applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoySpec.java	(revision 22721)
+++ applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoySpec.java	(revision 22722)
@@ -16,6 +16,11 @@
 
 public class BuoySpec extends Buoy {
-	public BuoySpec(SmpDialogAction dia, int type) {
+	public BuoySpec(SmpDialogAction dia,  Node node) {
 		super(dia);
+
+		String str;
+		Map<String, String> keys;
+		keys = node.getKeys();
+		setNode(node);
 
 		dlg.cbM01StyleOfMark.removeAllItems();
@@ -47,199 +52,5 @@
 		setColour(SeaMark.YELLOW);
 		setLightColour("W");
-		setBuoyIndex(type);
-
-		paintSign();
-	}
-
-	public void paintSign() {
-		super.paintSign();
-
-		dlg.sM01StatusBar.setText(getErrMsg());
-
-		dlg.tfM01Name.setEnabled(true);
-		dlg.tfM01Name.setText(getName());
-		dlg.cM01Fired.setEnabled(true);
-		dlg.cM01TopMark.setEnabled(true);
-
-		String image = "/images/Special_Purpose";
-
-		switch (getStyleIndex()) {
-		case SPEC_PILLAR:
-			image += "_Pillar";
-			break;
-		case SPEC_SPAR:
-			image += "_Spar";
-			break;
-		case SPEC_SPHERE:
-			image += "_Sphere";
-			break;
-		case SPEC_BARREL:
-			image += "_Barrel";
-			break;
-		case SPEC_FLOAT:
-			image += "_Float";
-			break;
-		case SPEC_BEACON:
-			image += "_Beacon";
-			break;
-		default:
-		}
-
-		if (image != "/images/Special_Purpose") {
-
-			if (hasTopMark())
-				image += "_CrossY";
-
-			if (isFired()) {
-				image += "_Lit";
-				if (getLightChar() != "") {
-					String c;
-
-					c = getLightChar();
-
-					dlg.cbM01Kennung.setSelectedItem(c);
-					if (dlg.cbM01Kennung.getSelectedItem().equals("Not set"))
-						c = "";
-				}
-			}
-			image += ".png";
-
-			dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(image)));
-		} else
-			dlg.lM01Icon01.setIcon(null);
-	}
-
-	public void saveSign() {
-		Node node = getNode();
-
-		if (node == null) {
-			return;
-		}
-
-		switch (getStyleIndex()) {
-		case SPEC_PILLAR:
-			super.saveSign("buoy_special_purpose");
-			Main.main.undoRedo.add(new ChangePropertyCommand(node,
-					"seamark:buoy_special_purpose:shape", "pillar"));
-			Main.main.undoRedo.add(new ChangePropertyCommand(node,
-					"seamark:buoy_special_purpose:colour", "yellow"));
-			break;
-		case SPEC_SPAR:
-			super.saveSign("buoy_special_purpose");
-			Main.main.undoRedo.add(new ChangePropertyCommand(node,
-					"seamark:buoy_special_purpose:shape", "spar"));
-			Main.main.undoRedo.add(new ChangePropertyCommand(node,
-					"seamark:buoy_special_purpose:colour", "yellow"));
-			break;
-		case SPEC_SPHERE:
-			super.saveSign("buoy_special_purpose");
-			Main.main.undoRedo.add(new ChangePropertyCommand(node,
-					"seamark:buoy_special_purpose:shape", "sphere"));
-			Main.main.undoRedo.add(new ChangePropertyCommand(node,
-					"seamark:buoy_special_purpose:colour", "yellow"));
-			break;
-		case SPEC_BARREL:
-			super.saveSign("buoy_special_purpose");
-			Main.main.undoRedo.add(new ChangePropertyCommand(node,
-					"seamark:buoy_special_purpose:shape", "barrel"));
-			Main.main.undoRedo.add(new ChangePropertyCommand(node,
-					"seamark:buoy_special_purpose:colour", "yellow"));
-			break;
-		case SPEC_FLOAT:
-			super.saveSign("light_float");
-			Main.main.undoRedo.add(new ChangePropertyCommand(node,
-					"seamark:light_float:colour", "yellow"));
-			break;
-		case SPEC_BEACON:
-			super.saveSign("beacon_special_purpose");
-			Main.main.undoRedo.add(new ChangePropertyCommand(node,
-					"seamark:beacon_special_purpose:colour", "yellow"));
-			break;
-		default:
-		}
-
-		saveTopMarkData("x-shape", "yellow");
-
-		saveLightData("white");
-
-	}
-
-	public boolean parseTopMark(Node node) {
-		if (node == null) {
-			return false;
-		}
-
-		String str;
-		boolean ret = true;
-		Map<String, String> keys;
-
-		setTopMark(false);
-
-		keys = node.getKeys();
-		if (keys.containsKey("seamark:topmark:shape")) {
-			str = keys.get("seamark:topmark:shape");
-
-			if (str.equals("x-shape")) {
-				setTopMark(true);
-
-			} else {
-				setErrMsg("Parse-Error: Topmark unbekannt");
-				ret = false;
-			}
-		}
-
-		return ret;
-	}
-
-	public boolean parseLight(Node node) {
-		String str;
-		boolean ret = true;
-		Map<String, String> keys;
-
-		setFired(false);
-
-		keys = node.getKeys();
-		if (keys.containsKey("seamark:light:colour")) {
-			str = keys.get("seamark:light:colour");
-
-			if (keys.containsKey("seamark:light:character")) {
-				setLightGroup(keys);
-
-				String c = keys.get("seamark:light:character");
-				if (getLightGroup() != "")
-					c = c + "(" + getLightGroup() + ")";
-
-				setLightChar(c);
-				setLightPeriod(keys);
-			}
-
-			if (str.equals("white")) {
-				setFired(true);
-				setLightColour("W");
-
-			} else {
-				if (getErrMsg() == null)
-					setErrMsg("Parse-Error: Invalid light");
-				else
-					setErrMsg(getErrMsg() + " / Invalid light");
-
-				ret = false;
-			}
-
-		}
-
-		return ret;
-	}
-
-	public void setLightColour() {
-		super.setLightColour("W");
-	}
-
-	public boolean parseShape(Node node) {
-		String str;
-		boolean ret = true;
-		Map<String, String> keys;
-
-		keys = node.getKeys();
+		setBuoyIndex(SPECIAL_PURPOSE);
 
 		if (keys.containsKey("seamark:buoy_special_purpose:shape")) {
@@ -254,6 +65,4 @@
 			else if (str.equals("barrel"))
 				setStyleIndex(SPEC_BARREL);
-			else
-				ret = false;
 		}
 
@@ -265,5 +74,151 @@
 			setStyleIndex(SPEC_FLOAT);
 
-		return ret;
+		keys = node.getKeys();
+		if (keys.containsKey("seamark:topmark:shape")) {
+			str = keys.get("seamark:topmark:shape");
+
+			if (str.equals("x-shape")) {
+				setTopMark(true);
+			}
+		}
+
+		if (keys.containsKey("seamark:light:colour")) {
+			str = keys.get("seamark:light:colour");
+
+			if (keys.containsKey("seamark:light:character")) {
+				setLightGroup(keys);
+
+				String c = keys.get("seamark:light:character");
+				if (getLightGroup() != "")
+					c = c + "(" + getLightGroup() + ")";
+
+				setLightChar(c);
+				setLightPeriod(keys);
+			}
+
+			if (str.equals("white")) {
+				setFired(true);
+				setLightColour("W");
+			}
+		}
+
+		paintSign();
+	}
+
+	public void paintSign() {
+		super.paintSign();
+
+		dlg.sM01StatusBar.setText(getErrMsg());
+
+		dlg.tfM01Name.setEnabled(true);
+		dlg.tfM01Name.setText(getName());
+		dlg.cM01Fired.setEnabled(true);
+		dlg.cM01TopMark.setEnabled(true);
+
+		String image = "/images/Special_Purpose";
+
+		switch (getStyleIndex()) {
+		case SPEC_PILLAR:
+			image += "_Pillar";
+			break;
+		case SPEC_SPAR:
+			image += "_Spar";
+			break;
+		case SPEC_SPHERE:
+			image += "_Sphere";
+			break;
+		case SPEC_BARREL:
+			image += "_Barrel";
+			break;
+		case SPEC_FLOAT:
+			image += "_Float";
+			break;
+		case SPEC_BEACON:
+			image += "_Beacon";
+			break;
+		default:
+		}
+
+		if (!image.equals("/images/Special_Purpose")) {
+
+			if (hasTopMark())
+				image += "_CrossY";
+
+			if (isFired()) {
+				image += "_Lit";
+				if (getLightChar() != "") {
+					String c;
+
+					c = getLightChar();
+
+					dlg.cbM01Kennung.setSelectedItem(c);
+					if (dlg.cbM01Kennung.getSelectedItem().equals("Not set"))
+						c = "";
+				}
+			}
+			image += ".png";
+
+			dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(image)));
+		} else
+			dlg.lM01Icon01.setIcon(null);
+	}
+
+	public void saveSign() {
+		Node node = getNode();
+
+		if (node == null) {
+			return;
+		}
+
+		switch (getStyleIndex()) {
+		case SPEC_PILLAR:
+			super.saveSign("buoy_special_purpose");
+			Main.main.undoRedo.add(new ChangePropertyCommand(node,
+					"seamark:buoy_special_purpose:shape", "pillar"));
+			Main.main.undoRedo.add(new ChangePropertyCommand(node,
+					"seamark:buoy_special_purpose:colour", "yellow"));
+			break;
+		case SPEC_SPAR:
+			super.saveSign("buoy_special_purpose");
+			Main.main.undoRedo.add(new ChangePropertyCommand(node,
+					"seamark:buoy_special_purpose:shape", "spar"));
+			Main.main.undoRedo.add(new ChangePropertyCommand(node,
+					"seamark:buoy_special_purpose:colour", "yellow"));
+			break;
+		case SPEC_SPHERE:
+			super.saveSign("buoy_special_purpose");
+			Main.main.undoRedo.add(new ChangePropertyCommand(node,
+					"seamark:buoy_special_purpose:shape", "sphere"));
+			Main.main.undoRedo.add(new ChangePropertyCommand(node,
+					"seamark:buoy_special_purpose:colour", "yellow"));
+			break;
+		case SPEC_BARREL:
+			super.saveSign("buoy_special_purpose");
+			Main.main.undoRedo.add(new ChangePropertyCommand(node,
+					"seamark:buoy_special_purpose:shape", "barrel"));
+			Main.main.undoRedo.add(new ChangePropertyCommand(node,
+					"seamark:buoy_special_purpose:colour", "yellow"));
+			break;
+		case SPEC_FLOAT:
+			super.saveSign("light_float");
+			Main.main.undoRedo.add(new ChangePropertyCommand(node,
+					"seamark:light_float:colour", "yellow"));
+			break;
+		case SPEC_BEACON:
+			super.saveSign("beacon_special_purpose");
+			Main.main.undoRedo.add(new ChangePropertyCommand(node,
+					"seamark:beacon_special_purpose:colour", "yellow"));
+			break;
+		default:
+		}
+
+		saveTopMarkData("x-shape", "yellow");
+
+		saveLightData("white");
+
+	}
+
+	public void setLightColour() {
+		super.setLightColour("W");
 	}
 
Index: applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyUkn.java
===================================================================
--- applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyUkn.java	(revision 22721)
+++ applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyUkn.java	(revision 22722)
@@ -59,12 +59,4 @@
 	}
 
-	public boolean parseTopMark(Node node) {
-		return false;
-	}
-
-	public boolean parseLight(Node node) {
-		return false;
-	}
-
 	public void saveSign() {
 	}
