<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 msgedit(TID, MID){ hwstring="scrollbars=yes,width=600,height=450,resizable=yes,toolbar=no,menubar=no"; var newwin = window.open("(%ENV_SCRIPT_NAME%)?cmd=msgedit&tid=" + TID + "&mid=" + MID + "&sid=(%INPUT_sid%)&style=(%INPUT_style%)", "TTXMsgEditor", hwstring); }
//--></script>
<script language="JavaScript"><!--
function msgdel(TID, MID){
 if (confirm("[%Please confirm message deletion%]")) {
   msg = document.newticket.problem.value;
   window.location.href = "(%ENV_SCRIPT_NAME%)?cmd=msgdel&sid=(%INPUT_sid%)&tid="+ TID + "&mid=" + MID + "&style=(%INPUT_style%)&problem="+escape(msg);
 }
}
//--></script>
<script language="JavaScript"><!--
function ticked(ID){ hwstring="scrollbars=yes,width=450,height=(%TICKEDHEIGHT%),resizable=yes,toolbar=no,menubar=no"; var newwin = window.open("(%ENV_SCRIPT_NAME%)?cmd=ticketed&tid=" + ID + "&sid=(%INPUT_sid%)&style=(%INPUT_style%)&isticket=1", "TicketEditor", hwstring); }
//--></script>
<script language="JavaScript"><!--
function showitem(ID){ hwstring="scrollbars=yes,width=650,height=350,resizable=yes,toolbar=no,menubar=no"; var newwin = window.open("(%ENV_SCRIPT_NAME%)?cmd=showitem&id=" + ID + "&sid=(%INPUT_sid%)&style=(%INPUT_style%)&isticket=1", "ItemInfo", hwstring); return false; }
//--></script>
<script language="JavaScript"><!--
function confirmdel()
{
 return confirm("[%Please confirm ticket removal%]");
}
//--></script>
<script language="JavaScript"><!--
function answerlib(){
hwstring="scrollbars=yes,width=700,height=360,resizable=yes,toolbar=no,menubar=no";
var newwin = window.open("(%ENV_SCRIPT_NAME%)?cmd=answerlib&sid=(%INPUT_sid%)&style=(%INPUT_style%)", 'TTXAnswerLib', hwstring);
newwin.focus();
return false;
}
//--></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>
<script language="JavaScript"><!--
function markuphelp(){
hwstring="scrollbars=yes,width=650,height=300,resizable=yes,toolbar=no,menubar=no";
var newwin = window.open("(%ENV_SCRIPT_NAME%)?cmd=markuphelp", 'TTXQuickHelp', hwstring);
return false;
}
//--></script>


<table width=(%HTMLBASEWIDTH%) cellspacing=0 cellpadding=0 bgcolor="#C6D7CF" style="padding-left: 5px; padding-right: 5px">
<form method=post action="(%ENV_SCRIPT_NAME%)" name=newticket id=newticket enctype="multipart/form-data" onsubmit="return onlyonce()">
<input type=hidden name=cmd value=ticket>
<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=key value=(%INPUT_key%)>
<input type=hidden name=qsort value="(%INPUT_qsort%)">
<input type=hidden name=qsortorder value="(%INPUT_qsortorder%)">
<input type=hidden name=qoffset value=(%INPUT_qoffset%)>
<input type=hidden name=qwindow value=(%INPUT_qwindow%)>
<input type=hidden name=oper value=(%INPUT_oper%)>
<input type=hidden name=status value=(%INPUT_status%)>
<input type=hidden name=lname value=(%INPUT_lname%)>
<input type=hidden name=emailkey value=(%INPUT_emailkey%)>
<input type=hidden name=c0 value="(%INPUT_c0%)">
<input type=hidden name=c1 value="(%INPUT_c1%)">
<input type=hidden name=c2 value="(%INPUT_c2%)">
<input type=hidden name=c3 value="(%INPUT_c3%)">
<input type=hidden name=c4 value="(%INPUT_c4%)">
<input type=hidden name=c5 value="(%INPUT_c5%)">
<input type=hidden name=c6 value="(%INPUT_c6%)">
<input type=hidden name=c7 value="(%INPUT_c7%)">
<input type=hidden name=c8 value="(%INPUT_c8%)">
<input type=hidden name=c9 value="(%INPUT_c9%)">
<input type=hidden name=fltrsubj value="(%INPUT_fltrsubj%)">
        <tr>
                <td colspan=6 class=tiny>&nbsp</td>
        </tr>
        (%INVENTORYROW%)
        <tr>
                <td align=left class=lbl>[%Subject%]</td>
                <td>&nbsp;&nbsp;</td>
                <td align=left>(%TICKEDOPEN%)(%TICKET_subject%)(%TICKEDCLOSE%)</td>
                <td align=left class=lbl>[%Group%]</td>
                <td>&nbsp;&nbsp;</td>
                <td align=left>(%TICKET_GROUP%)</td>
        </tr>
        <tr>
                <td align=left class=lbl>[%Status%]</td>
                <td>&nbsp;&nbsp;</td>
                <td align=left width=90%>[%(%TICKET_status%)%]</td>
                <td align=left class=lbl>[%Operator%]</td>
                <td>&nbsp;&nbsp;</td>
                <td align=left>(%TICKET_oper%)</td>
        </tr>
        <tr>
                <td align=left class=lbl>[%Created%]</td>
                <td>&nbsp;&nbsp;</td>
                <td align=left>(%TICKET_open%)</td>
                <td align=left class=lbl>[%Customer%]</td>
                <td>&nbsp;&nbsp;</td>
                <td align=left><nobr>(%TICKET_name%) (<a href="mailto:(%TICKET_email%)">(%TICKET_email%)</a>)</nobr></td>
        </tr>
        <tr>
                <td align=left class=lbl>[%Solved%]</td>
                <td>&nbsp;&nbsp;</td>
                <td align=left>(%TICKET_closed%)</td>
                <td align=left class=lbl><nobr>[%Access key%]</nobr></td>
                <td>&nbsp;&nbsp;</td>
                <td align=left>(%TICKET_key%)</td>
        </tr>
        <tr>
                <td colspan=6 class=tiny>&nbsp</td>
        </tr>
</table>
<br class=tiny>
<table width=(%HTMLBASEWIDTH%) cellspacing=0 cellpadding=0>
(%MESSAGES%)
        <tr>
                <td colspan=2 class=tiny>&nbsp</td>
        </tr>
        <tr>
                <td valign=top align=left bgcolor="#CFDCE8" style="padding-left: 5px">
                        <br><span class=lbl>[%New status%]</span><br class=tiny>
                        (%NEWSTATUS%)
                </td>
                <td valign=top align=left bgcolor="#CFDCE8" style="padding-left: 5px"><br><span class=lbl>&nbsp;[%Message%]</span>(%ANSWERLIB%)(%PREVIEW%)
                &nbsp;&nbsp;<a href=# onClick="return markuphelp()">[%Markup help%]</a><br class=tiny>
                        <table>
                                <tr>
                                        <td align=right>
                                        <textarea name=problem wrap=virtual cols=60 rows=10>(%INPUT_problem%)</textarea><br class=tiny>
                                        (%FILEFORMS%)<br class=tiny>(%TRACKTIME%)
                                        <input type=submit value="[%Add message%]">
                                        <input type=submit name=cancel value="[%No changes%]">
                                        (%DELTICKET%)<br><br class=tiny>
                                        </td>
                                </tr>
                        </table>
                </td>
        </tr>
        </form>
</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>
