                    </div><!-- inside -->
               </div><!-- container -->
            </div><!-- wrap -->

        <div id="copyright" style="clear:both;margin-right:232px;">
            Copyright &copy; 2002-{CURRENTYEAR} ClientExec, Inc. All Rights Reserved.<br/>
            {EXECUTION_TIME}
        </div>

        </div> <!-- left-col -->
        
    </div> <!-- main -->
    
    
    <div id="footer">
        <ul id="activechats">
            <li>
                <select id="onlineStatus" name="onlineStatus" onchange="changeChatStatus();">
                    <option value="0">[l]Available[/l]</option>
                    <option value="2">[l]Away[/l]</option>
                    <option value="1">[l]Busy[/l]</option>
                </select>
            </li>
        </ul>
    </div>
    <div id="advancedsearch-win" class="x-hidden">
        <div class="x-window-header">Advanced Search</div>
        <div id="advancedsearchcontent" class="x-hidden">{SEARCH}</div>
    </div>

    <script type="text/javascript">
        if(navigator.platform == 'iPad' || navigator.platform == 'iPhone' || navigator.platform == 'iPod')
        {
            $('footer').style.position = "static";
            $('activechats').style.paddingTop = "13px";
        }
    </script>


    <div id="customfilter-win" class="x-hidden">
     <div class="x-window-header">Ticket Custom Filter</div>
      <div id="filtercontent" class="x-hidden" style="padding:10px;padding-top:20px;padding-bottom:20px;">
        <script type="text/javascript">
            var newFilterIndex = 0;
            var calButtonIndex = 0;
            var searchVisible = false;

            function addFilter()
            {
               var newFilterRow = $('filterRowTemplate').cloneNode(true);
                newFilterRow.setAttribute('id', 'filterRow_N' + newFilterIndex);
                newFilterIndex++;
                newFilterRow.style.display = isIE? 'block' : 'table-row';
                //newFilterRow.removeAttribute('style');

                // have to insert the new node into the dom before we modify it, or else things won't work out as expected.
                var newFilterRow = $('filterTableBody').appendChild(newFilterRow);
            }

            onLoadFunctions.push(addFilter);

            function removeFilter(tr)
            {
                tr.parentNode.removeChild(tr);
                //newFilterIndex--;
                //if (newFilterIndex == 2) {
                //    $("tdMatchType").style.display = "none";
                //}
            }

            function ActiveSelect(flag,tr)
            {

                if (flag == "") {
                    return;
                }

                var selects = tr.getElementsByTagName("select");
                var inputs = tr.getElementsByTagName("input");
                var divs = tr.getElementsByTagName("div");
                divs[0].style.display = 'none';
                divs[1].style.display = 'none';
                for (var i = 0; i < inputs.length-1; i++) {
                     inputs[i].disabled = true;
                     inputs[i].style.display = 'none';
                }
                // display "remove" button
                inputs[inputs.length - 1].style.display = "";
                if(flag != ''){
                	selects[1].style.display = '';
                	selects[1].disabled = false;
                	selects[1].options[0].text = '[lh]Is[/lh]';
                	selects[1].options[1].text = '[lh]Is Not[/lh]';
                } else{
                	selects[1].style.display = 'none';
                	selects[1].disabled = true;
                }
                for (var i = 2; i < selects.length; i++) {
                     if (selects[i].name == flag) {
                        selects[i].disabled = false;
                        selects[i].style.display = 'inline';
                    } else {
                        selects[i].disabled = true;
                        selects[i].style.display = 'none';
                    }
                }
                if (flag =="content[]"){
                        inputs[0].style.display = 'inline';
                        inputs[0].disabled = false;
                        selects[1].options[0].text = '[lh]Contain[/lh]';
                        selects[1].options[1].text = '[lh]Not contain[/lh]';
                }
                if (flag == "timeelapsed[]"){
                        divs[0].style.display = 'inline';
                        inputs[1].style.display = 'inline';
                        inputs[1].disabled = false;
                        selects[1].options[0].text = '[lh]Greater than[/lh]';
                        selects[1].options[1].text = '[lh]Less than[/lh]';
                }
                if (flag == "timeSinceLastReply[]"){
                        divs[1].style.display = 'inline';
                        inputs[2].style.display = 'inline';
                        inputs[2].disabled = false;
                        selects[1].options[0].text = '[lh]Greater than[/lh]';
                        selects[1].options[1].text = '[lh]Less than[/lh]';
                }
                document.forms['filtersForm'].search.style.opacity = 100;
                document.forms['filtersForm'].search.disabled = false;

                // show next line accepting new conditions
                //only show if we haven't already created the next node
                var currentindex = tr.id.split("_N")[1];
                var shouldbenextindex = ++currentindex;
                if(shouldbenextindex == newFilterIndex){
                    if (newFilterIndex > 1) {
                        $("tdMatchType").style.display = "";
                    }
                    addFilter();
                }
            }
        </script>
        <form id="filtersForm" method="post" action="index.php?fuse=support&amp;action=CreateTicketFilter">
        <table width="100%" border="0">
            <tr>
                <td>
                    <span style="padding-left:5px;">Create custom filters which can be saved for future searches</span>
                    <table border="0">
                        <tbody id="filterTableBody" >
                            <tr id="filterRowTemplate" style="display:none;">
                                <td align="left">
                                    <select id="fieldId" name="fieldId[]" onchange="ActiveSelect(this.value,this.parentNode.parentNode);">
                                        <option value=''>--- [l]Select condition[/l] ---</option>
                                        <option value='staff[]'>[l]Assigned to[/l]</option>
                                        <option value='ticketstatus[]'>[l]Status[/l]</option>
                                        <option value='priority[]'>[l]Priority[/l]</option>
                                        <option value='type[]'>[l]Ticked type[/l]</option>
                                        <option value='department[]'>[l]Department[/l]</option>
                                        <option value=''>-----------------</option>
                                        <option value='timeelapsed[]'>[l]Time Elapsed[/l]</option>
                                        <option value='timeSinceLastReply[]'>[l]Time Since Last Reply[/l]</option>
                                    </select>
                                </td>
                                <td>
                                    <select name="condition[]" id="condition" style="display:none" disabled='disabled'>
                                        <option value="is">[l]Is[/l]</option>
                                        <option value="not">[l]Is Not[/l]</option>
                                    </select>
                                    <select name="staff[]" id="staff" style="display:none" disabled='disabled'>
                                        <option value="0">[l]Not Assigned[/l]</option>
                                        <!-- BEGIN DYNAMIC BLOCK: staffList -->
                                        <option value="{staffId}">{staffLabel}</option>
                                        <!-- END DYNAMIC BLOCK: staffList -->
                                    </select>
                                    <select id="ticketstatus" name="ticketstatus[]" style="display:none" disabled='disabled'>
                                        <option value="1">Open</option>
                                        <option value="2">[l]Waiting on tech[/l]</option>
                                        <option value="3">[l]Waiting on customer[/l]</option>
                                        <option value="-1">Closed</option>
                                    </select>
                                    <select name="priority[]" id="priority" style="display:none" disabled='disabled'>
                                        <option value="3">[l]Low[/l]</option>
                                        <option value="2">[l]Medium[/l]</option>
                                        <option value="1">[l]High[/l]</option>
                                    </select>
                                    <select name="type[]" id="type" style="display:none" disabled='disabled'>
                                        <!-- BEGIN DYNAMIC BLOCK: typeList -->
                                        <option value="{typeId}">{typeLabel}</option>
                                        <!-- END DYNAMIC BLOCK: typeList -->
                                    </select>
                                    <select name="department[]" id="department" style="display:none" disabled='disabled'>
                                    	<option value="-1">-----</option>
                                        <!-- BEGIN DYNAMIC BLOCK: depList -->
                                            <option value="{depId}">{depLabel}</option>
                                        <!-- END DYNAMIC BLOCK: depList -->
                                    </select>
                                    <input name="content[]" id="content" size="26" value="" style="display:none" disabled='disabled' />
                                    <div id="telapsed" style="display:none">
                                        <input name="timeelapsed[]" id="timeelapsed" size="4" value="3" style="display:none" disabled='disabled'/> [l]Hours[/l]
                                    </div>
                                    <div id="telapsedLastReply" style="display:none">
                                        <input name="timeSinceLastReply[]" id="timeSinceLastReply" size="4" value="3" style="display:none" disabled='disabled'/> [l]Hours[/l]
                                    </div>
                                </td>
                                <td>&nbsp;&nbsp;<input type="button" class="button_medium" name="remove" value="[lh]remove[/lh]" onclick="removeFilter(this.parentNode.parentNode)" style="display:none" /></td>
                            </tr>
                        </tbody>
                    </table>
                    <table>
                        <tr>
                             <td id="tdMatchType" style="display:none"><span style="padding-left:2px;">[l]Match type[/l]</span>:
                                <select name="match" id="match">
                                    <option value="AND" selected="selected">[l]Against all conditions (AND)[/l]&nbsp;&nbsp;&nbsp;</option>
                                    <option value="OR">[l]Against any condition (OR)[/l]&nbsp;&nbsp;&nbsp;</option>
                                </select>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <input name="search" type="submit" class="search-button" value="[lh]Search[/lh]" disabled='disabled' style="opacity: 0.4;" />&nbsp;&nbsp;
                             </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
        </form>
      </div>
    </div>

    <script type="text/javascript">
    <!--
    	$('headinglabel').innerHTML = "{headerlabel}";
        $('breadcrumb_headinglabel').innerHTML = "{headerlabel}";
        $('breadcrumb_dynamic').innerHTML = "{breadcrumb}";
        $('viewactionitems').innerHTML = html_entity_decode("{clean_actionmenuitems}");
    	$('headinglabelright').innerHTML = html_entity_decode("{headinglabelright}");
    	processOnLoadFunctions();

        <!-- BEGIN DYNAMIC BLOCK: iswikicheck -->
        getWikiAvailability();
        <!-- END DYNAMIC BLOCK: iswikicheck -->

        //start process to check if latest version
        //checklatestlicense('{INSTALLEDVERSION}');
    //-->
    </script>

  </body>
</html>
