var http = false; if (window.XMLHttpRequest) { // Mozilla, Safari,... http = new XMLHttpRequest(); if (http.overrideMimeType) { http.overrideMimeType('text/xml'); // Ver nota sobre esta linea al final } } else if (window.ActiveXObject) { // IE try { http = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { http = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) { } } } if (!http) { alert('Falla :( No es posible crear una instancia XMLHTTP'); } // **** Fin manejadores de Ajax **** var timerID = 0; var Segundos = 9000; var Mostrar = 2; Segundos = '0.000'; Mostrar = '0'; //-- function inicio() { timerID = setTimeout("MostrarBanners()", 10); // timerIDColor = setTimeout("cambiarColores()", 10000); bCambio=0; /* new Rico.Effect.Round('div', 'redondo'); new Rico.Effect.Round('div', 'redondoOscuro'); new Rico.Effect.Round('div', 'redondoCabecera'); */ } function actualizaProductos() { if (($('select_sector').value != '') && ($('select_sector').value != '0')) { new Ajax.Request( 'localizadorCORE.php', { method: 'POST', parameters: { accion: 'cargarProductos', idSector: $('select_sector').value }, onSuccess: function(param){ var response = param.responseText; if (response != 'error') { $('capa_select_producto').innerHTML = response; } else { alert(response); } } } ); } else { if ($('select_sector').value == '0') { $('capa_select_producto').innerHTML = ""; } } } var strPosicion=0; function handleHttpResponseMostrarBanners() { if (http.readyState == 4) { if(http.responseText=="") { strPosicion=0; MostrarBanners(); } else { document.getElementById("bannersIzquierda").innerHTML=http.responseText; if(timerID!=0) { clearTimeout(timerID); } strPosicion = parseInt(strPosicion) + parseInt(Mostrar); timerID = setTimeout("MostrarBanners()", parseInt(Segundos)*1000); } } } function cambiarColores() { if(timerIDColor!=0) { clearTimeout(timerIDColor); timerIDColor=-1; } var strCodigo; if(bCambio==0) { strCodigo=" N O T I C I A S   D E   I N T E R E S"; bCambio=1; } else { strCodigo=" N O T I C I A S   D E   I N T E R E S"; bCambio=0; } document.getElementById("noticiasinteres").innerHTML=strCodigo; timerIDColor = setTimeout("cambiarColores()", 1000); } function filtrar() { var sector; var producto; var provincia; if(document.getElementById("select_sector").value=="0") { alert("Debe seleccionar un sector."); document.getElementById("select_sector").focus(); return; } else { sector=document.getElementById("select_sector").value; } if(document.getElementById("select_producto").value=="0") { alert("Debe seleccionar un producto."); document.getElementById("select_producto").focus(); return; } else { producto=document.getElementById("select_producto").value; } if(document.getElementById("provincias").value=="Toda España") { provincia="@"; } else { provincia="@"+document.getElementById("provincias").value+"@"; } document.location.href="guia-empresas-resultado.php?sector="+sector+"&producto="+producto+"&provincias="+provincia; }