/* Output the javascript onload function. */
$header = "<script type=\"text/javascript\">\n" .
"<!--\n".
+ " var alreadyFocused = false;\n".
" function squirrelmail_loginpage_onload() {\n".
+ " if (alreadyFocused) return;\n".
" var textElements = 0; var i = 0;\n".
" for (i = 0; i < document.forms[0].elements.length; i++) {\n".
" if (document.forms[0].elements[i].type == \"text\" || document.forms[0].elements[i].type == \"password\") {\n".
<?php echo _("Name:"); ?>
</td>
<td class="sqm_loginFieldInput">
- <input type="text" name="login_username" value="<?php echo $login_field_value; ?>" id="login_username" />
+ <input type="text" name="login_username" value="<?php echo $login_field_value; ?>" id="login_username" onfocus="alreadyFocused=true;" />
</td>
</tr>
<tr>
<?php echo _("Password:"); ?>
</td>
<td class="sqm_loginFieldInput">
- <input type="password" name="secretkey" value="" id="secretkey" />
+ <input type="password" name="secretkey" value="" id="secretkey" onfocus="alreadyFocused=true;" />
<?php echo $login_extra; ?>
</td>
</tr>
<?php echo _("Name:"); ?>
</td>
<td class="fieldInput">
- <input type="text" name="login_username" value="<?php echo $login_field_value; ?>" id="login_username" class="input" />
+ <input type="text" name="login_username" value="<?php echo $login_field_value; ?>" id="login_username" class="input" onfocus="alreadyFocused=true;" />
</td>
</tr>
<tr>
<?php echo _("Password:"); ?>
</td>
<td class="fieldInput">
- <input type="password" name="secretkey" value="" id="secretkey" class="input" />
+ <input type="password" name="secretkey" value="" id="secretkey" class="input" onfocus="alreadyFocused=true;" />
<?php echo $login_extra; ?>
</td>
</tr>