Index: trunk/MagicSoft/Mars/datacenter/db/showplots.php
===================================================================
--- trunk/MagicSoft/Mars/datacenter/db/showplots.php	(revision 8588)
+++ trunk/MagicSoft/Mars/datacenter/db/showplots.php	(revision 8598)
@@ -11,4 +11,5 @@
 printf("<body>\n");
 
+//init
 $seq=0;
 if (!empty($_GET["seq"]))
@@ -25,10 +26,9 @@
 if (!empty($seq))
 {
+    //decision whether next or previous plot has been chosen
     if (!empty($_GET["next"]))
         $tabnum=$tabnum+1;
     if (!empty($_GET["prev"]))
         $tabnum=$tabnum-1;
-    $type=gettypename($type2);
-    $plot=getplotname($seq, $tabnum, $type, $type2);
 
     //be careful: this has to be adapted in case tabs are removed or new tabs are added
@@ -41,4 +41,6 @@
     $startabs=18;
 
+    //in case the tab does not exist, because it's one the far
+    //go to next type
     if (($type2=="calib" && $tabnum==($calibtabs+1))
         || ($type2=="signal" && $tabnum==($signaltabs+1))
@@ -58,7 +60,7 @@
             break;
         }
-        $type=gettypename($type2);
-        $plot=getplotname($seq, $tabnum, $type, $type2);
     }
+    //in case the tab does not exist, because it's 0
+    //go to previous type
     if ($tabnum==0)
     {
@@ -78,7 +80,9 @@
             break;
         }
-        $type=gettypename($type2);
-        $plot=getplotname($seq, $tabnum, $type, $type2);
     }
+    //get link for plot
+    $type=gettypename($type2);
+    $plot=getplotname($seq, $tabnum, $type, $type2);
+
     $next=$tabnum+1;
     $prev=$tabnum-1;
@@ -86,7 +90,8 @@
 printf("<form action='showplots.php' method='GET'>\n");
 printf("<table width='100%%' border='0'>\n");
-printf("<tr><td align='center'>\n");
+printf("<tr><td valign='top'>\n");
+printf("<a href='http://db.astro.uni-wuerzburg.de'>home</a>\n</td><td align='center'>");
 printf("<input type='text' name='seq' size='10' maxlength='10' value='%s'>\n", $seq);
-printf("<input type='text' name='type2' size='10' maxlength='10' value='%s'>\n", $type2);
+PrintType2PullDown($type2);
 printf("<input type='text' name='tabnum' size='2' maxlenght='2' value='%s'>\n", $tabnum);
 printf("<input type='submit' value='Show Plot'><br>\n");
@@ -97,9 +102,9 @@
     printf("<input type='submit' value='Next Plot %d >>' name='next'>\n", $next);
 }
-printf("</td>\n</tr>\n<tr>\n<td align='center'>\n");
+printf("</td>\n</tr>\n<tr>\n<td align='center' colspan='2'>\n");
 if (!empty($seq))
     printf("<img src='%s'>", $plot);
 else
-    printf("You have to select a sequence.");
+    printf("You have to insert a sequence number into the first field.");
 printf("</td>\n</tr>\n</table>\n");
 printf("</form>\n");
