Index: /applications/editors/josm/plugins/toms/src/toms/seamarks/SeaMark.java
===================================================================
--- /applications/editors/josm/plugins/toms/src/toms/seamarks/SeaMark.java	(revision 23173)
+++ /applications/editors/josm/plugins/toms/src/toms/seamarks/SeaMark.java	(revision 23174)
@@ -111,8 +111,8 @@
 	 */
 	
-	public final static int UNKNOWN_RATYP = 0;
-	public final static int RATYP_RACON = 1;
-	public final static int RATYP_RAMARK = 2;
-	public final static int RATYP_LEADING = 3;
+	public final static int UNKNOWN_RATYPE = 0;
+	public final static int RATYPE_RACON = 1;
+	public final static int RATYPE_RAMARK = 2;
+	public final static int RATYPE_LEADING = 3;
 
 	/**
Index: /applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/Buoy.java
===================================================================
--- /applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/Buoy.java	(revision 23173)
+++ /applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/Buoy.java	(revision 23174)
@@ -115,6 +115,6 @@
 	}
 
-	public void setFogSound(int fogSound) {
-		FogSound = fogSound;
+	public void setFogSound(int sound) {
+		FogSound = sound;
 	}
 
@@ -125,6 +125,6 @@
 	}
 
-	public void setFogGroup(String fogGroup) {
-		FogGroup = fogGroup;
+	public void setFogGroup(String group) {
+		FogGroup = group;
 	}
 
@@ -135,6 +135,6 @@
 	}
 
-	public void setFogPeriod(String fogPeriod) {
-		FogPeriod = fogPeriod;
+	public void setFogPeriod(String period) {
+		FogPeriod = period;
 	}
 
@@ -172,13 +172,13 @@
 
 	public String getLightChar() {
-		if (LightChar[getSectorIndex()] == null)
+		if (LightChar[SectorIndex] == null)
 			return (LightChar[0]);
-		return LightChar[getSectorIndex()];
+		return LightChar[SectorIndex];
 	}
 
 	public void setLightChar(String lightChar) {
-		if (getSectorIndex() == 0)
+		if (SectorIndex == 0)
 			LightChar = new String[10];
-		LightChar[getSectorIndex()] = lightChar;
+		LightChar[SectorIndex] = lightChar;
 	}
 
@@ -186,13 +186,13 @@
 
 	public String getLightColour() {
-		if (LightColour[getSectorIndex()] == null)
+		if (LightColour[SectorIndex] == null)
 			return (LightColour[0]);
-		return LightColour[getSectorIndex()];
+		return LightColour[SectorIndex];
 	}
 
 	public void setLightColour(String lightColour) {
-		if (getSectorIndex() == 0)
+		if (SectorIndex == 0)
 			LightColour = new String[10];
-		LightColour[getSectorIndex()] = lightColour;
+		LightColour[SectorIndex] = lightColour;
 	}
 
@@ -200,13 +200,13 @@
 
 	public String getLightGroup() {
-		if (LightGroup[getSectorIndex()] == null)
+		if (LightGroup[SectorIndex] == null)
 			return (LightGroup[0]);
-		return LightGroup[getSectorIndex()];
+		return LightGroup[SectorIndex];
 	}
 
 	public void setLightGroup(String lightGroup) {
-		if (getSectorIndex() == 0)
+		if (SectorIndex == 0)
 			LightGroup = new String[10];
-		LightGroup[getSectorIndex()] = lightGroup;
+		LightGroup[SectorIndex] = lightGroup;
 	}
 
@@ -222,13 +222,13 @@
 
 	public String getHeight() {
-		if (Height[getSectorIndex()] == null)
+		if (Height[SectorIndex] == null)
 			return (Height[0]);
-		return Height[getSectorIndex()];
+		return Height[SectorIndex];
 	}
 
 	public void setHeight(String height) {
-		if (getSectorIndex() == 0)
+		if (SectorIndex == 0)
 			Height = new String[10];
-		Height[getSectorIndex()] = height;
+		Height[SectorIndex] = height;
 	}
 
@@ -236,13 +236,13 @@
 
 	public String getRange() {
-		if (Range[getSectorIndex()] == null)
+		if (Range[SectorIndex] == null)
 			return (Range[0]);
-		return Range[getSectorIndex()];
+		return Range[SectorIndex];
 	}
 
 	public void setRange(String range) {
-		if (getSectorIndex() == 0)
+		if (SectorIndex == 0)
 			Range = new String[10];
-		Range[getSectorIndex()] = range;
+		Range[SectorIndex] = range;
 	}
 
@@ -250,13 +250,13 @@
 
 	public String getBearing1() {
-		if (Bearing1[getSectorIndex()] == null)
+		if (Bearing1[SectorIndex] == null)
 			return (Bearing1[0]);
-		return Bearing1[getSectorIndex()];
+		return Bearing1[SectorIndex];
 	}
 
 	public void setBearing1(String bearing) {
-		if (getSectorIndex() == 0)
+		if (SectorIndex == 0)
 			Bearing1 = new String[10];
-		Bearing1[getSectorIndex()] = bearing;
+		Bearing1[SectorIndex] = bearing;
 	}
 
@@ -264,13 +264,13 @@
 
 	public String getBearing2() {
-		if (Bearing2[getSectorIndex()] == null)
+		if (Bearing2[SectorIndex] == null)
 			return (Bearing2[0]);
-		return Bearing2[getSectorIndex()];
+		return Bearing2[SectorIndex];
 	}
 
 	public void setBearing2(String bearing) {
-		if (getSectorIndex() == 0)
+		if (SectorIndex == 0)
 			Bearing2 = new String[10];
-		Bearing2[getSectorIndex()] = bearing;
+		Bearing2[SectorIndex] = bearing;
 	}
 
@@ -278,13 +278,13 @@
 
 	public String getRadius() {
-		if (Radius[getSectorIndex()] == null)
+		if (Radius[SectorIndex] == null)
 			return (Radius[0]);
-		return Radius[getSectorIndex()];
+		return Radius[SectorIndex];
 	}
 
 	public void setRadius(String radius) {
-		if (getSectorIndex() == 0)
+		if (SectorIndex == 0)
 			Radius = new String[10];
-		Radius[getSectorIndex()] = radius;
+		Radius[SectorIndex] = radius;
 	}
 
@@ -292,7 +292,7 @@
 
 	public String getLightPeriod() {
-		if (LightPeriod[getSectorIndex()] == null)
+		if (LightPeriod[SectorIndex] == null)
 			return (LightPeriod[0]);
-		return LightPeriod[getSectorIndex()];
+		return LightPeriod[SectorIndex];
 	}
 
@@ -313,17 +313,7 @@
 			}
 		}
-		if (getSectorIndex() == 0)
+		if (SectorIndex == 0)
 			LightPeriod = new String[10];
-		LightPeriod[getSectorIndex()] = lightPeriod;
-	}
-
-	protected void setLightPeriod(Map<String, String> k) {
-		String s = "";
-		if (k.containsKey("seamark:light:period")) {
-			s = k.get("seamark:light:period");
-			setSectorIndex(0);
-			setLightPeriod(s);
-			return;
-		}
+		LightPeriod[SectorIndex] = lightPeriod;
 	}
 
@@ -375,5 +365,5 @@
 		Iterator it = k.entrySet().iterator();
 		while (it.hasNext()) {
-			Map.Entry entry = (Map.Entry)it.next();
+			Map.Entry entry = (Map.Entry) it.next();
 			String key = (String) entry.getKey();
 			String value = ((String) entry.getValue()).trim();
@@ -400,5 +390,6 @@
 					index = 0;
 				}
-				if (index != 0) setSectored(true);
+				if (index != 0)
+					setSectored(true);
 				if (key.equals("colour")) {
 					if (value.equals("red"))
@@ -421,4 +412,78 @@
 			}
 		}
+		setSectorIndex(0);
+		dlg.cM01Fired.setSelected(isFired());
+		dlg.rbM01Fired1.setSelected(!isSectored());
+		dlg.rbM01FiredN.setSelected(isSectored());
+		dlg.cbM01Kennung.setSelectedItem(getLightChar());
+		dlg.tfM01Height.setText(getHeight());
+		dlg.tfM01Range.setText(getRange());
+		dlg.tfM01Group.setText(getLightGroup());
+		dlg.tfM01RepeatTime.setText(getLightPeriod());
+		dlg.cbM01Colour.setSelectedItem(getLightColour());
+	}
+
+	public void parseFogRadar(Map<String, String> k) {
+		String str;
+		setFog(false);
+		setRadar(false);
+		setRacon(false);
+		if (k.containsKey("seamark:fog_signal")
+				|| k.containsKey("seamark:fog_signal:category")
+				|| k.containsKey("seamark:fog_signal:group")
+				|| k.containsKey("seamark:fog_signal:period")) {
+			setFog(true);
+			if (k.containsKey("seamark:fog_signal:category")) {
+				str = k.get("seamark:fog_signal:category");
+				if (str.equals("horn"))
+					setFogSound(FOG_HORN);
+				else if (str.equals("siren"))
+					setFogSound(FOG_SIREN);
+				else if (str.equals("diaphone"))
+					setFogSound(FOG_DIA);
+				else if (str.equals("bell"))
+					setFogSound(FOG_BELL);
+				else if (str.equals("whis"))
+					setFogSound(FOG_WHIS);
+				else if (str.equals("gong"))
+					setFogSound(FOG_GONG);
+				else if (str.equals("explosive"))
+					setFogSound(FOG_EXPLOS);
+				else
+					setFogSound(UNKNOWN_FOG);
+			}
+			if (k.containsKey("seamark:fog_signal:group"))
+				setFogGroup(k.get("seamark:fog_signal:group"));
+			if (k.containsKey("seamark:fog_signal:period"))
+				setFogPeriod(k.get("seamark:fog_signal:period"));
+		}
+		dlg.cM01Fog.setSelected(hasFog());
+		dlg.cbM01Fog.setSelectedIndex(getFogSound());
+		dlg.tfM01FogGroup.setText(getFogGroup());
+		dlg.tfM01FogPeriod.setText(getFogPeriod());
+
+		if (k.containsKey("seamark:radar_transponder")
+				|| k.containsKey("seamark:radar_transponder:category")
+				|| k.containsKey("seamark:radar_transponder:group")) {
+			setRacon(true);
+			if (k.containsKey("seamark:radar_transponder:category")) {
+				str = k.get("seamark:radar_transponder:category");
+				if (str.equals("racon"))
+					setRaType(RATYPE_RACON);
+				else if (str.equals("ramark"))
+					setRaType(RATYPE_RAMARK);
+				else if (str.equals("leading"))
+					setRaType(RATYPE_LEADING);
+				else
+					setRaType(UNKNOWN_RATYPE);
+			}
+			if (k.containsKey("seamark:radar_transponder:group"))
+				setRaconGroup(k.get("seamark:radar_transponder:group"));
+		} else if (k.containsKey("seamark:radar_reflector"))
+			setRadar(true);
+		dlg.cM01Radar.setSelected(hasRadar());
+		dlg.cM01Racon.setSelected(hasRacon());
+		dlg.cbM01Racon.setSelectedIndex(getRaType());
+		dlg.tfM01Racon.setText(getRaconGroup());
 	}
 
@@ -459,5 +524,5 @@
 						"/images/Radar_Station.png")));
 				dlg.cbM01Racon.setVisible(true);
-				if (getRaType() == RATYP_RACON) {
+				if (getRaType() == RATYPE_RACON) {
 					dlg.lM01Racon.setVisible(true);
 					dlg.tfM01Racon.setVisible(true);
@@ -532,5 +597,8 @@
 				}
 				dlg.cbM01Kennung.setSelectedItem(c);
-				if ((dlg.cbM01Kennung.getSelectedIndex() == 0) && !getLightGroup().isEmpty()) {
+				if (((dlg.cbM01Kennung.getSelectedIndex() == 0) && !getLightGroup()
+						.isEmpty())
+						|| (((String) dlg.cbM01Kennung.getSelectedItem()).contains("("))
+						&& !(((String) dlg.cbM01Kennung.getSelectedItem()).contains("+"))) {
 					c = c + "(" + getLightGroup() + ")";
 					dlg.cbM01Kennung.setSelectedItem(c);
@@ -544,5 +612,5 @@
 				dlg.lM01Kennung.setVisible(true);
 				dlg.cbM01Kennung.setVisible(true);
-				if (((String)dlg.cbM01Kennung.getSelectedItem()).contains("(")) {
+				if (((String) dlg.cbM01Kennung.getSelectedItem()).contains("(")) {
 					dlg.tfM01Group.setVisible(false);
 					dlg.lM01Group.setVisible(false);
@@ -804,5 +872,5 @@
 		if (hasRacon()) {
 			switch (RaType) {
-			case RATYP_RACON:
+			case RATYPE_RACON:
 				Main.main.undoRedo.add(new ChangePropertyCommand(Node,
 						"seamark:radar_transponder:category", "racon"));
@@ -811,9 +879,9 @@
 							"seamark:radar_transponder:group", getRaconGroup()));
 				break;
-			case RATYP_RAMARK:
+			case RATYPE_RAMARK:
 				Main.main.undoRedo.add(new ChangePropertyCommand(Node,
 						"seamark:radar_transponder:category", "ramark"));
 				break;
-			case RATYP_LEADING:
+			case RATYPE_LEADING:
 				Main.main.undoRedo.add(new ChangePropertyCommand(Node,
 						"seamark:radar_transponder:category", "leading"));
@@ -825,9 +893,9 @@
 		}
 		if (hasFog()) {
-			if (FogSound == 0) {
+			if (getFogSound() == 0) {
 				Main.main.undoRedo.add(new ChangePropertyCommand(Node,
 						"seamark:fog_signal", "yes"));
 			} else {
-				switch (FogSound) {
+				switch (getFogSound()) {
 				case FOG_HORN:
 					Main.main.undoRedo.add(new ChangePropertyCommand(Node,
@@ -861,8 +929,8 @@
 				if (!getFogGroup().isEmpty())
 					Main.main.undoRedo.add(new ChangePropertyCommand(Node,
-							"seamark:fog_group:group", getFogGroup()));
+							"seamark:fog_signal:group", getFogGroup()));
 				if (!getFogPeriod().isEmpty())
 					Main.main.undoRedo.add(new ChangePropertyCommand(Node,
-							"seamark:fog_period:group", getFogPeriod()));
+							"seamark:fog_signal:period", getFogPeriod()));
 			}
 		}
Index: /applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyCard.java
===================================================================
--- /applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyCard.java	(revision 23173)
+++ /applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyCard.java	(revision 23174)
@@ -107,6 +107,4 @@
 		}
 
-		dlg.cbM01CatOfMark.setSelectedIndex(getBuoyIndex());
-
 		if (keys.containsKey("seamark:buoy_cardinal:shape")) { //$NON-NLS-1$
 			str = keys.get("seamark:buoy_cardinal:shape"); //$NON-NLS-1$
@@ -133,8 +131,13 @@
 		if (getStyleIndex() >= dlg.cbM01StyleOfMark.getItemCount())
 			setStyleIndex(0);
+
+		refreshLights();
+		parseLights(keys);
+		parseFogRadar(keys);
+		
+		dlg.cbM01CatOfMark.setSelectedIndex(getBuoyIndex());
 		dlg.cbM01StyleOfMark.setSelectedIndex(getStyleIndex());
-
-		parseLights(keys);
-		refreshLights();
+		dlg.tfM01Name.setText(getName());
+		dlg.cM01TopMark.setSelected(hasTopMark());
 	}
 
Index: /applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyIsol.java
===================================================================
--- /applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyIsol.java	(revision 23173)
+++ /applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyIsol.java	(revision 23174)
@@ -89,6 +89,11 @@
 		}
 
+		refreshLights();
 		parseLights(keys);
-		refreshLights();
+		parseFogRadar(keys);
+
+		dlg.cbM01StyleOfMark.setSelectedIndex(getStyleIndex());
+		dlg.tfM01Name.setText(getName());
+		dlg.cM01TopMark.setSelected(hasTopMark());
 	}
 	
Index: /applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyLat.java
===================================================================
--- /applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyLat.java	(revision 23173)
+++ /applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyLat.java	(revision 23174)
@@ -213,6 +213,4 @@
 			}
 		}
-
-		dlg.cbM01CatOfMark.setSelectedIndex(getBuoyIndex());
 
 		if (keys.containsKey("seamark:buoy_lateral:shape")) { //$NON-NLS-1$
@@ -273,7 +271,13 @@
 
 		refreshStyles();
-		parseLights(keys);
 		refreshLights();
 		setLightColour();
+		parseLights(keys);
+		parseFogRadar(keys);
+		
+		dlg.cbM01CatOfMark.setSelectedIndex(getBuoyIndex());
+		dlg.cbM01StyleOfMark.setSelectedIndex(getStyleIndex());
+		dlg.tfM01Name.setText(getName());
+		dlg.cM01TopMark.setSelected(hasTopMark());
 	}
 
Index: /applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyNota.java
===================================================================
--- /applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyNota.java	(revision 23173)
+++ /applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyNota.java	(revision 23174)
@@ -68,10 +68,12 @@
 		}
 
-		dlg.cbM01CatOfMark.setSelectedIndex(getBuoyIndex());
-
+		refreshLights();
 		parseLights(keys);
-		refreshLights();
+		parseFogRadar(keys);
 		setTopMark(false);
 		setFired(true);
+
+		dlg.cbM01CatOfMark.setSelectedIndex(getBuoyIndex());
+		dlg.tfM01Name.setText(getName());
 		dlg.cM01Fired.setEnabled(false);
 		dlg.cM01Fired.setSelected(true);
Index: /applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoySaw.java
===================================================================
--- /applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoySaw.java	(revision 23173)
+++ /applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoySaw.java	(revision 23174)
@@ -76,5 +76,4 @@
 		if (getStyleIndex() >= dlg.cbM01StyleOfMark.getItemCount())
 			setStyleIndex(0);
-		dlg.cbM01StyleOfMark.setSelectedIndex(getStyleIndex());
 		
 		if (keys.containsKey("seamark:topmark:shape") //$NON-NLS-1$
@@ -83,6 +82,11 @@
 		}
 
+		refreshLights();
 		parseLights(keys);
-		refreshLights();
+		parseFogRadar(keys);
+
+		dlg.cbM01StyleOfMark.setSelectedIndex(getStyleIndex());
+		dlg.tfM01Name.setText(getName());
+		dlg.cM01TopMark.setSelected(hasTopMark());
 	}
 
Index: /applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoySpec.java
===================================================================
--- /applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoySpec.java	(revision 23173)
+++ /applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoySpec.java	(revision 23174)
@@ -94,5 +94,4 @@
 		if (getStyleIndex() >= dlg.cbM01StyleOfMark.getItemCount())
 			setStyleIndex(0);
-		dlg.cbM01StyleOfMark.setSelectedIndex(getStyleIndex());
 
 		keys = node.getKeys();
@@ -105,6 +104,11 @@
 		}
 
+		refreshLights();
 		parseLights(keys);
-		refreshLights();
+		parseFogRadar(keys);
+
+		dlg.cbM01StyleOfMark.setSelectedIndex(getStyleIndex());
+		dlg.tfM01Name.setText(getName());
+		dlg.cM01TopMark.setSelected(hasTopMark());
 	}
 
