<?cs include:"super_util.cs" ?>

<?cs def:print_text_box(name, type, label, max) ?>
  <tr>
    <th align="left"><?cs var:label.msg ?></th>
    <td><input type="<?cs var:type ?>" id="<?cs var:name ?>" name="<?cs var:name ?>" title="<?cs var:label.help ?>" size="15" maxlength="<?cs var:max ?>" class="super_color_text" /></td>
  </tr>
<?cs /def ?>
 
<?cs def:print_content() ?>
<fieldset>
 <legend><?cs var:lang.super_chg_passwd_form.page_title ?></legend>
 <div class="instruction">
  <h4><?cs var:lang.super_chg_passwd_form.notes ?></h4>
  <ul>
   <?cs each:this = lang.super_chg_passwd_form.desc ?>
    <li><?cs var:this ?></li>
   <?cs /each ?>
  </ul>
 </div>
 <table width="100%">
  <tr><td align="center">
    <div><form method="post" action="super_chg_passwd" onsubmit="return check_password()" >
      <div><input type="hidden" name="id" value="<?cs var:Query.id ?>" /></div>
    <table cellspacing="0" cellpadding="4">
      <?cs call:print_text_box("current", "password", lang.super_chg_passwd_form.label.0, max_username) ?>
      <?cs call:print_text_box("new", "password", lang.super_chg_passwd_form.label.1, max_password) ?>
      <?cs call:print_text_box("verify", "password", lang.super_chg_passwd_form.label.2, max_password) ?>
      <tr><td colspan="2" align="center">
       <input  type="submit" value="<?cs var:lang.super_chg_passwd_form.submit ?>" title="<?cs var:lang.super_chg_passwd_form.submit_help ?>" />
      </td></tr>
    </table> 
    </form>
    <script type="text/javascript">document.forms[0].current.focus();</script>
    </div> 
  </td></tr>
</table>
 </fieldset> 
<?cs /def ?>

<?cs call:html_header() ?> 
   <head>
      <title><?cs var:lang.super_chg_passwd_form.page_title ?></title>
   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
   <link rel="StyleSheet" href="<?cs var:image_path ?>super_template.css" type="text/css"  />
   <script type="text/javascript" src="<?cs var:image_path ?>form_validation.js"></script>
   <?cs call:addDoIMenu() ?>
   <script type="text/javascript">
    function check_password() 
    {
        var old_passwd = document.getElementById('current').value;
        var new_passwd = document.getElementById('new').value;
        var verify = document.getElementById('verify').value;
        if(is_whitespace(old_passwd) || is_whitespace(new_passwd) || is_whitespace(verify))
        {
             window.alert('<?cs var:lang.super_chg_passwd_form.all_fields_must_filled ?>');
             return false;
        }
        if(new_passwd != verify)
        {
             window.alert('<?cs var:lang.super_chg_passwd_form.new_retyped_passwd_not_same ?>');
             return false;
        }
       return window.confirm('<?cs var:lang.super_chg_passwd_form.confirm_msg ?>'); 
    }
   </script> 
  </head>

<body>
<div id="container">
 <?cs call:top_container() ?>
 <?cs call:doIMenu() ?>
 <div id="content">
  <?cs call:print_content() ?>
 </div>
</div>
</body>
</html>
<?cs call:runtime() ?>
