Index: trunk/MagicSoft/Mars/datacenter/db/builddatasets.php
===================================================================
--- trunk/MagicSoft/Mars/datacenter/db/builddatasets.php	(revision 8249)
+++ trunk/MagicSoft/Mars/datacenter/db/builddatasets.php	(revision 8273)
@@ -301,6 +301,12 @@
             $_GET["fIMCLimit1"]=$first?"00":"";
 
+        if (empty($_GET["fIMCLimit2"]))
+            $_GET["fIMCLimit2"]=$first?"00":"";
+
         if (empty($_GET["fIsoInLimit1"]))
             $_GET["fIsoInLimit1"]=$first?"00":"";
+
+        if (empty($_GET["fIsoInLimit2"]))
+            $_GET["fIsoInLimit2"]=$first?"00":"";
 
         if (empty($_GET["fInhomLimitMean"]))
@@ -563,5 +569,5 @@
                              );
                 //get runtimes of dataset
-                function GetSequenceValues($db_id, $sequences, $txt,&$values)
+                function GetSequenceValues($db_id, $sequences, $txt, &$values)
                 {
                     $query="SELECT COUNT(*) ";
@@ -616,6 +622,5 @@
 
                 //check observationmode for on-sequences
-                $query="SELECT fObservationModeKEY FROM Sequences where fSequenceFirst IN ('" . $sequences . "') GROUP BY fObservationModeKEY";
-//                printf("q: %s <br>", $query);
+                $query="SELECT fObservationModeKEY FROM Sequences where fSequenceFirst IN (" . $on . ") GROUP BY fObservationModeKEY";
                 $result = mysql_query($query, $db_id);
                 $numobskeys=mysql_num_rows($result);
@@ -711,6 +716,14 @@
                     {
                         printf("<li style='color:%s'>%s: You have selected more than one (%s) different observation modes for your on sequences",
-                               $color["ERROR"], "ERROR", $numobskeys);
-                        $numerr=$numerr+1;
+                               $color["ERROR"], "WARN", $numobskeys);
+//                        $numerr=$numerr+1;
+                    }
+                    if (empty($_POST["fObservationModeKEY"]) && !empty($_GET["obsmode"]))
+                        $_POST["fObservationModeKEY"]=$_GET["obsmode"];
+                    if ($_POST["fObservationModeKEY"]==3 && empty($off))
+                    {
+                        printf("<li style='color:%s'>%s: You have selected on/off mode, but you haven't chosen any off sequences.",
+                               $color["ERROR"], "WARN");
+//                        $numerr=$numerr+1;
                     }
                     if (empty($realsourcekey))
@@ -801,6 +814,4 @@
                     if (empty($_POST["comment"]) && !empty($_GET["comment"]))
                         $_POST["comment"]=$_GET["comment"];
-                    if (empty($_POST["fObservationModeKEY"]) && !empty($_GET["obsmode"]))
-                        $_POST["fObservationModeKEY"]=$_GET["obsmode"];
                     if (empty($_POST["fUserKEY"]) && !empty($_GET["username"]))
                         $_POST["fUserKEY"]=$_GET["username"];
@@ -851,7 +862,7 @@
                     printf("<table><tr><td colspan='2' align='center'>Dataset</td></tr>");
                     printf("<tr><td>proposed DataSet#: </td><td>%s</td></tr>", $dataset);
-                    printf("<tr><td>SequencesOn:</td><td> %s</td></tr>", $sequon);
+                    printf("<tr><td valign='top'>SequencesOn:</td><td> %s</td></tr>", $sequon);
                     if (!empty($sequoff))
-                        printf("<tr><td>SequencesOff:</td><td> %s</td></tr>", $sequoff);
+                        printf("<tr><td valign='top'>SequencesOff:</td><td> %s</td></tr>", $sequoff);
                     printf("<tr><td>Scale: </td><td>%0.2f</td></tr>", $scale);
                     printf("<tr><td>SourcenamesOn[%s]: </td><td>%s</td></tr>", str_word_count($sourceson), $sourceson);
