var filtro_activado = false; function intercambia_filtro() { if(filtro_activado) { document.getElementById('menu_avanzado').style.display = 'none'; document.getElementById('intercambiador_de_filtro').src = 'imagenes/filtro_desactivado.gif'; filtro_activado = false; } else { document.getElementById('menu_avanzado').style.display = 'block'; document.getElementById('intercambiador_de_filtro').src = 'imagenes/filtro_activado.gif'; filtro_activado = true; } } function activa_opcion_filtro(opcion) { if(document.getElementById(opcion).checked) { document.getElementById(opcion).checked = false; } else { document.getElementById(opcion).checked = true; } } function yuki_inicia() { document.getElementById('yukiMensajeSubida').style.display = 'block'; window.setTimeout('yuki_pide_estado(1)', 500); } function yuki_pide_estado(paso) { var d = new Date; var avance_subiendo = 'avance.php?progress_key=yuki_progreso_e7h6goviv946f2jfkghuvvu5b1&time='+ d.getMinutes() +'_' +d.getSeconds(); var avance_procesando = 'avance.php?sesion=e7h6goviv946f2jfkghuvvu5b1&time='+ d.getMinutes() +'_' +d.getSeconds(); if(paso == 1) { peticion = avance_subiendo; } else { peticion = avance_procesando; } new Ajax.Request(peticion, { method:'get', onSuccess: function(transporte) { if(paso == 1) { myJsProgressBarHandler.setPercentage('yukiAvanceSubida', Math.floor(transporte.responseText / 2)); } else { // myJsProgressBarHandler.setPercentage('yukiAvanceProceso', 50 + transporte.responseText / 2); myJsProgressBarHandler.setPercentage('yukiAvanceSubida', Math.floor(50 + transporte.responseText / 2)); } if(transporte.responseText >= 100) { if(paso == 1) { paso = 2; myJsProgressBarHandler.setPercentage('yukiAvanceSubida', 50); } else { window.location.href = 'reporte.php'; } } window.setTimeout('yuki_pide_estado('+ paso +')', 500); if(paso == 2) { document.getElementById('yukiMensajeTxt').innerHTML = 'Procesando'; } } }); } function imprimir() { var marco = window.location.href; var gato = marco.lastIndexOf('#'); var info = marco.lastIndexOf('?'); if(gato != (-1)) { marco = marco.substring(0, gato); } if(info == (-1)) { marco = marco +'?'; } window.open(marco +'&imprimir', 'pag_imprimir', ''); } function cargar() { setTimeout( "document.getElementById('logo_img').src = 'ajax-loader.gif';", 500 ); } function guardar() { var c = document.getElementById('selectorC'); var f = document.getElementById('selectorF'); window.location = 'guardar.php?c='+ c.options[c.selectedIndex].value +'&f='+ f.options[f.selectedIndex].value; }