<h5 style="padding-left:21px;"><?php echo $this->lang("Support Tickets"); ?></h5>
<div id="supportfilterlinks" style="padding-bottom:20px;">
    <ul>
        <li class="filters">
            <a id="recenttoggle" href="javascript:toggleTicketParent('recenttoggle','Ticket_Sidebar_RecentToggle');ce.updateTicketsCache();" class="<?php echo $this->recenttoggleswitch;?>">*</a>
            <a style="text-decoration:none;" href="javascript:toggleTicketParent('recenttoggle','Ticket_Sidebar_RecentToggle');ce.updateTicketsCache();"><img alt="*" border="0" style="position:relative;top:4px;padding-right:1px;" height="16" width="16" src="../templates/admin/images/folder-small.png"/><?php echo $this->lang("Recently Viewed");?></a>
            <ul id="recenttoggle_options" style="display:<?php echo $this->recenttoggle;?>;">
                <?php foreach ($this->recenttickets as $recentticket) { ?>
                    <li class="">
                        <img alt="" class="x-tree-elbow" src="../javascript/ext/images/gray-extend/tree/<?php echo $recentticket['ticketrecent_elbow'];?>.gif"/><a ext:qtip="<?php echo $this->lang("Subject").": ".$recentticket['ticketrecent_subject'];?>" href="index.php?fuse=support&ticketID=<?php echo $recentticket['ticketrecent_id'];?>&view=Admin_ViewTicketMessage"><?php echo $this->lang("Ticket")." #".$recentticket['ticketrecent_id'];?></a>
                    </li>
                <?php } ?>
            </ul>
        </li>
        <li class="filters">
            <a id="filtertoggle" href="javascript:toggleTicketParent('filtertoggle','Ticket_Sidebar_FilterToggle');ce.updateTicketsCache();"class="<?php echo $this->togglefilterswitch;?>">*</a>
            <a style="text-decoration:none;" href="javascript:toggleTicketParent('filtertoggle','Ticket_Sidebar_FilterToggle');ce.updateTicketsCache();"><img alt="*" border="0" style="position:relative;top:4px;padding-right:1px;" width="16" height="16" src="../templates/admin/images/funnel-small.png"/><?php echo $this->lang("Filters");?></a>
            <ul id="filtertoggle_options" style="display:<?php echo $this->togglefilter;?>;">
                <li class="">
                    <span onmouseover="highlightCount('open',true);" onmouseout="highlightCount('open',false);" class="count" id="open_count"><a onclick="processFilterClick('open');" style='cursor:pointer;'><?php echo $this->allopencount;?></a></span>
                    <img alt="" class="x-tree-elbow" src="../javascript/ext/images/gray-extend/tree/elbow.gif"/><a onmouseover="highlightCount('open',true);" onmouseout="highlightCount('open',false);" onclick="processFilterClick('open');" style='cursor:pointer;'><?php echo $this->lang("All Open");?></a>
                </li>
                <li class="">
                    <span onmouseover="highlightCount('awaitingreply',true);" onmouseout="highlightCount('awaitingreply',false);" class="count" id="awaitingreply_count"><a onclick="processFilterClick('awaitingreply');" style='cursor:pointer;'><?php echo $this->ticketsawaitingreplycount;?></a></span>
                    <img alt="" class="x-tree-elbow" src="../javascript/ext/images/gray-extend/tree/elbow.gif"/><a onmouseover="highlightCount('awaitingreply',true);" onmouseout="highlightCount('awaitingreply',false);" onclick="processFilterClick('awaitingreply');" style='cursor:pointer;'><?php echo $this->lang("Awaiting Reply");?></a>
                </li>
                <li class="">
                    <span onmouseover="highlightCount('subscribedto',true);" onmouseout="highlightCount('subscribedto',false);" class="count" id="subscribedto_count"><a onclick="processFilterClick('subscribedto');" style='cursor:pointer;'><?php echo $this->ticketssubscribedtocount;?></a></span>
                    <img alt="" class="x-tree-elbow" src="../javascript/ext/images/gray-extend/tree/elbow.gif"/><a onmouseover="highlightCount('subscribedto',true);" onmouseout="highlightCount('subscribedto',false);" onclick="processFilterClick('subscribedto');" style='cursor:pointer;'><?php echo $this->lang("Subscribed");?></a>
                </li>
                <li class="">
                    <span onmouseover="highlightCount('mytickets',true);" onmouseout="highlightCount('mytickets',false);" class="count" id="mytickets_count"><a onclick="processFilterClick('mytickets');" style='cursor:pointer;'><?php echo $this->myticketscount;?></a></span>
                    <img alt="" class="x-tree-elbow" src="../javascript/ext/images/gray-extend/tree/elbow.gif"/><a onmouseover="highlightCount('mytickets',true);" onmouseout="highlightCount('mytickets',false);" onclick="processFilterClick('mytickets');" style='cursor:pointer;'><?php echo $this->lang("My Tickets");?></a>
                </li>
                <li class="">
                    <span onmouseover="highlightCount('unassigned',true);" onmouseout="highlightCount('unassigned',false);" class="count" id="unassigned_count"><a onclick="processFilterClick('unassigned');" style='cursor:pointer;'><?php echo $this->notassignedcount;?></a></span>
                    <img alt="" class="x-tree-elbow" src="../javascript/ext/images/gray-extend/tree/elbow.gif"/><a onmouseover="highlightCount('unassigned',true);" onmouseout="highlightCount('unassigned',false);" onclick="processFilterClick('unassigned');" style='cursor:pointer;'><?php echo $this->lang("Not Assigned");?></a>
                </li>
                <li class="">
                    <span onmouseover="highlightCount('closed',true);" onmouseout="highlightCount('closed',false);" class="count" id="closed_count"><a onclick="processFilterClick('closed');" style='cursor:pointer;'><?php echo $this->closedtodaycount;?></a></span>
                    <img alt="" class="x-tree-elbow" src="../javascript/ext/images/gray-extend/tree/elbow.gif"/><a onmouseover="highlightCount('closed',true);" onmouseout="highlightCount('closed',false);" onclick="processFilterClick('closed');" style='cursor:pointer;'><?php echo $this->lang("Closed Today");?></a>
                </li>
                <?php foreach ($this->filters as $filter){ ?>
                    <li class="">
                        <span onmouseover="highlightCount('<?php echo $filter['ticketfilter_id'];?>',true);" onmouseout="highlightCount('<?php echo $filter['ticketfilter_id'];?>',false);"  class="count" id="<?php echo $filter['ticketfilter_id'];?>_count"><a onclick="processFilterClick('<?php echo $filter['ticketfilter_id'];?>');" style='cursor:pointer;'><?php echo $filter['ticketfilter_count']?></a></span>
                        <img alt="" class="x-tree-elbow" src="../javascript/ext/images/gray-extend/tree/elbow.gif"/><a onmouseover="highlightCount('<?php echo $filter['ticketfilter_id'];?>',true);" onmouseout="highlightCount('<?php echo $filter['ticketfilter_id'];?>',false);" onclick="processFilterClick('<?php echo $filter['ticketfilter_id'];?>');" style='cursor:pointer;'><?php echo $filter['ticketfilter_name'];?></a>
                    </li>
                <?php }?>
                <li class="">
                    <img alt="" class="x-tree-elbow" src="../javascript/ext/images/gray-extend/tree/elbow-end.gif"/><a ext:qtip="<?php echo $this->lang("Create New Filter");?>" href="javascript:createNewFilter();"><span style="color:black;text-decoration:underline;"><?php echo $this->lang("Create New Filter");?></span></a>
                </li>
            </ul>
        </li>
        <li class="filters">
            <a id="departmenttoggle" href="javascript:toggleTicketParent('departmenttoggle','Ticket_Sidebar_DepartmentToggle');ce.updateTicketsCache();" class="<?php echo $this->toggledepartmentswitch;?>">*</a>
            <a style="text-decoration:none;" href="javascript:toggleTicketParent('departmenttoggle','Ticket_Sidebar_DepartmentToggle');ce.updateTicketsCache();"><img alt="*" border="0" style="position:relative;top:4px;padding-right:1px;" height="16" width="16" src="../templates/admin/images/folder-small.png"/><?php echo $this->lang("Departments");?></a>
            <ul id="departmenttoggle_options" style="display:<?php echo $this->toggledepartment;?>;">
                <?php foreach ($this->deptfilters as $deptfilter){ ?>
                <li class="">
                    <span onmouseover="highlightCount('<?php echo $deptfilter['ticketfilter_id'];?>',true);" onmouseout="highlightCount('<?php echo $deptfilter['ticketfilter_id'];?>',false);"  class="count"  id="<?php echo $deptfilter['ticketfilter_id'];?>_count"><a onclick="processFilterClick(<?php echo $deptfilter['ticketfilter_id'];?>);" style='cursor:pointer;'><?php echo $deptfilter['ticketfilter_count']?></a></span>
                    <img alt="" class="x-tree-elbow" src="../javascript/ext/images/gray-extend/tree/<?php echo $deptfilter['ticketfilter_elbow'];?>.gif"/><a onmouseover="highlightCount(<?php echo $deptfilter['ticketfilter_id'];?>,true);" onmouseout="highlightCount(<?php echo $deptfilter['ticketfilter_id'];?>,false);" onclick="processFilterClick('<?php echo $deptfilter['ticketfilter_id'];?>');" style='cursor:pointer;'><?php echo $deptfilter['ticketfilter_name'];?></a>
                </li>
                <?php }?>
            </ul>
        </li>
    </ul>
</div>