<?php
require_once 'shared/conexionBD.php';
//hacemos una consulta para obtener los modelos de hábitat
mysqli_query($conexion, "SET NAMES utf8");

$query = "SELECT ID,LINEA,MODELO FROM ITT_ALP_GLOBAL WHERE MODELO <> 'Refacciones' AND MODELO <> 'MOTORES' AND MODELO <> 'TRANSMISIONES' GROUP BY MODELO";

$resultado = mysqli_query($conexion, $query) or die("Algo ha ido mal en la consulta a la base de datos");


while ($columna = mysqli_fetch_assoc($resultado)) {
    $modelosGlobal[] = ["ID" => $columna['ID'], "MODELO" => $columna['MODELO'], "LINEA" => $columna['LINEA'], "URL" => ''];
    $arrGeneral[] = $columna;
}

//creamos consulta para ver las imagenes pricipales de las lineas
$qryImagenes = "SELECT LINEA,MODELO,URLIMG from ITT_ASW_IMG";
$qryImg = mysqli_query($conexion, $qryImagenes);

$arrImgs = [];
while ($columnImgs = mysqli_fetch_assoc($qryImg)) {$arrImgs[] = $columnImgs;}
function filtrarDatos($arr, $search, $arrImgs)
{
    //Filtramos por la linea especificada
    $result = array_filter($arr, function ($obj) use ($search) {
        if (stripos($obj['LINEA'], $search) !== false) {
            return true;
        }
        return false;
    });

    //Fusionamos con los resultados de las imagenes si el modelo coincide
    foreach ($arrImgs as $columnImgs) {

        $url = $columnImgs['URLIMG'];
        $modelo = $columnImgs['MODELO'];

        array_walk($result,
            function (&$value, $key) use (&$result, $modelo, $url) {
                if ($value['MODELO'] == $modelo) {
                    $value['URLIMG'] = $url;
                }
            }
        );
    }

    return $result;
}

function verMenuMovil($modelosGlobal, $linea, $arrImgs)
{

    $arrFiltrado = filtrarDatos($modelosGlobal, $linea, $arrImgs);
    $c = 0;
    foreach ($arrFiltrado as $modeloArr) {
        $modelo = $modeloArr['MODELO'];
        $query = 'linea=' . urlencode($linea) . '&modelo=' . urlencode($modelo);
        echo "<li  class='level2 nav-1-1-" . $c . " first'>
        <a href='modelo.php?" . htmlentities($query) . "' class='level2'>
        " . $modelo . "
        </a>
        </li>";
        $c++;
    }

}

function verMenuDesktop($modelosGlobal, $linea, $arrImgs)
{
    //Filtrar datos por linea
    $arrFiltrado = filtrarDatos($modelosGlobal, $linea, $arrImgs);

    $ImagenMostrada = "";
    $c = 0;
    foreach ($arrFiltrado as $modeloGlobal) {
        $modelo = $modeloGlobal['MODELO'];
        $imagen = $modeloGlobal['ID'] . ".jpg";

        if (!empty($modeloGlobal['URLIMG'])) {
            $imagen = explode("/", $modeloGlobal['URLIMG']);
            $imagen = 'ALP/' . trim($imagen[2]);
        } else {

            $imagen = $modeloGlobal['ID'] . ".jpg";
            $fichero = 'ALP/' . $imagen;
            $imagen = (file_exists($fichero)) ? $rutaImagenCompleta = $fichero : $rutaImagenCompleta = 'media/noimagen.jpg';
        }

        $query = 'linea=' . urlencode($linea) . '&modelo=' . urlencode($modelo);

        echo "<li  class='level2 nav-1-1-" . $c . " first'>
        <a href='modelo.php?" . htmlentities($query) . "'
        class='level2 '>
        <img src=" . $imagen . " width='100px' alt='" . $modelo . "' />
        " . $modelo . "
        </a>
        </li>";
        $c++;
    }

    if($linea == 'Atenuación Acústica') {
        // echo "<div class='searched-prod s-col-1-4'>";
        echo "<li class='level2 nav-1-1-".$c." first'>";
        echo    "<div class='product-image'>";
        echo        "<a href='atenuadores.php' title='Calculadora' class='product-image'>";
        echo            "<svg aria-hidden='true' style='max-width: 75px; max-height: 75px;' focusable='false' data-prefix='fas' data-icon='calculator' class='svg-inline--fa fa-calculator fa-w-14' role='img' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'><path fill='currentColor' d='M400 0H48C22.4 0 0 22.4 0 48v416c0 25.6 22.4 48 48 48h352c25.6 0 48-22.4 48-48V48c0-25.6-22.4-48-48-48zM128 435.2c0 6.4-6.4 12.8-12.8 12.8H76.8c-6.4 0-12.8-6.4-12.8-12.8v-38.4c0-6.4 6.4-12.8 12.8-12.8h38.4c6.4 0 12.8 6.4 12.8 12.8v38.4zm0-128c0 6.4-6.4 12.8-12.8 12.8H76.8c-6.4 0-12.8-6.4-12.8-12.8v-38.4c0-6.4 6.4-12.8 12.8-12.8h38.4c6.4 0 12.8 6.4 12.8 12.8v38.4zm128 128c0 6.4-6.4 12.8-12.8 12.8h-38.4c-6.4 0-12.8-6.4-12.8-12.8v-38.4c0-6.4 6.4-12.8 12.8-12.8h38.4c6.4 0 12.8 6.4 12.8 12.8v38.4zm0-128c0 6.4-6.4 12.8-12.8 12.8h-38.4c-6.4 0-12.8-6.4-12.8-12.8v-38.4c0-6.4 6.4-12.8 12.8-12.8h38.4c6.4 0 12.8 6.4 12.8 12.8v38.4zm128 128c0 6.4-6.4 12.8-12.8 12.8h-38.4c-6.4 0-12.8-6.4-12.8-12.8V268.8c0-6.4 6.4-12.8 12.8-12.8h38.4c6.4 0 12.8 6.4 12.8 12.8v166.4zm0-256c0 6.4-6.4 12.8-12.8 12.8H76.8c-6.4 0-12.8-6.4-12.8-12.8V76.8C64 70.4 70.4 64 76.8 64h294.4c6.4 0 12.8 6.4 12.8 12.8v102.4z'></path></svg>";
        echo        "</a>";
        echo    "</div>";
        echo    "<div class='product-name'>";
        echo        "<a href='atenuadores.php' title='Calculadora de atenudor'>";
        echo            "<span class='highlight'>Calculadora de Atenudor</span>";
        echo        "</a>";
        echo    "</div>";
        echo "</li>";
        // echo "</div>";

    }

}

?>

<div class="mobile-menu">
    <div class="mobile-menu-header">
        <div class="mobile-menu-go-back icon-arrow-left2"></div>
        <div class="menu-mobile-close icon-close"></div>
    </div>
    <!-- menu para tabletas y celulares -->
    <div class="nav-container">
        <ul id="nav">
            <li class="level0 nav-1 first parent">
                <a href="index.php" class="level0 has-children" data-type="">PRODUCTO</a>
                <ul class="level0">
                    <!-- Esto es para hábitat -->
                    <li class="level1 nav-1-1 first parent">
                        <a href="linea.php?linea=<?php echo (urlencode("Hábitat")) ?>">HÁBITAT</a>
                        <ul class="level">
                            <?php verMenuMovil($modelosGlobal, 'Hábitat', $arrImgs);?>
                        </ul>
                    </li>
                    <!-- termina hábitat -->
                    <!-- Esto es para Comercial -->
                    <li class="level1 nav-1-1 first parent">
                        <a href="linea.php?linea=<?php echo ("Comercial") ?>">COMERCIAL</a>
                        <ul class="level">
                            <?php verMenuMovil($modelosGlobal, 'Comercial', $arrImgs);?>
                        </ul>
                    </li>
                    <!-- termina Comercial -->
                    <!-- Esto es para Industrial -->
                    <li class="level1 nav-1-1 first parent">
                        <a href="linea.php?linea=<?php echo (urlencode("Industrial")) ?>">INDUSTRIAL</a>
                        <ul class="level">
                            <?php verMenuMovil($modelosGlobal, 'Industrial', $arrImgs);?>
                        </ul>
                    </li>
                    <!-- termina Industrial -->
                    <li class="level1 nav-1-1 first parent">
                        <a href="linea.php?linea=<?php echo (urlencode("Atenuación Acústica")) ?>">Atenuadores</a>
                        <ul class="level">
                            <?php verMenuMovil($modelosGlobal, 'Atenuación Acústica', $arrImgs);?>
                        </ul>
                    </li>
                    <!-- Esto es para OEM -->
                    <li class="level1 nav-1-1 first parent">
                        <a href="linea.php?linea=<?php echo (urlencode("OEM")) ?>">OEM</a>
                        <ul class="level">
                            <?php verMenuMovil($modelosGlobal, 'OEM', $arrImgs);?>
                        </ul>
                    </li>
                    <!-- termina OEM -->
                    <li class="level1 nav-1-1 first parent">
                        <a>Recuperadores de energía</a>
                        <ul class="level">
                            <li class="level2 nav-1-1-1 first">
                                <a href="recuperacion-energia.php" class="level2 ">
                                Unidades de ventilación para recuperación de energía</a>
                            </li>
                        </ul>
                    </li>
                    <li class="level1 nav-1-1 first parent">
                        <a>APL</a>
                        <ul class="level">
                            <li class="level2 nav-1-1-1 first">
                                <a href="apl.php" class="level2 ">
                                División APL</a>
                            </li>
                        </ul>
                    </li>
                </ul>
            </li>
            <li class="level0 nav-2 parent">
                <a class="level0 has-children">Por qué S&P</a>
                <ul class="level0">
                    <li class="level1 nav-2-1 first"><a href="nuestra-marca.php" class="level1 " data-type="">
                        Nuestra Marca</a>
                    </li>
                    <li class="level1 nav-2-1 first">
                        <a href="produccion.php" class="level1 " data-type="">Producción</a>
                    </li>
                    <li class="level1 nav-2-1 first">
                        <a href="politicas-compania.php" class="level1 " data-type="">Políticas de la Compañía</a>
                    </li>
                    <li class="level1 nav-2-1 first">
                        <a href="calidad.php" class="level1 " data-type="">Calidad</a>
                    </li>
                    <li class="level1 nav-2-1 first">
                        <a href="innovacion.php" class="level1 " data-type="">Innovación</a>
                    </li>
                    <li class="level1 nav-5-7">
                        <a href="calidad-medio-ambiente.php" class="level1 " data-type="">Medio Ambiente</a>
                    </li>
                    <li class="level1 nav-5-7">
                        <a href="certificaciones.php" class="level1 " data-type="">Certificaciones</a>
                    </li>
                    <li class="level1 nav-2-1 first">
                        <a href="catalogo-corporativo.php" class="level1 " data-type="">Catálogo Corporativo</a>
                    </li>
                    <li class="level1 nav-5-7">
                        <a href="bolsatrabajo.php" class="level1 " data-type="">Trabaja con nosotros</a>
                    </li>
                    <li class="level1 nav-5-7">
                        <a href="atenuadores.php" class="level1 " data-type="">Software de atenuadores</a>
                    </li>
                </ul>
            </li>
            <li class="level0 nav-3 parent">
                <a href="easyvent.php" class="level0 has-children" data-type="" style="cursor: default !important;">CALCULADORES</a>
            </li>
            <li class="level0 nav-4 parent">
                <a class="level0 has-children">Recursos</a>
                <ul class="level0">
                    <li class="level1 nav-4-1 first">
                        <a href="manual-ventilacion.php" class="level1 " data-type="">Manual de Ventilación</a>
                    </li>
                    <li class="level1 nav-4-2">
                        <a href="hojas-tecnicas.php" class="level1 " data-type="">Hojas técnicas</a>
                    </li>
                    <li class="level1 nav-4-3">
                        <a href="casos-practicos.php" class="level1 " data-type="">Casos Prácticos</a>
                    </li>
                    <li class="level1 nav-4-5">
                        <a href="bibliografia.php" class="level1 " data-type="">Bibliografía</a>
                    </li>
                    <li class="level1 nav-4-6">
                        <a href="manual-mantenimiento.php" class="level1 " data-type="">Manual De Mantenimiento</a>
                    </li>
                    <li class="level1 nav-4-5">
                        <a href="normativa-1.php" class="level1 " data-type="">Normativas</a>
                    </li>
                    <li class="level1 nav-4-2">
                        <a href="catalogo.php" class="level1 " data-type="">Catálogos</a>
                    </li>
                    <li class="level1 nav-2-1 first">
                        <a href="manual-corporativo.php" class="level1 " data-type="">Imagen Corporativa</a>
                    </li>
                    <li class="level1 nav-4-7">
                        <a href="apps.php" class="level1 " data-type="">Aplicaciones Móviles</a>
                    </li>
                </ul>
            </li>
            <li class="level0 nav-6 parent">
                <a href="contacto.php" class="level0 has-children" data-type="">contacto</a>
            </li>
            <li class="level0 nav-6 parent">
                <a href="https://www.solerpalau.com/es-es/blog/" class="level0 has-children" data-type="">BLOG</a>
            </li>
            <li class="level0 nav-6 parent">
                <a href="sustentabilidad.php" class="level0 has-children" data-type="">sustentabilidad</a>
            </li>
            <div class="clearfix"></div>
        </ul>
    </div>
    <form id="search_mini_form_mobile" action="catalogosearch.php" method="get" autocomplete="off">
        <div class="form-search">
            <input id="mobile-search" type="text" placeholder="Ejem. Silent" name="pbusqueda" value="" class="input-text" maxlength="128" />
            <button type="submit" title="Búsqueda" class="button icon-search">
                <span>Búsqueda</span>
            </button>
        </div>
    </form>
</div>

<div class="wrapper">
    <div class="page">
        <header>
            <!-- Barra Superior -->
            <!-- 
                <div class="bar removeBar" style="height:30px;font-size:14px;color: #856404;background-color: #fff3cd;border-color: #ffeeba;">
                    <div style="padding:2px">
                        <svg width="12px" aria-hidden="true" focusable="false" data-prefix="fas" data-icon="exclamation-triangle" class="svg-inline--fa fa-exclamation-triangle fa-w-18" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path fill="currentColor" d="M569.517 440.013C587.975 472.007 564.806 512 527.94 512H48.054c-36.937 0-59.999-40.055-41.577-71.987L246.423 23.985c18.467-32.009 64.72-31.951 83.154 0l239.94 416.028zM288 354c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"/></svg>
                            Este es un sitio de prueba, lo invitamos a visitar nuestro sitio web Oficial en <a href="https://www.solerpalau.mx/">https://www.solerpalau.mx/</a>
                    </div>
                </div> 
            -->
            <div class="bar removeBar" style="height:25px;font-size:13px" >
                <div class="urls" style="float:right;height: 10px; font-size: 13px; float: right;">
                    <a href="http://www.solerpalau.com/" target="_blank">
                        <i><svg aria-hidden="true" width="12px" focusable="false" data-prefix="fas" data-icon="globe-americas" class="svg-inline--fa fa-globe-americas fa-w-16" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512"><path fill="currentColor" d="M248 8C111.03 8 0 119.03 0 256s111.03 248 248 248 248-111.03 248-248S384.97 8 248 8zm82.29 357.6c-3.9 3.88-7.99 7.95-11.31 11.28-2.99 3-5.1 6.7-6.17 10.71-1.51 5.66-2.73 11.38-4.77 16.87l-17.39 46.85c-13.76 3-28 4.69-42.65 4.69v-27.38c1.69-12.62-7.64-36.26-22.63-51.25-6-6-9.37-14.14-9.37-22.63v-32.01c0-11.64-6.27-22.34-16.46-27.97-14.37-7.95-34.81-19.06-48.81-26.11-11.48-5.78-22.1-13.14-31.65-21.75l-.8-.72a114.792 114.792 0 0 1-18.06-20.74c-9.38-13.77-24.66-36.42-34.59-51.14 20.47-45.5 57.36-82.04 103.2-101.89l24.01 12.01C203.48 89.74 216 82.01 216 70.11v-11.3c7.99-1.29 16.12-2.11 24.39-2.42l28.3 28.3c6.25 6.25 6.25 16.38 0 22.63L264 112l-10.34 10.34c-3.12 3.12-3.12 8.19 0 11.31l4.69 4.69c3.12 3.12 3.12 8.19 0 11.31l-8 8a8.008 8.008 0 0 1-5.66 2.34h-8.99c-2.08 0-4.08.81-5.58 2.27l-9.92 9.65a8.008 8.008 0 0 0-1.58 9.31l15.59 31.19c2.66 5.32-1.21 11.58-7.15 11.58h-5.64c-1.93 0-3.79-.7-5.24-1.96l-9.28-8.06a16.017 16.017 0 0 0-15.55-3.1l-31.17 10.39a11.95 11.95 0 0 0-8.17 11.34c0 4.53 2.56 8.66 6.61 10.69l11.08 5.54c9.41 4.71 19.79 7.16 30.31 7.16s22.59 27.29 32 32h66.75c8.49 0 16.62 3.37 22.63 9.37l13.69 13.69a30.503 30.503 0 0 1 8.93 21.57 46.536 46.536 0 0 1-13.72 32.98zM417 274.25c-5.79-1.45-10.84-5-14.15-9.97l-17.98-26.97a23.97 23.97 0 0 1 0-26.62l19.59-29.38c2.32-3.47 5.5-6.29 9.24-8.15l12.98-6.49C440.2 193.59 448 223.87 448 256c0 8.67-.74 17.16-1.82 25.54L417 274.25z"></path></svg></i>
                        S&P World Wide &nbsp;
                    </a>
                    <a href="contacto.php#colombia">
                        <i><svg aria-hidden="true" width="12px" focusable="false" data-prefix="fas" data-icon="link" class="svg-inline--fa fa-link fa-w-16" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M326.612 185.391c59.747 59.809 58.927 155.698.36 214.59-.11.12-.24.25-.36.37l-67.2 67.2c-59.27 59.27-155.699 59.262-214.96 0-59.27-59.26-59.27-155.7 0-214.96l37.106-37.106c9.84-9.84 26.786-3.3 27.294 10.606.648 17.722 3.826 35.527 9.69 52.721 1.986 5.822.567 12.262-3.783 16.612l-13.087 13.087c-28.026 28.026-28.905 73.66-1.155 101.96 28.024 28.579 74.086 28.749 102.325.51l67.2-67.19c28.191-28.191 28.073-73.757 0-101.83-3.701-3.694-7.429-6.564-10.341-8.569a16.037 16.037 0 0 1-6.947-12.606c-.396-10.567 3.348-21.456 11.698-29.806l21.054-21.055c5.521-5.521 14.182-6.199 20.584-1.731a152.482 152.482 0 0 1 20.522 17.197zM467.547 44.449c-59.261-59.262-155.69-59.27-214.96 0l-67.2 67.2c-.12.12-.25.25-.36.37-58.566 58.892-59.387 154.781.36 214.59a152.454 152.454 0 0 0 20.521 17.196c6.402 4.468 15.064 3.789 20.584-1.731l21.054-21.055c8.35-8.35 12.094-19.239 11.698-29.806a16.037 16.037 0 0 0-6.947-12.606c-2.912-2.005-6.64-4.875-10.341-8.569-28.073-28.073-28.191-73.639 0-101.83l67.2-67.19c28.239-28.239 74.3-28.069 102.325.51 27.75 28.3 26.872 73.934-1.155 101.96l-13.087 13.087c-4.35 4.35-5.769 10.79-3.783 16.612 5.864 17.194 9.042 34.999 9.69 52.721.509 13.906 17.454 20.446 27.294 10.606l37.106-37.106c59.271-59.259 59.271-155.699.001-214.959z"></path></svg></i>
                        Contacto Colombia &nbsp; 
                    </a>
                    <a href="contacto.php#peru">
                        <i><svg aria-hidden="true" width="12px" focusable="false" data-prefix="fas" data-icon="link" class="svg-inline--fa fa-link fa-w-16" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M326.612 185.391c59.747 59.809 58.927 155.698.36 214.59-.11.12-.24.25-.36.37l-67.2 67.2c-59.27 59.27-155.699 59.262-214.96 0-59.27-59.26-59.27-155.7 0-214.96l37.106-37.106c9.84-9.84 26.786-3.3 27.294 10.606.648 17.722 3.826 35.527 9.69 52.721 1.986 5.822.567 12.262-3.783 16.612l-13.087 13.087c-28.026 28.026-28.905 73.66-1.155 101.96 28.024 28.579 74.086 28.749 102.325.51l67.2-67.19c28.191-28.191 28.073-73.757 0-101.83-3.701-3.694-7.429-6.564-10.341-8.569a16.037 16.037 0 0 1-6.947-12.606c-.396-10.567 3.348-21.456 11.698-29.806l21.054-21.055c5.521-5.521 14.182-6.199 20.584-1.731a152.482 152.482 0 0 1 20.522 17.197zM467.547 44.449c-59.261-59.262-155.69-59.27-214.96 0l-67.2 67.2c-.12.12-.25.25-.36.37-58.566 58.892-59.387 154.781.36 214.59a152.454 152.454 0 0 0 20.521 17.196c6.402 4.468 15.064 3.789 20.584-1.731l21.054-21.055c8.35-8.35 12.094-19.239 11.698-29.806a16.037 16.037 0 0 0-6.947-12.606c-2.912-2.005-6.64-4.875-10.341-8.569-28.073-28.073-28.191-73.639 0-101.83l67.2-67.19c28.239-28.239 74.3-28.069 102.325.51 27.75 28.3 26.872 73.934-1.155 101.96l-13.087 13.087c-4.35 4.35-5.769 10.79-3.783 16.612 5.864 17.194 9.042 34.999 9.69 52.721.509 13.906 17.454 20.446 27.294 10.606l37.106-37.106c59.271-59.259 59.271-155.699.001-214.959z"></path></svg></i>
                        Contacto Perú &nbsp;
                    </a>
                    <a href="https://smart.solerpalau.mx/PR/index.php" target="_blank">
                        <i><svg aria-hidden="true" width="12px" focusable="false" data-prefix="fas" data-icon="unlock" class="svg-inline--fa fa-unlock fa-w-14" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M400 256H152V152.9c0-39.6 31.7-72.5 71.3-72.9 40-.4 72.7 32.1 72.7 72v16c0 13.3 10.7 24 24 24h32c13.3 0 24-10.7 24-24v-16C376 68 307.5-.3 223.5 0 139.5.3 72 69.5 72 153.5V256H48c-26.5 0-48 21.5-48 48v160c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V304c0-26.5-21.5-48-48-48z"></path></svg></i>
                        Portal de Clientes y Proveedores &nbsp;
                    </a>
                    <!-- <a href="https://smart.solerpalau.mx/PR/index.php" target="_blank">
                        <i><svg aria-hidden="true" width="12px" focusable="false" data-prefix="fas" data-icon="unlock" class="svg-inline--fa fa-unlock fa-w-14" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M400 256H152V152.9c0-39.6 31.7-72.5 71.3-72.9 40-.4 72.7 32.1 72.7 72v16c0 13.3 10.7 24 24 24h32c13.3 0 24-10.7 24-24v-16C376 68 307.5-.3 223.5 0 139.5.3 72 69.5 72 153.5V256H48c-26.5 0-48 21.5-48 48v160c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V304c0-26.5-21.5-48-48-48z"></path></svg></i>
                        Portal Proveedores &nbsp;
                    </a> -->
                </div>
                <!-- /Barra Superior -->
            </div>
            <div class="header-logo">
                <div class="container">
                    <a href="index.php" title="Soler & Palau Sistemas de ventilación" class="logo">
                        <img src="https://statics.solerpalau.com/skin/frontend/solerpalau/default/images/svg/logo.svg" srcset="https://statics.solerpalau.com/skin/frontend/solerpalau/default/images/svg/logo.svg 1x, https://statics.solerpalau.com/skin/frontend/solerpalau/default/images/svg/logo.svg 2x" alt="Soler & Palau Sistemas de ventilación" />
                    </a>
                </div>
            </div>
            <div class="header-search-links">
                <div class="container grid">
                    <div class="hcol-5-12">
                        <form id="search_mini_form" action="catalogosearch.php" method="get" autocomplete="off">
                            <div class="form-search">
                                <div class="hcol-11-12">
                                    <input id="searchPrincipal" type="text" placeholder="Ejem. Silent " name="pbusqueda" class="input-text" maxlength="128" />
                                    <button id="searcherbutton" type="submit" title="Búsqueda" class="button icon-search">
                                        <span> Búsqueda </span>
                                    </button>
                                </div>
                                <div class="hcol-1-12">
                                    <a id="search-close" class="form-search-close icon-close" title="Cerrar"></a>
                                </div>
                            </div>
                        </form>
                        <script type="text/javascript">
                            //<![CDATA[
                            if (typeof HIB.searcher == 'object') {
                                HIB.searcher.suggest_url = 'catalogsearch/ajax/suggest/index.html';
                                HIB.searcher.field_name = 'q';
                                HIB.searcher.min_chars = '2';
                                HIB.searcher.delay = '0.1';
                                HIB.searcher.init();
                            }
                            //]]>
                        </script>
                    </div>
                </div>
            </div>
            <!-- Menu para desktop -->
            <nav class="header-nav">
                <div class="container grid">
                    <div class="container-titles-menu hcol-10-12">
                        <div class="nav-container">
                            <ul id="nav">
                                <li class="level0 nav-1 first parent">
                                    <a href="index.php" class="level0 has-children" data-type="" style="cursor: default !important;">PRODUCTO</a>
                                    <ul class="level0">
                                        <!-- Esto es para hábitat -->
                                        <li class="level1 nav-1-1 first parent">
                                            <a href="linea.php?linea=<?php echo (urlencode("Hábitat")) ?>">Hábitat</a>
                                            <ul class="level">
                                                <?php verMenuDesktop($arrGeneral, 'Hábitat', $arrImgs);?>
                                            </ul>
                                        </li>
                                        <!-- termina hábitat -->
                                        <!-- Esto es para Comercial -->
                                        <li class="level1 nav-1-1 first parent">
                                            <a href="linea.php?linea=<?php echo ("Comercial") ?>">Comercial</a>
                                            <ul class="level">
                                                <?php verMenuDesktop($arrGeneral, 'Comercial', $arrImgs);?>
                                            </ul>
                                        </li>
                                        <!-- termina Comercial -->
                                        <!-- Esto es para Industrial -->
                                        <li class="level1 nav-1-1 first parent">
                                            <a href="linea.php?linea=<?php echo ("Industrial") ?>">Industrial</a>
                                            <ul class="level">
                                                <?php verMenuDesktop($arrGeneral, 'Industrial', $arrImgs);?>
                                            </ul>
                                        </li>
                                        <li class="level1 nav-1-1 first parent">
                                            <a href="linea.php?linea=<?php echo ("Atenuación Acústica") ?>">Atenuadores</a>
                                            <ul class="level">
                                                <?php verMenuDesktop($arrGeneral, 'Atenuación Acústica', $arrImgs);?>
                                            </ul>
                                        </li>
                                        <li class="level1 nav-1-1 first parent">
                                            <a href="linea.php?linea=<?php echo ("OEM") ?>">OEM</a>
                                            <ul class="level">
                                                <?php verMenuDesktop($arrGeneral, 'OEM', $arrImgs);?>
                                            </ul>
                                        </li>
                                        <!-- termina Industrial -->
                                        <li class="level1 nav-1-1 first parent">
                                            <a>Recuperadores de energía</a>
                                            <ul class="level">
                                                <li class="level2 nav-1-1-1 first">
                                                    <a href="recuperacion-energia.php" class="level2 ">
                                                        <img src="media/img/energyefficient.jpg" width="100px" />
                                                        Unidades de ventilación para recuperación de energía
                                                    </a>
                                                </li>
                                            </ul>
                                        </li>
                                        <li class="level1 nav-1-1 first parent">
                                            <a>APL</a>
                                            <ul class="level">
                                                <li class="level2 nav-1-1-1 first">
                                                    <a href="apl.php" class="level2 ">
                                                        <img src="media/home/categories_home/producto/apl-1.png" width="100px" />
                                                        División APL
                                                    </a>
                                                </li>
                                            </ul>
                                        </li>
                                    </ul>
                                </li>
                                <li class="level0 nav-2 parent">
                                    <a class="level0 has-children" style="cursor: default !important;">Por qué S&P</a>
                                    <ul class="level0">
                                        <li class="level1 nav-2-1 first">
                                            <a href="nuestra-marca.php" class="level1 " data-type="">Nuestra Marca</a> 
                                        </li>
                                        <li class="level1 nav-2-1 first">
                                            <a href="produccion.php" class="level1 " data-type="">Producción</a>
                                        </li>
                                        <li class="level1 nav-2-1 first">
                                            <a href="politicas-compania.php" class="level1 " data-type="">Políticas de la Compañía</a>
                                        </li>
                                        <li class="level1 nav-2-1 first">
                                            <a href="calidad.php" class="level1 " data-type="">Calidad</a>
                                        </li>
                                        <li class="level1 nav-2-1 first">
                                            <a href="innovacion.php" class="level1 " data-type="">Innovación</a>
                                        </li>
                                        <li class="level1 nav-5-7">
                                            <a href="calidad-medio-ambiente.php" class="level1 " data-type="">Medio Ambiente</a>
                                        </li>
                                        <li class="level1 nav-5-7">
                                            <a href="certificaciones.php" class="level1 " data-type="">Certificaciones</a>
                                        </li>
                                        <li class="level1 nav-2-1 first">
                                            <a href="catalogo-corporativo.php" class="level1 " data-type="">Catálogo Corporativo</a>
                                        </li>
                                        <li class="level1 nav-5-7">
                                            <a href="bolsatrabajo.php" class="level1 " data-type="">Trabaja con Nosotros</a>
                                        </li>
                                        <li class="level1 nav-5-7">
                                            <a href="atenuadores.php" class="level1 "data-type="">Software de atenuadores</a>
                                        </li>
                                    </ul>
                                </li>
                                <li class="level0 nav-3 parent">
                                    <a class="level0 has-children" style="cursor: default !important;" data-type="">CALCULADORES</a>
                                    <ul class="level0">
                                        <li class="level1 nav-2-1 first">
                                            <a class="level1" href="easyvent.php" data-type="">Entrar a EasyVent</a>
                                        </li>
                                        <li class="level1 nav-2-1 first">
                                            <a class="level1" href="easycalc.php" data-type="">Entrar a EasyCalc</a>
                                        </li>
                                        <li class="level1 nav-2-1 first">
                                            <a class="level1" href="easyduct.php" data-type="">Entrar a EasyDuct</a>
                                        </li>
                                    </ul>
                                </li>
                                <li class="level0 nav-4 parent">
                                    <a class="level0 has-children" style="cursor: default !important;">Recursos</a>
                                    <ul class="level0">
                                        <li class="level1 nav-4-1 first">
                                            <a href="manual-ventilacion.php" class="level1 " data-type="">Manual de Ventilación</a>
                                        </li>
                                        <li class="level1 nav-4-2">
                                            <a href="hojas-tecnicas.php" class="level1 " data-type="">Hojas Técnicas</a>
                                        </li>
                                        <li class="level1 nav-4-3">
                                            <a href="casos-practicos.php" class="level1 " data-type="">Casos Prácticos</a>
                                        </li>
                                        <li class="level1 nav-4-5">
                                            <a href="bibliografia.php" class="level1 " data-type="">Bibliografía</a>
                                        </li>
                                        <li class="level1 nav-4-6">
                                            <a href="manual-mantenimiento.php" class="level1 " data-type="">Manual de Mantenimiento</a>
                                        </li>
                                        <li class="level1 nav-4-5">
                                            <a href="normativa-1.php" class="level1 " data-type="">Normativas</a>
                                        </li>
                                        <li class="level1 nav-4-2">
                                            <a href="catalogo.php" class="level1 " data-type="">Catálogos</a>
                                        </li>
                                        <li class="level1 nav-2-1 first">
                                            <a href="manual-corporativo.php" class="level1 " data-type="">Imagen Corporativa</a>
                                        </li>
                                        <li class="level1 nav-4-7">
                                            <a href="apps.php" class="level1 " data-type="">Aplicaciones Móviles</a>
                                        </li>
                                    </ul>
                                </li>
                                <li class="level0 nav-6 parent">
                                    <a href="contacto.php" class="level0 has-children" data-type="">contacto</a>
                                </li>
                                <li class="level0 nav-6 parent">
                                    <a href="https://www.solerpalau.com/es-es/blog/" class="level0 has-children" data-type="" target="_blank">BLOG</a>
                                </li>
                                <li class="level0 nav-6 parent">
                                    <a href="sustentabilidad.php" class="level0 has-children" data-type="">Sustentabilidad</a>
                                </li>
                            </ul>
                        </div>
                    </div>
                </div>
            </nav>
            <div class="header-mobile-menu-icon">
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </div>
        </header>
    </div>
</div>