<div class="modal fade bs-example-modal-lg" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog modal-lg" role="document">
        <div class="modal-content">
            <div class="modal-header">
                  <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                  <h4 class="modal-title" id="myModalLabel">BUSCADOR</h4>
            </div>
            <div class="modal-body">
                <div class="form-group">
                    <div class="col-md-12">
                    <?php if($negocio_neg_id<>'7') { ?>
                        <div class="section over-hide z-bigger">
                            <div class="row justify-content-center">
                                <?php if ($negocio_neg_id=='2') { $col='2';  $checked=''; ?>
                                <div class="col-sm-2">
                                    <input class="checkbox-tools sty_radio" type="radio" name="tipo" id="tool-2" checked value="producto" onchange='load(1);'>
                                    <label class="for-checkbox-tools" for="tool-2">
                                        PRODUCTOS
                                    </label>
                                </div>
                                <?php  } else { $col='3'; $checked='checked'; } ?>

                                <div class="col-sm-<?php echo $col;?>">
                                    <input class="checkbox-tools sty_radio" type="radio" name="tipo" id="tool-1" <?php echo $checked;?>  value="articulos" onchange='load(1);'>
                                    <label class="for-checkbox-tools" for="tool-1">
                                        ARTICULOS
                                    </label>
                                </div>
                               
                                <div class="col-sm-<?php echo $col;?>">
                                    <input class="checkbox-tools sty_radio" type="radio" name="tipo" id="tool-4"  value="servicio" onchange='load(1);'>
                                    <label class="for-checkbox-tools" for="tool-4">
                                        SERVICIOS
                                    </label>
                                </div>
                                <div class="col-sm-<?php echo $col;?>">
                                    <input class="checkbox-tools sty_radio" type="radio" name="tipo" id="tool-5"  value="detallados" onchange='load(1);'>
                                    <label class="for-checkbox-tools" for="tool-5">
                                        DETALLADO
                                    </label>
                                </div>
                                <div class="col-sm-<?php echo $col;?>">
                                    <input class="checkbox-tools sty_radio" type="radio" name="tipo" id="tool-3"  value="combos" onchange='load(1);'>
                                    <label class="for-checkbox-tools" for="tool-3">
                                        COMBOS
                                    </label>
                                </div>
                            </div>  
                        </div>
                    <?php } else { ?>
                        
                            <select name="tipo" id="tipo" class="form-control name_list input-sm" onchange='load(1);'>
                                <option value="articulos">ARTICULOS</option>
                                <option value="producto">PRODUCTOS</option>
                                <option value="combos">COMBOS</option>
                                <option value="servicio">SERVICIOS</option>
                            </select>
                      
                    <?php } ?>
                    </div>
                    <div class="col-sm-9">
                        <div class="input-group">
                            <input [focus]='true' type="text" class="form-control input-sm" id="q" placeholder="Referencia o Nombre" onkeyup="load(1)" autocomplete="off" >
                            <span class="input-group-addon">
                            <a href="#" onclick="limpiar_buscador()" type='button' ><i class="btn-icon-only icon-remove"></i> </a>
                            </span> 
                        </div>
                    </div>
                    <div class="col-sm-3">
                        <select name="tarifa" id="tarifa" class="form-control name_list input-sm" onchange="load(1)"  >
                            <?php
                                $can=mysqli_query($con,"SELECT * FROM usuario where usu_id='$usu_id'") or die(mysqli_error($con)); 
                                $to=mysqli_fetch_array($can);
                                $usu_tarifa=$to["tarifa"];

                                $datos=mysqli_query($con,"SELECT * FROM tarifas where empresa='$empresa' and tar_id='$usu_tarifa'");
                                $fila = mysqli_fetch_array($datos);
                                echo' <option value="'.$fila['tar_id'].'">'.$fila['tar_nombre'].'</option>';
                                if($usu_id=='1') 
                                {  
                                    $datos=mysqli_query($con,"SELECT * FROM tarifas where empresa='$empresa' and tar_id<>'$usu_tarifa'");
                                    while( $fila = mysqli_fetch_array( $datos ) )
                                    {
                                        echo' <option value="'.$fila['tar_id'].'">'.$fila['tar_nombre'].'</option>';
                                    }
                                }
                            ?>
                        </select>
                    </div>
                        </br> </br>
                    <div id="loader" style="position: absolute; text-align: center; top: 55px;  width: 100%;display:none;"></div><!-- Carga gif animado -->
                    <div class="outer_div" ></div><!-- Datos ajax Final -->
                </div>
            </div>
        </div>
    </div>
</div>
<script>
$('#myModal').on('shown.bs.modal', function() {
    $("#q").focus();
});
</script>
<script type="text/javascript">
function limpiar_buscador() {
$('input[type="text"]').val('');
load(1);
$("#q").focus();

}
</script> 