Cleanup indentation + spelling fix
[squirrelmail.git] / functions / page_header.php
index 5700e48b942c48ce3f3f6e0c791f0a073db85bb1..726cf000e1904f449b4667ce4d6cb0861e2a5608 100644 (file)
@@ -8,7 +8,7 @@
  *
  * Prints the page header (duh)
  *
- * $Id$
+ * @version $Id$
  * @package squirrelmail
  */
 
@@ -168,6 +168,15 @@ function displayPageHeader($color, $mailbox, $xtra='', $session=false) {
                            '"width='.$compose_width. ',height='.$compose_height.
                            ',scrollbars=yes,resizable=yes");'."\n".
                            "}\n\n";
+                    $js .= "function comp_in_new(comp_uri) {\n".
+                           "       if (!comp_uri) {\n".
+                           '           comp_uri = "'.$compose_uri."\";\n".
+                           '       }'. "\n".
+                           '    var newwin = window.open(comp_uri' .
+                           ', "_blank",'.
+                           '"width='.$compose_width. ',height='.$compose_height.
+                           ',scrollbars=yes,resizable=yes");'."\n".
+                           "}\n\n";
                 }
 
                 // javascript for sending read receipts
@@ -306,7 +315,7 @@ function displayPageHeader($color, $mailbox, $xtra='', $session=false) {
                                  : html_tag( 'td', '', 'left' ) )
         . "\n";
     $urlMailbox = urlencode($mailbox);
-    echo makeComposeLink('src/compose.php?mailbox='.$urlMailbox.'&startMessage='.$startMessage);
+    echo makeComposeLink('src/compose.php?mailbox='.$urlMailbox.'&startMessage='.$startMessage);
     echo "  \n";
     displayInternalLink ('src/addressbook.php', _("Addresses"));
     echo "  \n";