<!-- BEGIN DYNAMIC BLOCK: imgSearch -->
<!-- END DYNAMIC BLOCK: imgSearch -->
<!-- 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';
        }
        if(type == 'c_package_field'){
            $('custompackage'+option).style.display='';
        }else{
            $('custompackage'+option).style.display='none';
        }
    }
</script>
<div class="inside">
    <form id="searchForm" action="index.php" method="get">
        <input type="hidden" name="view" value="ViewUsers"></input>
        <input type="hidden" name="fuse" value="clients"></input>
        <select id="view">
            <option value="ViewAllUsers"> [l]All Users[/l]</option>
            <option value="ViewActiveUsers"> [l]Active Users[/l]</option>
            <option value="ViewInactiveUsers"> [l]Inactive Users[/l]</option>
            <option value="ViewDeletedUsers"> [l]Cancelled Users[/l]</option>
            <option value="ViewFraudUsers"> [l]Fraud Users[/l]</option>
            <option value="ViewPendingUsers"> [l]Pending Users[/l]</option>
        </select>
        <span class="label-helper">[l]with[/l]:</span>
        <select name="searchbyfield" onchange="ToggleCustomFields(this.value, 'div');">
            <option value="name"> -- [l]Select[/l] --</option>
            <option value="c_profile_field"> [l]Custom Profile Field[/l]</option>
            <option value="c_package_field"> [l]Custom Package Field[/l]</option>
        </select>
        <div style="display:none" id="customprofilediv">
            <span class="label-helper">[l]named[/l]:</span>
            <select name="searchbycustomprofilefield">
                <!-- BEGIN DYNAMIC BLOCK: searchbycustomprofilefield -->
                <option value='{PROFILEFIELDID}'> {PROFILEFIELDNAME}</option>
                <!-- END DYNAMIC BLOCK: searchbycustomprofilefield -->
                {CUSTOMPROFILEFIELDS}
            </select>
        </div>
        <div style="display:none" id="custompackagediv">
            <span class="label-helper">[l]named[/l]:</span>
            <select name="searchbycustompackagefield">
                <!-- BEGIN DYNAMIC BLOCK: searchbycustompackagefield -->
                <option value='{PACKAGEFIELDID}'> {PACKAGEFIELDNAME}</option>
                <!-- END DYNAMIC BLOCK: searchbycustompackagefield -->
                {CUSTOMPACKAGEFIELDS}
            </select>
        </div>
        <span class="label-helper">[l]matching[/l]:</span>
        <input size="29" class="field" id="searchstring" name="searchstring" type="text" onkeydown="return processOnEnter(event)">
        <button class="search-button" onclick="submitToView()">[l]Search[/l]</button>
    </form>
</div>
<!-- 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 -->
<!-- End Search Tickets -->
<!-- END DYNAMIC BLOCK: ticketsearch -->