<script type="text/javascript">
    searchfilter = "{searchfilter}";
    searchcustomerid = "{searchcustomerid}";
    defaultfiltername = "{defaultfiltername}";

    var gridsavedstate = '{GRIDSAVEDSTATE}';
    if(gridsavedstate!=""){
        gridsavedstate = Ext.util.JSON.decode(gridsavedstate);
    }else{
        //set default settings
        gridsavedstate = Ext.util.JSON.decode('{"sortinfo":{field : "datesubmitted",dir: "asc"},"displaysize":"25","tickettypefilter":"0"}');
    }

</script>

<!-- BEGIN DYNAMIC BLOCK: advancedsearchblock -->
<div id="searchquerynoticebox" class="notice">
    <div class="inside">
        <p>
            <span style="float:left;">
                <b>[l]Filter Type[/l]</b>: <span style="background:#FFFFCC none repeat scroll 0 0;text-transform: capitalize;">{advancedsearchtypepretty}</span><br/>
                <!-- BEGIN DYNAMIC BLOCK: advancedsearchblock_customerfilter -->
                <b>[l]Customer Name[/l]</b>: <span style="background:#FFFFCC none repeat scroll 0 0;">{customername}</span>
                <!-- END DYNAMIC BLOCK: advancedsearchblock_customerfilter -->
            </span>
            <span style="float:right;position:relative;top:-4px;">
                <input type="button" onclick="location.href = 'index.php?fuse=support&view=ViewTickets'" id="clearquerybutton" class="button" value="[l]Clear Query[/l]"/>
            </span>
        </p>
    </div>
</div>
<!-- END DYNAMIC BLOCK: advancedsearchblock -->

<!-- BEGIN DYNAMIC BLOCK: customsearchblock -->
<div id="customquerynoticebox" style="display:{customquerynoticebox_display}" class="notice">
    <div class="inside">
        <p>
            <b>[l]Custom Filter Query as[/l]</b>: <input type="text" id="filtername" value='Unsaved Filter'/> <input style="width:10px;" id="filterprivate" type="checkbox"/> [l]Private[/l]<br/>
            <input type="button" id="updatecustomfilter" style="display:inline !important; margin-left:0px !important;" class="button" value="[l]Update Filter[/l]"/>
            <input type="button" id="deletecustomfilter" style="display:none;" class="button" value="[l]Delete Filter[/l]"/>
            <br/><br/>
        </p>
    </div>
</div>
<!-- END DYNAMIC BLOCK: customsearchblock -->
<span class="grid-meta" id="ticketlistlabel"></span>
<div class="blue-box" style="padding:4px !important;">
    <table class="automation">
        <tbody>
            <tr>
                <td>
                    <span id="ticketlisttablelabel"></span>
                </td>
                <td align="right">[l]Filter Type[/l]: &nbsp;&nbsp;</td>
                <td align="left"  style="width:100px">
                    <input type="text" id="tickettype" size="50"/>
                </td>
                <td align="right" style="width:80px">[l]Display[/l]: &nbsp;&nbsp;</td>
                <td align="left"  style="width:60px">
                    <input type="text" id="displayticketscount-with-qtip" size="20"/>
                </td>
            </tr>
        </tbody>
    </table>
</div>

<div>
    <div id="tickets-grid"></div>
</div>

<script type="text/javascript">ViewTickets();</script>