Index: src/mlx/gui/weighthelp.py
===================================================================
--- src/mlx/gui/weighthelp.py	(revision 303)
+++ src/mlx/gui/weighthelp.py	(revision 899)
@@ -56,5 +56,5 @@
 
         
-        self._weightsTable = table = gtk.Table(16, 5)
+        self._weightsTable = table = gtk.Table(17, 5)
         table.set_homogeneous(False)
         table.set_row_spacings(4)
@@ -91,17 +91,33 @@
         
 
-        self._crewLabel = gtk.Label(xstr("weighthelp_crew") % ("99",))
-        alignment = gtk.Alignment(xalign = 0.0, yalign = 0.5,
-                                  xscale = 0.0, yscale = 0.0)
-        alignment.add(self._crewLabel)
+        self._cockpitCrewLabel = \
+          gtk.Label(xstr("weighthelp_cockpit_crew") % ("99",))
+        alignment = gtk.Alignment(xalign = 0.0, yalign = 0.5,
+                                  xscale = 0.0, yscale = 0.0)
+        alignment.add(self._cockpitCrewLabel)
         table.attach(alignment, 0, 1, 1, 2)
 
-        self._crewWeight = gtk.Label("0")
-        alignment = gtk.Alignment(xalign = 1.0, yalign = 0.5,
-                                  xscale = 0.0, yscale = 0.0)
-        alignment.add(self._crewWeight)
+        self._cockpitCrewWeight = gtk.Label("0")
+        alignment = gtk.Alignment(xalign = 1.0, yalign = 0.5,
+                                  xscale = 0.0, yscale = 0.0)
+        alignment.add(self._cockpitCrewWeight)
         table.attach(alignment, 1, 2, 1, 2)
         
         table.attach(gtk.Label("kg"), 2, 3, 1, 2)
+
+        self._cabinCrewLabel = \
+          gtk.Label(xstr("weighthelp_cabin_crew") % ("99",))
+        alignment = gtk.Alignment(xalign = 0.0, yalign = 0.5,
+                                  xscale = 0.0, yscale = 0.0)
+        alignment.add(self._cabinCrewLabel)
+        table.attach(alignment, 0, 1, 2, 3)
+
+        self._cabinCrewWeight = gtk.Label("0")
+        alignment = gtk.Alignment(xalign = 1.0, yalign = 0.5,
+                                  xscale = 0.0, yscale = 0.0)
+        alignment.add(self._cabinCrewWeight)
+        table.attach(alignment, 1, 2, 2, 3)
+        
+        table.attach(gtk.Label("kg"), 2, 3, 2, 3)
 
         text = xstr("weighthelp_pax") % ("999",)
@@ -112,5 +128,5 @@
                                   xscale = 0.0, yscale = 0.0)
         alignment.add(self._paxLabel)
-        table.attach(alignment, 0, 1, 2, 3)
+        table.attach(alignment, 0, 1, 3, 4)
 
         self._paxWeight = gtk.Label("20000")
@@ -118,7 +134,7 @@
                                   xscale = 0.0, yscale = 0.0)
         alignment.add(self._paxWeight)
-        table.attach(alignment, 1, 2, 2, 3)
-        
-        table.attach(gtk.Label("kg"), 2, 3, 2, 3)
+        table.attach(alignment, 1, 2, 3, 4)
+        
+        table.attach(gtk.Label("kg"), 2, 3, 3, 4)
         
         label = gtk.Label(xstr("weighthelp_baggage"))
@@ -126,5 +142,5 @@
                                   xscale = 0.0, yscale = 0.0)
         alignment.add(label)
-        table.attach(alignment, 0, 1, 3, 4)
+        table.attach(alignment, 0, 1, 4, 5)
 
         self._bagWeight = gtk.Label("2000")
@@ -132,7 +148,7 @@
                                   xscale = 0.0, yscale = 0.0)
         alignment.add(self._bagWeight)
-        table.attach(alignment, 1, 2, 3, 4)
-        
-        table.attach(gtk.Label("kg"), 2, 3, 3, 4)
+        table.attach(alignment, 1, 2, 4, 5)
+        
+        table.attach(gtk.Label("kg"), 2, 3, 4, 5)
         
         label = gtk.Label(xstr("weighthelp_cargo"))
@@ -140,5 +156,5 @@
                                   xscale = 0.0, yscale = 0.0)
         alignment.add(label)
-        table.attach(alignment, 0, 1, 4, 5)
+        table.attach(alignment, 0, 1, 5, 6)
 
         self._cargoWeight = gtk.Label("2000")
@@ -146,7 +162,7 @@
                                   xscale = 0.0, yscale = 0.0)
         alignment.add(self._cargoWeight)
-        table.attach(alignment, 1, 2, 4, 5)
-        
-        table.attach(gtk.Label("kg"), 2, 3, 4, 5)
+        table.attach(alignment, 1, 2, 5, 6)
+        
+        table.attach(gtk.Label("kg"), 2, 3, 5, 6)
         
         label = gtk.Label(xstr("weighthelp_mail"))
@@ -154,5 +170,5 @@
                                   xscale = 0.0, yscale = 0.0)
         alignment.add(label)
-        table.attach(alignment, 0, 1, 5, 6)
+        table.attach(alignment, 0, 1, 6, 7)
 
         self._mailWeight = gtk.Label("2000")
@@ -160,9 +176,9 @@
                                   xscale = 0.0, yscale = 0.0)
         alignment.add(self._mailWeight)
-        table.attach(alignment, 1, 2, 5, 6)
-        
-        table.attach(gtk.Label("kg"), 2, 3, 5, 6)
-
-        table.attach(gtk.HSeparator(), 1, 2, 6, 7)
+        table.attach(alignment, 1, 2, 6, 7)
+        
+        table.attach(gtk.Label("kg"), 2, 3, 6, 7)
+
+        table.attach(gtk.HSeparator(), 1, 2, 7, 8)
 
         label = gtk.Label("<b>" + xstr("weighthelp_payload") + "</b>")
@@ -171,5 +187,5 @@
                                   xscale = 0.0, yscale = 0.0)
         alignment.add(label)
-        table.attach(alignment, 0, 1, 7, 8)
+        table.attach(alignment, 0, 1, 8, 9)
 
         self._payload = gtk.Label("<b>32000</b>")
@@ -178,7 +194,7 @@
                                   xscale = 0.0, yscale = 0.0)
         alignment.add(self._payload)
-        table.attach(alignment, 1, 2, 7, 8)
-        
-        table.attach(gtk.Label("kg"), 2, 3, 7, 8)
+        table.attach(alignment, 1, 2, 8, 9)
+        
+        table.attach(gtk.Label("kg"), 2, 3, 8, 9)
 
         self._fsPayload = gtk.Label("<b>32001</b>")
@@ -187,7 +203,7 @@
                                   xscale = 0.0, yscale = 0.0)
         alignment.add(self._fsPayload)
-        table.attach(alignment, 3, 4, 7, 8)
-        
-        table.attach(gtk.Label("kg"), 4, 5, 7, 8)
+        table.attach(alignment, 3, 4, 8, 9)
+        
+        table.attach(gtk.Label("kg"), 4, 5, 8, 9)
 
         label = gtk.Label(xstr("weighthelp_dow"))
@@ -196,5 +212,5 @@
                                   xscale = 0.0, yscale = 0.0)
         alignment.add(label)
-        table.attach(alignment, 0, 1, 8, 9)
+        table.attach(alignment, 0, 1, 9, 10)
 
         self._dow = gtk.Label("35000")
@@ -202,7 +218,7 @@
                                   xscale = 0.0, yscale = 0.0)
         alignment.add(self._dow)
-        table.attach(alignment, 1, 2, 8, 9)
-        
-        table.attach(gtk.Label("kg"), 2, 3, 8, 9)
+        table.attach(alignment, 1, 2, 9, 10)
+        
+        table.attach(gtk.Label("kg"), 2, 3, 9, 10)
 
         self._fsDOW = gtk.Label("33012")
@@ -210,11 +226,11 @@
                                   xscale = 0.0, yscale = 0.0)
         alignment.add(self._fsDOW)
-        table.attach(alignment, 3, 4, 8, 9)
-        
-        table.attach(gtk.Label("kg"), 4, 5, 8, 9)
-
-        table.attach(gtk.HSeparator(), 1, 2, 9, 10)
-
-        table.attach(gtk.HSeparator(), 3, 4, 9, 10)
+        table.attach(alignment, 3, 4, 9, 10)
+        
+        table.attach(gtk.Label("kg"), 4, 5, 9, 10)
+
+        table.attach(gtk.HSeparator(), 1, 2, 10, 11)
+
+        table.attach(gtk.HSeparator(), 3, 4, 10, 11)
 
         label = gtk.Label("<b>" + xstr("weighthelp_zfw") + "</b>")
@@ -223,5 +239,5 @@
                                   xscale = 0.0, yscale = 0.0)
         alignment.add(label)
-        table.attach(alignment, 0, 1, 10, 11)
+        table.attach(alignment, 0, 1, 11, 12)
 
         self._zfw = gtk.Label("<b>122000</b>")
@@ -230,7 +246,7 @@
                                   xscale = 0.0, yscale = 0.0)
         alignment.add(self._zfw)
-        table.attach(alignment, 1, 2, 10, 11)
-        
-        table.attach(gtk.Label("kg"), 2, 3, 10, 11)
+        table.attach(alignment, 1, 2, 11, 12)
+        
+        table.attach(gtk.Label("kg"), 2, 3, 11, 12)
 
         self._fsZFW = gtk.Label("<b>124000</b>")
@@ -239,9 +255,9 @@
                                   xscale = 0.0, yscale = 0.0)
         alignment.add(self._fsZFW)
-        table.attach(alignment, 3, 4, 10, 11)
-        
-        table.attach(gtk.Label("kg"), 4, 5, 10, 11)
-
-        table.attach(gtk.HSeparator(), 0, 5, 11, 12)
+        table.attach(alignment, 3, 4, 11, 12)
+        
+        table.attach(gtk.Label("kg"), 4, 5, 11, 12)
+
+        table.attach(gtk.HSeparator(), 0, 5, 12, 13)
         
         label = gtk.Label(xstr("weighthelp_gross"))
@@ -250,5 +266,5 @@
                                   xscale = 0.0, yscale = 0.0)
         alignment.add(label)
-        table.attach(alignment, 0, 1, 12, 13)
+        table.attach(alignment, 0, 1, 13, 14)
 
         self._fsGross = gtk.Label("124000")
@@ -256,7 +272,7 @@
                                   xscale = 0.0, yscale = 0.0)
         alignment.add(self._fsGross)
-        table.attach(alignment, 3, 4, 12, 13)
-        
-        table.attach(gtk.Label("kg"), 4, 5, 12, 13)
+        table.attach(alignment, 3, 4, 13, 14)
+        
+        table.attach(gtk.Label("kg"), 4, 5, 13, 14)
 
         label = gtk.Label(xstr("weighthelp_mzfw"))
@@ -265,5 +281,5 @@
                                   xscale = 0.0, yscale = 0.0)
         alignment.add(label)
-        table.attach(alignment, 0, 1, 13, 14)
+        table.attach(alignment, 0, 1, 14, 15)
 
         self._mzfw = gtk.Label("35000")
@@ -271,7 +287,7 @@
                                   xscale = 0.0, yscale = 0.0)
         alignment.add(self._mzfw)
-        table.attach(alignment, 1, 2, 13, 14)
-        
-        table.attach(gtk.Label("kg"), 2, 3, 13, 14)
+        table.attach(alignment, 1, 2, 14, 15)
+        
+        table.attach(gtk.Label("kg"), 2, 3, 14, 15)
 
         label = gtk.Label(xstr("weighthelp_mtow"))
@@ -280,5 +296,5 @@
                                   xscale = 0.0, yscale = 0.0)
         alignment.add(label)
-        table.attach(alignment, 0, 1, 14, 15)
+        table.attach(alignment, 0, 1, 15, 16)
 
         self._mtow = gtk.Label("35000")
@@ -286,7 +302,7 @@
                                   xscale = 0.0, yscale = 0.0)
         alignment.add(self._mtow)
-        table.attach(alignment, 1, 2, 14, 15)
-        
-        table.attach(gtk.Label("kg"), 2, 3, 14, 15)
+        table.attach(alignment, 1, 2, 15, 16)
+        
+        table.attach(gtk.Label("kg"), 2, 3, 15, 16)
 
         label = gtk.Label(xstr("weighthelp_mlw"))
@@ -295,5 +311,5 @@
                                   xscale = 0.0, yscale = 0.0)
         alignment.add(label)
-        table.attach(alignment, 0, 1, 15, 16)
+        table.attach(alignment, 0, 1, 16, 17)
 
         self._mlw = gtk.Label("35000")
@@ -301,7 +317,7 @@
                                   xscale = 0.0, yscale = 0.0)
         alignment.add(self._mlw)
-        table.attach(alignment, 1, 2, 15, 16)
-        
-        table.attach(gtk.Label("kg"), 2, 3, 15, 16)
+        table.attach(alignment, 1, 2, 16, 17)
+        
+        table.attach(gtk.Label("kg"), 2, 3, 16, 17)
 
         self.show_all()
@@ -322,7 +338,12 @@
         self._weightsTable.set_sensitive(False)
         
-        self._crew = -1
+        self._cockpitCrew = -1
+        self._cabinCrew = -1
         self._pax = -1
-        self._humanWeight = 82.0
+        self._dowCockpit = 2
+        self._cockpitCrewMemberWeight = 85.0
+        self._dowCabin = 2
+        self._cabinCrewMemberWeight = 75.0
+        self._humanWeight = 84.0
         self._bag = -1
         self._cargo = -1
@@ -343,11 +364,21 @@
     def _setupCalculated(self):
         """Setup the labels for the calculated values."""
-        if self._crew<0:
-            self._crewLabel.set_text(xstr("weighthelp_crew") % ("-",))
-            self._crewWeight.set_text("-")
-        else:
-            self._crewLabel.set_text(xstr("weighthelp_crew") % (str(self._crew),))
-            crewWeight = self._crew * self._humanWeight
-            self._crewWeight.set_text("%.0f" % (crewWeight,))
+        if self._cockpitCrew<0:
+            self._cockpitCrewLabel.set_text(xstr("weighthelp_cockpit_crew") % ("-",))
+            self._cockpitCrewWeight.set_text("-")
+        else:
+            self._cockpitCrewLabel.set_text(xstr("weighthelp_cockpit_crew") %
+                                            (str(self._cockpitCrew),))
+            crewWeight = (self._cockpitCrew - self._dowCockpit) * self._cockpitCrewMemberWeight
+            self._cockpitCrewWeight.set_text("%.0f" % (crewWeight,))
+            
+        if self._cabinCrew<0:
+            self._cabinCrewLabel.set_text(xstr("weighthelp_cabin_crew") % ("-",))
+            self._cabinCrewWeight.set_text("-")
+        else:
+            self._cabinCrewLabel.set_text(xstr("weighthelp_cabin_crew") %
+                                          (str(self._cabinCrew),))
+            crewWeight = (self._cabinCrew - self._dowCabin) * self._cabinCrewMemberWeight
+            self._cabinCrewWeight.set_text("%.0f" % (crewWeight,))
             
         if self._pax<0:
@@ -423,10 +454,15 @@
         It returns a tuple with these two items. If any of the items cannot be
         calculated, that is -1."""
-        if self._crew<0 or self._pax<0 or \
+        if self._cockpitCrew<0 or self._cabinCrew<0 or self._pax<0 or \
                self._bag<0 or self._cargo<0 or self._mail<0:
             payload = -1
         else:
-            payload = (self._crew + self._pax) * self._humanWeight + \
-                      self._bag + self._cargo + self._mail
+            payload = \
+              (self._cockpitCrew - self._dowCockpit) * \
+              self._cockpitCrewMemberWeight + \
+              (self._cabinCrew - self._dowCabin) * \
+              self._cabinCrewMemberWeight + \
+              self._pax * self._humanWeight + \
+              self._bag + self._cargo + self._mail
 
         if payload<0 or self._dowValue<0:
@@ -444,5 +480,6 @@
         self._gui.logger.untimedMessage("The weight calculation help function was used by the pilot")
 
-        self._crew = self._gui.numCrew
+        self._cockpitCrew = self._gui.numCockpitCrew
+        self._cabinCrew = self._gui.numCabinCrew
         self._pax = self._gui.numPassengers
         self._bag = self._gui.bagWeight
@@ -451,4 +488,8 @@
         
         aircraft = self._gui.flight.aircraft
+        self._dowCockpit = aircraft.dowCockpit
+        self._cockpitCrewMemberWeight = aircraft.cockpitCrewWeight
+        self._dowCabin = aircraft.dowCabin
+        self._cabinCrewMemberWeight = aircraft.cabinCrewWeight
         self._humanWeight = aircraft.humanWeight
         self._dowValue = aircraft.dow
