<!-- BEGIN DYNAMIC BLOCK: imgSearch -->
<tr>
    <td><div STYLE="width:3;"></div></td>
    <td><img style="position:relative;" src="templates/{TEMPLATE}/images/search_category.jpg" width=161 height="38" /></td>
</tr>
<!-- END DYNAMIC BLOCK: imgSearch -->
<tr>
    <td colspan=2 align=left>
        <table border=0>
            <tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td><td>
                <!-- BEGIN DYNAMIC BLOCK: searchSection -->
                    <script language="JavaScript" type="text/JavaScript">
                    function ToggleCustomFields(type, option){
                        if(type == 'c_profile_field'){
                            $('customprofile'+option).style.display='';
                        }else{
                            $('customprofile'+option).style.display='none';
                        }
                    }
                   </script>
                   <form id="searchForm" action=index.php?fuse=clients method="post">
                   <table align=center style="width: 110px" border=0 cellpadding=1 cellspacing=0>
                <tr>
                    <td>
                        <select id="view" style="width: 100px">
                            <option value="ViewAllUsers"> [l]All Users[/l]
                            <option value="ViewActiveUsers"> [l]Active Users[/l]
                            <option value="ViewInactiveUsers"> [l]Inactive Users[/l]
                            <option value="ViewDeletedUsers"> [l]Cancelled Users[/l]
                            <option value="ViewPendingUsers"> [l]Pending Users[/l]
                        </select>
                    </td>                                                       
                </tr>                   
                <tr>
                    <td>
                        <font class=summaryitem>[l]User with[/l]</font><br />
                        <select name="searchbyfield" style="width: 100px" onChange="ToggleCustomFields(this.value, 'div');">
                            <option value=name> [l]Name[/l]
                            <option value=userid> [l]User ID[/l]
                            <option value=email> [l]E-mail[/l]
                            <option value=domain> [l]Domain Name[/l]
                            <option value=ticket> [l]Ticket #[/l]
                            <option value=organization> [l]Organization[/l]
                            <option value=c_profile_field> [l]Custom Profile Field[/l]
                        </select>
                    </td>                                                       
                </tr>
                <tr>
                    <td>
                        <div style="display:none" id=customprofilediv>
                        <select name="searchbycustomprofilefield" style="width: 100px">
                            <!-- BEGIN DYNAMIC BLOCK: customProfileFields -->                            
                                <option value={cpf_id}> {cpf_name}
                            <!-- END DYNAMIC BLOCK: customProfileFields -->                                
                        </select>
                        </div>
                    </td>                                                       
                </tr>
                <tr>
                    <td>
                            <font class=summaryitem>[l]like[/l]</font><br />
                            <input type=text size=20 name=searchstring style="width: 100px" onkeydown="return processOnEnter(event)"/>
                    </td>                                                       
                </tr>
                <tr>
                    <td>
                            <br />
                            <input type=submit class=button_medium onclick="submitToView()" value='[l]Search[/l]' />
                    </td>                                                       
                </tr>
                   </table>
                   </form>
                <!-- END DYNAMIC BLOCK: searchSection -->

                   <!-- We are only going to add this if the search ticket report is available and public -->
                   <!-- BEGIN DYNAMIC BLOCK: ticketsearch -->
                   <!-- Search ticket if report is public -->
                   <br />
                   <script language="JavaScript" type="text/JavaScript">
                    function ToggleSearchTickets(){               
                        if($('searchvisible').value == 0){
                        if(bolUseEffects ){ new Effect.SlideDown($('ticketsearchdiv')); }
                        else{ $('ticketsearchdiv').style.display=''; }
                        $('searchvisible').value=1;                                                         
                        }else{
                        if(bolUseEffects ){ new Effect.SlideUp($('ticketsearchdiv')); }
                        else{ $('ticketsearchdiv').style.display='none'; }
                        $('searchvisible').value=0;
                        }               
                    }
                   </script>
                   <form action="index.php?fuse=admin&amp;view=Snapins&amp;plugin=ticketsearch" method="post">
                   <input type='hidden' id='searchvisible' value='1' />
                   <table align='center' style="width: 110px" border='0' cellpadding='1' cellspacing='0'>
                       <tr>
                           <td><a href="javascript:void(0);" onClick='ToggleSearchTickets();'><font class="summaryitemheader">[l]Search Tickets[/l]</font></a>
                               <div id=ticketsearchdiv>
                               <font class=summaryitem>[l]that contain[/l]</font><br />
                                <input type=text name="ticketsearch_keywords" STYLE="width: 100px" /><br />
                                <select name="ticketsearch_limit" >
                                    <option value=1>1</option>
                                    <option value=5>5</option>
                                    <option value=10>10</option>
                                    <option value=20>20</option>
                                    <option value=50>50</option>
                                    <option value=100>100</option>
                                </select>
                                <font class=summaryitem># [l]results[/l]</font>
                                <br /><br />
                                <input type=submit class=button_medium value="[l]Search[/l]" name="ticketsearch_submit" />
                                </div>                                                              
                            </td>
                        </tr>
                    </table>
                    </form>                                               
                    <!-- End Search Tickets -->
                    <!-- END DYNAMIC BLOCK: ticketsearch -->                                               


            </td></tr>
        </table><br />
    </td>
</tr>
