function addAltimetria(cod, des) { var padre = document.getElementById('altimetriasRuta'); var input_altimetrias = document.getElementById('altimetrias'); var div = document.createElement("div"); var input_npuertos = document.getElementById('nPuertos'); if (document.getElementById('altimetria_' + cod)) alert('Ya tiene añadida la altimetría'); else { div.id = 'altimetria_' + cod; div.innerHTML = des + ' <a href="javascript:;" onclick="javascript:quitaAltimetria(' + cod + ')">quitar</a>'; var sTmp = new String(input_altimetrias.value); if (sTmp.length <= 0) sTmp = cod; else sTmp += ', ' + cod; input_altimetrias.value = sTmp; var aTmp = sTmp.split(", "); input_npuertos.value = aTmp.length; padre.appendChild(div); ocultaBSens(); } } function quitaAltimetria(cod) { var padre = document.getElementById('altimetriasRuta'); var borrar = document.getElementById('altimetria_' + cod); var input_altimetrias = document.getElementById('altimetrias'); var input_npuertos = document.getElementById('nPuertos'); if (padre && borrar && input_altimetrias) { var sTmp = new String(input_altimetrias.value); var aTmp = sTmp.split(', '); var i; sTmp = ''; for (i = 0; i < aTmp.length; i++) { if (aTmp[i] != cod) sTmp += aTmp[i] + ', '; } if (sTmp.length > 0) sTmp = sTmp.substr(0, sTmp.length - 2); input_altimetrias.value = sTmp; input_npuertos.value = aTmp.length-1; padre.removeChild(borrar); } } function getParametrosAltimetria() { if (document.frmDatos.elements['b_global'].checked) return '&g=1'; else return ''; } function filtroCompeTempo() { var zona = document.getElementById('div_captionFiltrado'); var temporada = document.getElementById('temporada'); var grupo = document.getElementById('grupo'); if (zona && temporada && grupo) { if (temporada.selectedIndex > 0 || grupo.selectedIndex > 0) { zona.innerHTML = '<BR><BR>Datos filtrados por '; if (temporada.selectedIndex > 0) { zona.innerHTML += 'Temporada "' + temporada.options[temporada.selectedIndex].text + '"'; if (grupo.selectedIndex > 0) zona.innerHTML += ' y '; } if (grupo.selectedIndex > 0) zona.innerHTML += 'Competición "' + grupo.options[grupo.selectedIndex].text + '"'; } } } function addComentarioEntrada(id) { loadIframeTransSize('/es/comun/addComentario.asp?id=' + id + '&p1=huNNl5bZ0unbknt8nFEtpxxoUZmunhOnEHoInsiWEFtSxFlE0KNsxnZpnYk&r=S', 650, 440); } function borraRuta(id, wm) { } function duplicaRuta(wm,id,finaliza) { try { if (document.getElementById('fNuevaRuta_' + wm + '_' + id)) { showZona('dv_quickRuta_' + wm + '_' + id, 'block'); var fecha = document.getElementById('fNuevaRuta_' + wm + '_' + id).value; if (isDate(fecha)) { if (finaliza) getRemote_std('dv_quickRuta_' + wm + '_' + id, 'cargando', '/es/calruta/_remote.asp?fx=DRUTA&wm=' + wm + '&id=' + id + '&f=' + fecha + '&m=F'); else getRemote_std('dv_quickRuta_' + wm + '_' + id, 'cargando', '/es/calruta/_remote.asp?fx=DRUTA&wm=' + wm + '&id=' + id + '&f=' + fecha); } else { alert ('Ha de rellenar el campo con una fecha válida'); } } else getRemote_std('dv_quickRuta_' + wm + '_' + id, 'cargando', '/es/calruta/_remote.asp?fx=DRUTA&wm=' + wm + '&id=' + id); if (0) { var cont = confirm('Se duplicará la ruta...'); if (cont) { var httpGetDatos = getHTTPObject(); if (httpGetDatos.readyState == 4 || httpGetDatos.readyState == 0) { esperando(null, 'Duplicando ruta'); httpGetDatos.open("GET", '/es/calruta/_remote.asp?fx=DRUTA&id=' + id + '&wm=' + wm + '&rand=' + Math.floor(Math.random() * 1000000), true); httpGetDatos.onreadystatechange = function() { var results; var ajaxDiv; try { if (httpGetDatos.readyState == 4) { results = httpGetDatos.responseText; runResultadoAjax(null, results); } } catch (e) { } }; httpGetDatos.send(null); } } } } catch (e) { alert('err:' + e.description); } } function estadistica(div_dest, cual, tit, wm, tm, gr) { try { var httpGetDatos = getHTTPObject(); if (httpGetDatos.readyState == 4 || httpGetDatos.readyState == 0) { esperando(div_dest, 'Calculando...'); httpGetDatos.open("GET", '/es/calruta/_remote.asp?fx=' + cual + '&tm=' + tm + '&tit=' + escape(tit) + '&gr=' + gr + '&wm=' + wm + '&rand=' + Math.floor(Math.random() * 1000000), true); httpGetDatos.onreadystatechange = function() { var results; var ajaxDiv; try { if (httpGetDatos.readyState == 4) { results = httpGetDatos.responseText; runResultadoAjax(div_dest, results); } } catch (e) { } }; httpGetDatos.send(null); } } catch (e) { alert('err:' + e.description); } } function setValoracionCronica(pon) { try { if (pon) { showZona('valoracion_etapa', 'none'); showZona('valoracion_etapa2', ''); valoracionAnterior = document.frmDatos.elements['valor'].value; document.frmDatos.elements['valor'].value = -1; } else { showZona('valoracion_etapa', ''); showZona('valoracion_etapa2', 'none'); document.frmDatos.elements['valor'].value = valoracionAnterior; } } catch (e) { } } 
