--- loncom/interface/loncommon.pm	2004/07/03 19:12:41	1.195
+++ loncom/interface/loncommon.pm	2004/07/15 18:50:37	1.199
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.195 2004/07/03 19:12:41 albertel Exp $
+# $Id: loncommon.pm,v 1.199 2004/07/15 18:50:37 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -250,6 +250,8 @@ of the element the selection from the se
 =cut
 
 sub browser_and_searcher_javascript {
+    my ($mode)=@_;
+    if (!defined($mode)) { $mode='edit'; }
     my $resurl=&lastresurl();
     return <<END;
     var editbrowser = null;
@@ -259,7 +261,7 @@ sub browser_and_searcher_javascript {
             url += 'launch=1&';
         }
         url += 'catalogmode=interactive&';
-        url += 'mode=edit&';
+        url += 'mode=$mode&';
         url += 'form=' + formname + '&';
         if (only != null) {
             url += 'only=' + only + '&';
@@ -284,7 +286,7 @@ sub browser_and_searcher_javascript {
             url += 'launch=1&';
         }
         url += 'catalogmode=interactive&';
-        url += 'mode=edit&';
+        url += 'mode=$mode&';
         url += 'form=' + formname + '&';
         if (titleelement != null) {
             url += 'titleelement=' + titleelement + '&';
@@ -660,9 +662,15 @@ sub help_open_menu {
     } else {
         $link = "javascript:helpMenu('display')";
     }
-    my $banner_link = "/adm/helpmenu?page=banner&color=$color&function=$function&topic=$topic&component_help=$component_help&faq=$faq&bug=$bug&origurl=$origurl&stamp=$timestamp";
+    my $banner_link = "/adm/helpmenu?page=banner&color=$color&function=$function&topic=$topic&component_help=$component_help&faq=$faq&bug=$bug&origurl=$origurl&stamp=$timestamp&stayonpage=$stayOnPage";
     my $details_link = "/adm/helpmenu?page=body&color=$color&function=$function&topic=$topic&component_help=$component_help&faq=$faq&bug=$bug&origurl=$origurl&stamp=$timestamp";
-    my $template .= <<"ENDTEMPLATE";
+    my $template;
+    if ($text ne "") {
+	$template .= 
+  "<table bgcolor='#337733' cellspacing='1' cellpadding='1' border='0'><tr>".
+  "<td bgcolor='#448844'><a href=\"$link\"><font color='#FFFFFF' size='2'>$text</font></a>";
+    }
+    $template .= <<"ENDTEMPLATE";
  <script>
 function helpMenu(caller) {
     if (caller == 'open') {
@@ -682,6 +690,7 @@ function helpMenu(caller) {
  </script>
  <a href="$link" title="$title"><image src="/adm/lonMisc/smallFAQ.gif" border="0" alt="(Help Menu)" /></a>
 ENDTEMPLATE
+    if ($text ne '') { $template.='</td></tr></table>' };
     return $template;
 }
 
@@ -1874,6 +1883,9 @@ returns description of a specified copyr
 sub copyrightdescription {
     return &mt($cprtag{shift(@_)});
 }
+
+=pod
+
 =item * source_copyrightids() 
 
 returns list of all source copyrights