<tmpl_var header_template escape="none">

<br><br><br><br><br>
<table cellpadding="0" cellspacing="0" border="0" align="center" width="40%">
<tr>
  <td class="titlebar">Change Password</td>
</tr>
<tr>
  <td align="center" class="windowlight">
    <form action="<tmpl_var url_chpwd>/openwebmail-prefs.pl" method="post" name="passwordform">
    <input type="hidden" name="action" value="changepassword">
    <input type="hidden" name="sessionid" value="<tmpl_var sessionid escape="html">">
    <input type="hidden" name="folder" value="<tmpl_var folder escape="html">">
    <input type="hidden" name="message_id" value="<tmpl_var message_id escape="html">">
    <input type="hidden" name="sort" value="<tmpl_var sort escape="html">">
    <input type="hidden" name="page" value="<tmpl_var page escape="html">">
    <input type="hidden" name="longpage" value="<tmpl_var longpage escape="html">">
    <input type="hidden" name="userfirsttime" value="<tmpl_var userfirsttime escape="html">">
    <input type="hidden" name="prefs_caller" value="<tmpl_var prefs_caller escape="html">">

    <table cellspacing="2" cellpadding="0" border="0" align="center">
    <tr>
      <td class="windowlight" colspan="2">&nbsp;</td>
    </tr>
    <tr>
      <td class="windowlight" align="right">UserID:</td>
      <td><input type="text" size="20" name="loginname" value="<tmpl_var loginnametext escape="html">" disabled="1"></td>
    </tr>
    <tr>
      <td class="windowlight" align="right">Old Password:</td>
      <td><input type="password" size="20" name="oldpassword" value=""></td>
    </tr>
    <tr>
      <td class="windowlight" align="right">New Password:</td>
      <td><input type="password" size="20" name="newpassword" value=""></td>
    </tr>
    <tr>
      <td class="windowlight" align="right">Confirm New Password:</td>
      <td><input type="password" size="20" name="confirmnewpassword" value=""></td>
    </tr>
    <tr>
      <td class="windowlight" colspan="2">&nbsp;</td>
    </tr>
    <tr>
      <td class="windowlight" colspan="2">
        <table cellpadding="8" cellspacing="0" border="0" align="center">
        <tr>
          <td class="windowlight" align="center">
            <input type="submit" name="passwordformsubmit" value="Change Password" onclick="return changecheck();">
            </form>
          </td>
          <td class="windowlight" align="center">
            <form action="<tmpl_var url_cgi escape="none">/openwebmail-prefs.pl" method="post" name="cancelform">
            <input type="hidden" name="action" value="editprefs">
            <input type="hidden" name="sessionid" value="<tmpl_var sessionid escape="html">">
            <input type="hidden" name="folder" value="<tmpl_var folder escape="html">">
            <input type="hidden" name="message_id" value="<tmpl_var message_id escape="html">">
            <input type="hidden" name="sort" value="<tmpl_var sort escape="html">">
            <input type="hidden" name="page" value="<tmpl_var page escape="html">">
            <input type="hidden" name="longpage" value="<tmpl_var longpage escape="html">">
            <input type="hidden" name="userfirsttime" value="<tmpl_var userfirsttime escape="html">">
            <input type="hidden" name="prefs_caller" value="<tmpl_var prefs_caller escape="html">">
            <input type="submit" name="cancelformsubmit" value="Cancel">
            </form>
          </td>
        </tr>
        </table>
      </td>
    </tr>
    <tr>
      <td class="windowlight" colspan="2">&nbsp;</td>
    </tr>
    </table>
  </td>
</tr>
</table>

<script type="text/javascript">
<!--
   document.passwordform.oldpassword.focus()

   function changecheck() {
      var s = document.passwordform.newpassword.value;
      if (s.length < <tmpl_var passwd_minlen escape="js">) {
         alert("Password must have at least <tmpl_var passwd_minlen escape="js"> characters.");
         return false;
      }
      if (document.passwordform.newpassword.value != document.passwordform.confirmnewpassword.value) {
         alert("New password confirm mismatch.");
         return false;
      }
      if (document.passwordform.newpassword.value == document.passwordform.oldpassword.value) {
         alert("New password is the same as the old one.");
         return false;
      }
      return true;
   }
//-->
</script>

<tmpl_var footer_template escape="none">
