    <span id='auxFavoritos' style="display: none;">
      <form id="frmFavoritos" action="" method="POST">
        <input type="hidden" id="xAuxAtajo" name="xAuxAtajo">
      </form>
    </span>
            <div class="navbar-header">
              <img class="logo-empresa" src="imagenes/logos/empresa.png" alt="Smiley face" height="50" width="50">
              <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-collapse">
              <i class="fa fa-bars"></i> 
              </button>
            </div>
            <!-- Collect the nav links, forms, and other content for toggling -->
            <div style="overflow: hidden; max-height: 100%;" class="collapse navbar-collapse pull-left" id="navbar-collapse">
              <ul class="nav navbar-nav">
                <li><a href="index.php">Inicio</a></li>
                <li class="dropdown">
                  <a href="#" class="dropdown-toggle" data-toggle="dropdown">Consultas <span class="caret"></span></a>
                  <ul class="dropdown-menu" role="menu">
                    <li><a href="ventas.php">Ventas</a></li>
                    <li><a href="cajas.php">Caja</a></li>
                    <li><a href="compras.php">Compras</a></li>
                    <li><a href="#">Stock y Costos</a></li>
                    <li><a href="cuenta-corriente.php">Cuenta Corriente</a></li>
                  </ul>
                </li>
                <!-- <li class="dropdown">
                  <a href="#" class="dropdown-toggle" data-toggle="dropdown">Favoritos <span class="caret"></span></a>
                  <ul class="dropdown-menu" role="menu">
                    <li><a href="#;" onclick="cargarFavorito(5);">Consulta 1</a></li>
                    <li><a href="#">Consulta 2</a></li>
                    <li><a href="#">Consulta 3</a></li>
                    <li><a href="#">Consulta 4</a></li>
                    <li><a href="#">Consulta 5</a></li>
                  </ul>
                </li> -->
                <li>
                <select id="xFavoritos" title="Favoritos" data-width="fit"  class="selectpicker" data-live-search="true">
<?php
  $sql = "select A.ID_ATAJO, A.DESC_ATAJO, A.ID_GRUPO_CONSULTA, G.DESC_GRUPO_CONSULTA, G.DESTINO
          from ATJ_ATAJOS A 
              INNER JOIN CFG_GRUPO_CONSULTA G
              ON A.ID_GRUPO_CONSULTA = G.ID_GRUPO_CONSULTA
          where A.ID_USUARIO = ".$_SESSION['CurrentIdUser']."
             or  A.PUBLICO = 1
             OR (PUBLICO = 2 AND 0 < (SELECT COUNT(*)
                                      FROM ATJ_ATAJOS_USUARIOS AU 
                                      WHERE AU.ID_ATAJO = A.ID_ATAJO 
                                        AND AU.ID_USUARIO = ".$_SESSION['CurrentIdUser'].")
                )
          order by G.DESC_GRUPO_CONSULTA, A.DESC_ATAJO  "; 
  $RsAtajos = $DBSegu->Execute($sql);
  if (!$RsAtajos) { print $DBSegu->ErrorMsg(); }
  while (!$RsAtajos->EOF) {
    echo "<option data-destino='" . utf8_encode($RsAtajos->fields['DESTINO']) . "' data-tokens='' value='" . utf8_encode($RsAtajos->fields['ID_ATAJO']) . "'>" . utf8_encode($RsAtajos->fields['DESC_GRUPO_CONSULTA']) . " - " . utf8_encode($RsAtajos->fields['DESC_ATAJO']) . "</option>"; 

    $RsAtajos->MoveNext();
  } 
?>
                  <option data-divider="true"></option>
                  <option data-destino="index.php" data-tokens="">Administrar Favoritos...</option>
                </select>
                </li>

              </ul>
              <form class="navbar-form navbar-left" role="search" style="display: none;">
                <div class="form-group">
                  <input type="text" class="form-control" id="navbar-search-input" placeholder="Buscar">
                </div>
              </form>
            </div>
            <!-- /.navbar-collapse -->
            <!-- Navbar Right Menu -->
            <div style="right: 40px !important;" class="navbar-custom-menu">
              <ul class="nav navbar-nav">
                
                <!-- User Account Menu -->
                <li class="dropdown user user-menu">
                  <!-- Menu Toggle Button -->
                  <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                    <!-- The user image in the navbar-->
                    Sesión:
                    <!-- hidden-xs hides the username on small devices so only the image appears. -->
                    <span style="display: initial !important;" class="hidden-xs"><?php echo utf8_encode($_SESSION['CurrentUser']); ?></span>
                    <i style="color: #db5916;" class="fa fa-caret-square-o-down"></i>
                  </a>
                  <ul class="dropdown-menu">
                    <!-- The user image in the menu -->
                    <li class="user-header">
                      <img src="imagenes/logos/pixo.png" class="img-circle" alt="User Image">
                      <p>
                        <?php echo utf8_encode($_SESSION['CurrentUser']); ?>
                        <small><?php echo $_SESSION['CurrentCorreo']; ?></small>
                      </p>
                    </li>
                    <!-- Menu Body --> 
                    
                    <!-- Menu Footer-->
                    <li class="user-footer">
                      <div class="pull-left">
                        <a data-toggle="modal" onclick="cambiarPass();" class="btn btn-default btn-flat">Cambiar Contraseña</a>
                      </div>
                      <div class="pull-right">
                        <a href="#;" id='btnSalir' class="btn btn-default btn-flat">Cerrar Sesión</a>
                      </div>
                    </li>
                  </ul>
                </li>
              </ul>
            </div>
            
            <!-- /.navbar-custom-menu -->

           
            
