Linux browsers didn't like the older system.
[squirrelmail.git] / functions / page_header.php
index 0e204eb709c104a66981fc2678301e411ad8e839..5480c9b1f89a427a9cea94160f1ae97569fda3e0 100644 (file)
@@ -40,7 +40,7 @@
    function displayPageHeader($color, $mailbox) {
       displayHtmlHeader ();
 
-      echo "<BODY TEXT=\"$color[8]\" BGCOLOR=\"$color[4]\" LINK=\"$color[7]\" VLINK=\"$color[7]\" ALINK=\"$color[7]\" onLoad='if ( 0 in document.forms && document.forms[0].elements[0].type == \"text\" ) { document.forms[0].elements[0].focus(); }'>\n\n";
+      echo "<BODY TEXT=\"$color[8]\" BGCOLOR=\"$color[4]\" LINK=\"$color[7]\" VLINK=\"$color[7]\" ALINK=\"$color[7]\" onLoad='if ( ( document.forms.length > 0 ) && ( document.forms[0].elements[0].type == \"text\" ) ) { document.forms[0].elements[0].focus(); }'>\n\n";
 
       /** Here is the header and wrapping table **/
       $shortBoxName = readShortMailboxName($mailbox, ".");