<script language="javascript"><!--
numberoftimes = 0;
        function onlyonce() {
        numberoftimes += 1;
        if (numberoftimes > 1) {
                var themessage = "[%Please be patient. Submission is in progress...%]";
            alert(themessage);
            return false;
        } else {
                return true;
        }
}
// -->
</script>
<script language="JavaScript"><!--
function preview(){
hwstring="scrollbars=yes,width=600,height=500,resizable=yes,toolbar=no,menubar=no";
var newwin = window.open('', 'winpreview', hwstring);
newwin.focus();
document.forms['preview'].msg.value = document.forms['newticket'].problem.value;
document.forms['preview'].submit();
return false;
}
//--></script>
<table width=(%HTMLBASEWIDTH%) cellspacing=0 cellpadding=0 bgcolor="#CFDCE8">
  <tr>
    <td align=center><br class=tiny>
<form method=post action="(%ENV_SCRIPT_NAME%)" name=newticket enctype="multipart/form-data" onsubmit="return onlyonce()">
<input type=hidden name=cmd value=newticket>
<input type=hidden name=style value="(%INPUT_style%)">
<input type=hidden name=sid value=(%INPUT_sid%)>
<input type=hidden name=do value=1>
<input type=hidden name=tid value=(%INPUT_tid%)>
<input type=hidden name=form value=(%INPUT_form%)>
      <table cellspacing=0 cellpadding=3>
      <tr>
        <td align=right class=lbl>[%Name%]<font color=red><sup>*</sup></font></td>
        <td align=left><input type=text size=25 name=name value="(%INPUT_name%)"></td>
      </tr>
      <tr>
        <td align=right class=lbl>[%Email%]<font color=red><sup>*</sup></font></td>
        <td align=left><input type=text size=25 name=email value="(%INPUT_email%)"></td>
      </tr>
      (%CUSTOMVARS%)
      (%ITEMSELSTD%)
      (%OPERSELSTD%)
      (%GROUPSELSTD%)
      <tr>
        <td align=right class=lbl>[%Subject%]<font color=red><sup>*</sup></font></td>
        <td align=left><input type=text size=40 name=subject value="(%INPUT_subject%)"></td>
      </tr>
      (%KIDFORM%)
      <tr>
        <td colspan=2 align=center>
           <table cellspacing=0 cellpadding=0>
              <tr>
                <td align=left>
                  <span class=lbl>[%Problem%]</span>&nbsp;&nbsp;&nbsp;<a href=#teditor onClick="return preview()">[%preview%]</a><br class=tiny>
                  <textarea name=problem wrap=virtual cols=50 rows=10>(%INPUT_problem%)</textarea>
                </td>
              </tr>
           </table>
        </td>
      </tr>
      <tr><td colspan=2 align=left>(%FILEFORMS%)</td></tr>
      <tr>
        <td align=left>(%INTERNALCHECKBOX%)</td>
        <td align=right><input type=submit value="[%Submit%]"><br><br class=tiny></td>
      </tr>
</form>
      </table>
    </td>
  </tr>
</table>
<form method="post" action="(%ENV_SCRIPT_NAME%)" id="preview" target="winpreview" >
<input type=hidden name=cmd value=preview>
<input type=hidden name=style value="(%INPUT_style%)">
<input type=hidden name=sid value=(%INPUT_sid%)>
<input type=hidden name=key value=(%INPUT_key%)>
<input type=hidden name=msg>
</form>
