<script type="text/javascript" src="../javascript/modules/home.js?version={VERSION}"></script>
<div id='ticketssnapshot'>
<!-- BEGIN DYNAMIC BLOCK: showfilter -->
<div id='ticketsfilter'>
	<table style="width:100%;" cellpadding='0' cellspacing='0' border='0'>
	<tr class="formField">
	<td>
	<!-- BEGIN DYNAMIC BLOCK: savefilter -->
	<form name="save_filter" method="post" action="index.php?fuse=support&action=SaveTicketFilter">
	                <input type="hidden" name="idfilter" value="{idFilter}" />
	                <input type="submit" name="save" class="button_large" value="[l]{actionfilter}[/l]" />
	                &nbsp;[l]as[/l]&nbsp;
	                <input type="text" name="filtername" value="{savedname}"/>
	                &nbsp;<input type="checkbox" name="private" {isprivate}/>
	                [l]private[/l]&nbsp; 
			    </form>
	<!-- END DYNAMIC BLOCK: savefilter -->
	<!-- BEGIN DYNAMIC BLOCK: deletefilter -->
	    <form name="delete_filter" method="post" action="index.php?fuse=support&action=DeleteTicketFilter">
	      <input type="hidden" name="idfilter" value="{idFilter}" />
	      <input type="submit" name="deletefilter" class="button_large" value="[l]delete filter[/l]" />
		</form>
	<!-- END DYNAMIC BLOCK: deletefilter -->
	</td>
	</tr>
	</table>	
</div>
<!-- END DYNAMIC BLOCK: showfilter -->
  <form name='tickets' id='tickets' method='post' action='index.php'>
    <table style="width:100%;" cellpadding='0' border='0' cellspacing='0'>
		<tr>
			<td class='snapshot-header-left'></td>
			<td class='snapshot-header'><span class='snapshot-header-text'>{LANGUAGE_SNAPSHOTHEADER}:</span></td>
			<td class='snapshot-header' align="right">
				<!-- BEGIN DYNAMIC BLOCK: show_ticket_filter -->
				<span class='snapshot-header-text-small'>[l]Ticket Filter[/l] : </span>
				<select id='ticketfilter' onChange="FilterTickets('support', 'FilterTickets_Async' ,this, '{DIVID}');">
					<option value='0' {OPTIONALLTICKETSSELECTED}>[l]View All Tickets[/l]</option>
					<option value='1' {OPTIONMYTICKETSSELECTED}>[l]My Tickets[/l]</option>
					<option value='4' {OPTIONUNASSIGNEDANDMYTICKETSSELECTED}>[l]My Tickets & Unassigned Tickets[/l]&nbsp;&nbsp;&nbsp;</option>
                    <!-- BEGIN DYNAMIC BLOCK: show_ticket_filter_viewUnassignedTickets -->
					<option value='2' {OPTIONUNASSIGNEDTICKETSSELECTED}>[l]Unassigned Tickets[/l]&nbsp;&nbsp;&nbsp;</option>
                    <!-- END DYNAMIC BLOCK: show_ticket_filter_viewUnassignedTickets -->
					<option value='-1'>-----------------</option>					
					<option value='3' {OPTIONACTIVECUSTOMERSELECTED}>[l]For Active Customer[/l]</option>										
					<option value='5' {OPTIONGUESTCUSTOMERSELECTED}>[l]For Guest Users[/l]</option>
					<option value='-1'>-----------------</option>							
				<!-- END DYNAMIC BLOCK: show_ticket_filter -->
					<!-- BEGIN DYNAMIC BLOCK: show_department_filter -->
						<option value='{deparId}' {deparSelected}>{deparLabel} [l]Department[/l]</option>
					<!-- END DYNAMIC BLOCK: show_department_filter -->
				<!-- BEGIN DYNAMIC BLOCK: show_ticket_filter2 -->
				   <option value='-1'>------Saved Filters------</option>
                    <!-- BEGIN DYNAMIC BLOCK: filterList -->
                        <option value="custom_{filterId}" {filterSelected}>{filterLabel}</option>
                    <!-- END DYNAMIC BLOCK: filterList -->   
                <!-- END DYNAMIC BLOCK: show_ticket_filter2 -->
			</td>
			<td class='snapshot-header-right'></td>
		</tr>
	</table>  
    <table style="width:100%;" class='sort-table' id='{CCTABLEID}' border='0' cellpadding='0' cellspacing='0'>
        <!-- BEGIN DYNAMIC BLOCK: checkboxColumnHeader1 -->
		<col style='text-align: right' />
        <!-- END DYNAMIC BLOCK: checkboxColumnHeader1 -->
        <col />
        <col />
        <col />
        <col />
        <col />
        <col />
        <col />
        <col />
        <thead>
            <tr>
                <!-- BEGIN DYNAMIC BLOCK: checkboxColumnHeader2 -->
				<td style="width:1%;"></td>
                <!-- END DYNAMIC BLOCK: checkboxColumnHeader2 -->
                <td style="width:1%;"></td>                
                <td align="left">[l]Subject[/l]</td>
                <td style="width:85px;" align="left">[l]Assigned To[/l]</td>
                <td style="width:80px;" align="left">[l]Ticket Type[/l]</td>
                <td style="width:90px;" align="left">[l]Time Elapsed[/l]</td>
                <td style="width:100px;" align="left">[l]Status[/l]</td>
                <td style="width:55px;" align="left">[l]Priority[/l]</td>
            </tr>
        </thead>                
        <tbody>
            <!-- BEGIN DYNAMIC BLOCK: ticket_row -->
			<tr class='{ROWCLASS}' style='{ROWSTYLE}'>
                <!-- BEGIN DYNAMIC BLOCK: checkboxColumnRows -->
                <td style="width:1%;"><input type='checkbox' style='position:relative;top:1px;' name="troubleticketid" value='{TICKETID}'  onClick='TroubleTicketItemCheck();' /></td>				
                <!-- END DYNAMIC BLOCK: checkboxColumnRows -->
				<!-- <td align=center>&nbsp;&nbsp;{POPUP_TICKETID}</td> -->
				<td align="center" style="{TICKET_GROUPCOLORSTYLE}"><img src="templates/{TEMPLATE}/images/tags/tag_{TICKET_TAG}.png" style="height:16;width:16" alt="" /></td>				
				<td>#{POPUP_TICKETLINK}</td>
				<td align='left' nowrap='nowrap' id='assignfield{TICKETID}'>{ASSIGNEDTONAME}</td>
				<td align='left' nowrap='nowrap'>{TICKETTYPE}</td>
				<td align='left' nowrap='nowrap'>{TIMEELAPSED}</td>
				<td align='left' nowrap='nowrap'>{STATUS}</td>
				<td align='center' class='{PRIORITYCLASS}'>{PRIORITY}</td>
			</tr>			
			<!-- END DYNAMIC BLOCK: ticket_row -->	
        </tbody>
    </table>

	<!-- BEGIN DYNAMIC BLOCK: ticket_record_footer -->
    <br>
    <table style="width:100%;" cellpadding='0' cellspacing='0' border='0'>
                <tr>
                    <!-- BEGIN DYNAMIC BLOCK: toggleAll -->
                    <td style="width:150px;" valign="middle" align="left" nowrap="nowrap">
                        <input name='allbox'id='allbox' value='0' type='checkbox' onClick="toggleAllTickets();" style='position:relative; left:3px; top:3px'><b>&nbsp;&nbsp;&nbsp;[l]Toggle All[/l]</b><br><br>
                    </td>
                    <!-- END DYNAMIC BLOCK: toggleAll -->
                </tr>
		<tr class="actionfooter">
		  <td style="width:150px;" valign="middle" align="left" nowrap="nowrap">
                <!-- BEGIN DYNAMIC BLOCK: deleteTicketBtn -->
				<input
				    type="button"
				    class="button_medium"
				    id="deleteticket"
				    name="deleteticket"
				    value='[lh]delete[/lh]'
				    style="filter:alpha(opacity=50);-moz-opacity:0.4;"
				    disabled="true"
				    onClick="DeleteTickets('support', 'DeleteTroubleTicket_Async','{MSG_CONFIRMDELETE}', '{DIVID}');" />
                <!-- END DYNAMIC BLOCK: deleteTicketBtn -->
                <!-- BEGIN DYNAMIC BLOCK: closeTicketBtn -->
				<input
				    type="button"
				    class="button_medium"
				    id="closeticket"
				    name="closeticket"
				    value='[lh]close[/lh]'
				    style="filter:alpha(opacity=50);-moz-opacity:0.4;"
				    disabled="true"
				    onClick="CloseTickets('support', 'CloseTickets_Async','{MSG_CONFIRMCLOSE}', '{DIVID}');" />
                <!-- END DYNAMIC BLOCK: closeTicketBtn -->
			</td>
			<td style="width:100%;">&nbsp;</td>
			<td align="right" nowrap="nowrap">
				<!-- BEGIN DYNAMIC BLOCK: show_assign_admin -->
				[l]Assign New Tickets To[/l] : 
				<select id='assignadminid' onChange="AssignTicket('support', 'AssignTickets_Async','{MSG_SELECTTICKET}', '{DIVID}')" >
				<option selected>[l]select dept or staff[/l]...</option>
				<!-- BEGIN DYNAMIC BLOCK: assigneeList -->
				<option value='{assigneeId}'>{assigneeLabel}</option>
				<!-- END DYNAMIC BLOCK: assigneeList -->
				</select>
				&nbsp;
				<!-- END DYNAMIC BLOCK: show_assign_admin -->
			</td>
		</tr>
    </table>   
	<!-- END DYNAMIC BLOCK: ticket_record_footer -->

	<!-- BEGIN DYNAMIC BLOCK: ticket_norecord_footer -->
	<table style="width:100%;" cellpadding='0' cellspacing='0' border='0'>
		<tr class="actionfooter">
			<td align='center'>
				<br/><span style="color:#808080;">[l]There are currently no items matching this query[/l]</span>
			</td>
		</tr>
	</table>	
	<!-- END DYNAMIC BLOCK: ticket_norecord_footer -->
  </form>
  <script type='text/javascript'>  
    var timeElapsedItems = new Array();
    var timeElapsedValues = new Array();
    <!-- BEGIN DYNAMIC BLOCK: timeElapsedItems -->
    timeElapsedItems.push('{TIMEELAPSED_ITEM}');
    timeElapsedValues.push('{TIMEELAPSED_VALUES}');
    <!-- END DYNAMIC BLOCK: timeElapsedItems -->

	{JAVASCRIPTFORDYNAMICMENU_CC}
	try{
		$('{SELECTEDSNAPSHOTID}').innerHTML = "{SELECTEDSNAPSHOTCOUNT}";	  
		activeSnapShotDiv = '{SELECTEDSNAPSHOTID}';	
	}catch(e){
	
	}
  </script>
</div>
