var _timerGuardar; var d, dom, nav_ie, nav_ie4, nav_ie5x, nav_mozilla, mac, win, lin, old, nav_ie5mac, nav_ie5xwin, nav_opera, nav_safari, nav_konqueror, nav_chrome; d = document; n = navigator; na = n.appVersion; nua = n.userAgent; win = (na.indexOf('Win') != -1); mac = (na.indexOf('Mac') != -1); lin = (nua.indexOf('Linux') != -1); if (!d.layers) { dom = (d.getElementById); nav_chrome = (nua.indexOf('Chrome') != -1); nav_opera = (nua.indexOf('Opera') != -1); nav_konqueror = (nua.indexOf('Konqueror') != -1); nav_safari = (nua.indexOf('Safari') != -1); nav_mozilla = (nua.indexOf('Gecko') != -1 && !nav_safari && !nav_konqueror); nav_ie = (d.all && !nav_opera); nav_ie4 = (nav_ie && !dom); /* ie5x tests only for functionality. ( dom||ie5x ) would be default settings. Opera will register true in this test if set to identify as IE 5 */ nav_ie5x = (d.all && dom); nav_ie5mac = (mac && nav_ie5x); nav_ie5xwin = (win && nav_ie5x); } if (hs) { hs.graphicsDir = '/iconos/graphics/'; hs.outlineType = 'drop-shadow'; hs.outlineWhileAnimating = true; hs.creditsText = ''; hs.allowMultipleInstances = false; hs.creditsHref = 'http://www.miespaciosecreto.com.com'; hs.creditsTitle = 'MiEspacioSecreto'; hs.loadingText = ''; hs.preserveContent = false; hs.creditsHref = 'http://www.miespaciosecreto.com'; hs.creditsTitle = 'miespaciosecreto.com'; hs.height = 350; hs.width = 500; hs.minWidth = 250; hs.minHeight = 150; hs.lang = { cssDirection: 'ltr', loadingText: 'cargando...', loadingTitle: 'cargando.', focusTitle: 'foctit', fullExpandTitle: 'Expandir', fullExpandText: 'Expandir.', creditsText: '', creditsTitle: '', previousText: 'Anterior', previousTitle: 'Anterior ()', nextText: 'Siguiente', nextTitle: 'Siguiente ()', moveTitle: 'Pulse con el ratón para mover', moveText: 'Mover', closeText: '[ X ]', closeTitle: 'Cerrar (Tecla Escape)', resizeTitle: 'Cambiar el tamaño de la ventana', playText: 'Play', playTitle: 'Play ()', pauseText: 'Pausa', pauseTitle: 'Pausa ()', number: 'Número %1/%2', restoreTitle: 'Titulo Original' }; hs.dimmingDuration = 0; hs.fadeInOut = false; hs.showCredits = true; } function abreHighslide(url, tit,ancho,alto) { var a_hs = document.getElementById('a_loadhighslide'); if (a_hs) { hs.creditsText = unescape(tit); hs.lang.creditsText = unescape(tit); if (!ancho) hs.width = 600; else hs.width = ancho; if (!alto) hs.height = 1000; else hs.height = alto; a_hs.href = url; a_hs.onclick(); } else { alert('No se ha encontrado la referencia para abrir highslide'); } } function gosite(site) {	if (window.name == 'popup') parent.document.location.href = site; else document.location.href = site; } function goenc(enc) { alert('irenc'); document.location.href = '/es/comun/goenc.asp?u=' + enc; } function activaPes(nombreM, pes, col) { var menu; var i; var zonad; var visible; menu = document.getElementsByName(nombreM); for (i = 0; i < menu.length; i++) { menu[i].style.backgroundColor = ''; zonad = document.getElementById(nombreM + i); if (pes == i) { menu[i].style.backgroundColor = col; visible = ''; } else { visible = 'none'; } if (zonad) zonad.style.display = visible; } } function del(m, txtPreg, selec) { if (confirm(txtPreg)) { loadIframeTransSize('/es/comun/del.asp?in=' + selec + '&m=' + m, 400, 240, 'Borrando'); } } function cupon(m, txtPreg, selec) { if (selec) if (confirm(txtPreg)) { loadIframeTransSize('/es/comun/gcupon.asp?v=' + selec + '&m=' + m, 400, 240, ''); } } function delun(m, txtPreg, selec) { try { var nombreform; if (selec != '') { if (txtPreg && confirm(txtPreg)) { loadIframeTransSize('/es/comun/del.asp?in=' + selec + '&m=' + m, 400, 240); } else { loadIframeTransSize('/es/comun/del.asp?in=' + selec + '&m=' + m, 400, 240); } } else alert('No items selected'); } catch (e) { alert(e.description); } } function delsin(m, txtPreg, nform) { try { var nombreform; if (!nform) nform = 'frmDatos'; var form = document.getElementById(nform); var i; var selec = new String(''); for (i = 0; i < form.elements.length; i++) { if (form.elements[i].type == 'checkbox') { if (form.elements[i].id == 'sel') if (form.elements[i].checked) { selec += form.elements[i].getAttribute('cod') + ','; } } } if (selec.length > 0) { selec = selec.substring(0, selec.length - 1); if (confirm(txtPreg)) { loadIframeTransSize('/es/comun/del.asp?in=' + selec + '&m=' + m, 400, 240); } } else alert('No items selected'); } catch (e) { alert(e.description); } } function hideShow(Menu) { try { if (document.getElementById(Menu).style.display == '') { document.getElementById(Menu).style.display = 'none'; document.getElementById(Menu + '_IMG').innerHTML = '+&nbsp;'; } else { document.getElementById(Menu).style.display = ''; document.getElementById(Menu + '_IMG').innerHTML = '-&nbsp;'; } } catch (e) { } } function addComentarioFoto(id) { abreHighslide('/es/micuenta/addComentario.asp?id=' + id,'Comentarios de fotografías', 650, 440); } function addComentarioFiesta(id) {	abreHighslide('/es/micuenta/addComentario.asp?id='+ id +'&p1=soRzRaRRauRNpCRaSoRsF5pJRR5RaJoRsJxGhCQg', 'Comentarios',600,400); } function nuevoMensaje(iden, t) { if (!t) t = 'MSJ'; if (parent.name == 'popup') parent.loadIframeTransSize('/es/micuenta/correoNM.asp?id=' + iden + '&p2=' + t, 575, 550); else abreHighslide('/es/micuenta/correoNM.asp?id=' + iden + '&p2=' + t, ''); } function hideShow(Menu) { try { if (document.getElementById(Menu).style.display == '') { document.getElementById(Menu).style.display = 'none'; document.getElementById(Menu + '_IMG').innerHTML = '+&nbsp;'; } else { document.getElementById(Menu).style.display = ''; document.getElementById(Menu + '_IMG').innerHTML = '-&nbsp;'; } } catch (e) { } } function guardaFormMES(vfram, nombreFormIni) { try { var res; var nombre = new String(); var nombreForm; var captionBoton; var botonG = document.getElementById('btnGuarda'); if (botonG) captionBoton = new String(botonG.innerHTML); else captionBoton = ''; if (window.tinyMCE) tinyMCE.triggerSave(); if (captionBoton.indexOf("...", 0) >= 0) { alert(captionBoton + '...'); } else { if (nombreFormIni) nombreForm = nombreFormIni; else nombreForm = 'frmDatos'; var theForm = document.forms[nombreForm]; for (i = 0; i < theForm.elements.length; i++) { if (theForm.elements[i].type == "select-multiple") { nombre = theForm.elements[i].id; if (nombre.substr(nombre.length - 7, 7) != '|Origen') seleccionaSelectId(theForm.elements[i].id, true); } } res = checkForm(nombreForm); if (res == '') { if (vfram || nav_konqueror || nav_safari) visualizaIframeTrans(); if (botonG) { botonG.innerHTML = captionBoton + "..."; botonG.style.color = "gray"; } document.forms[nombreForm].submit(); } else { alert(res); } } } catch (e) { alert('er:' + e.description);	} } function guardaFormMES_fin(output) { try { frameTransFin(); var botonG = document.getElementById('btnGuarda'); if (botonG) { var captionBoton = new String(botonG.innerHTML); botonG.innerHTML = captionBoton.substr(0, captionBoton.length - 3); botonG.style.color = ""; } if (typeof window.guarda_fin == "function") guarda_fin(); } catch (e) { alert('er01' + e.descripcion); } } function reloadFotoBG(id, direc) { var foto = document.getElementById(id); if (foto) { foto.style.backgroundImage = "url('" + direc + "')"; } } function reloadFotoSRC(id, direc) { var foto = document.getElementById(id); if (foto) { foto.src = direc; } } function setFicheroYSal(form, campo, id, src) { try { var form = document.getElementById(form); if (form && form.elements[campo]) form.elements[campo].value = id; var img = document.getElementById(campo + '_img'); if (img) img.src = src; frameTransFin(); } catch (e) {	} } function refreshSeleccionable(zdiv, tipo, u, form, campo) { try { var httpGetDatos = getHTTPObject(); if (httpGetDatos.readyState == 4 || httpGetDatos.readyState == 0) { var ajaxDiv; ajaxDiv = document.getElementById(zdiv); ajaxDiv.innerHTML = '<img src="/iconos/loading.gif" height="32"/>'; httpGetDatos.open("GET", '/es/comun/_remote.asp?fx=RFSEL&L=/es&t=' + tipo + '&u=' + u + '&f=' + form + '&c=' + campo + '&rand=' + Math.floor(Math.random() * 1000000), true); httpGetDatos.onreadystatechange = function() { var results; var ajaxDiv; try { if (httpGetDatos.readyState == 4) { results = httpGetDatos.responseText; ajaxDiv = document.getElementById(zdiv); ajaxDiv.innerHTML = results; } } catch (e) { } }; httpGetDatos.send(null); } } catch (e) { alert('err:' + e.description); } } function disableBotonGuardar() { try { clearTimeout(_timerGuardar); var captionBoton; var botonG = document.getElementById('btnGuarda'); if (botonG) captionBoton = new String(botonG.innerHTML); else captionBoton = ''; if (botonG) { var ini = captionBoton.indexOf("...", 0); if (ini < 0) { botonG.innerHTML = captionBoton + "..."; botonG.style.color = "#777777"; _timerGuardar = setTimeout('enableBotonGuardar()', '14000'); } } } catch (e) { alert('bg:' + e.description); } } function enableBotonGuardar() { try { clearTimeout(_timerGuardar); var botonG = document.getElementById('btnGuarda'); if (botonG) { var captionBoton = new String(botonG.innerHTML); var ini = captionBoton.indexOf("...", 0); if (ini > 0) botonG.innerHTML = captionBoton.substr(0, ini); botonG.style.color = ""; } if (typeof window.guarda_fin == "function") guarda_fin(); } catch (e) { alert('eren:' + e.description); } } function estoyGuardando() { try { var captionBoton; var botonG = document.getElementById('btnGuarda'); if (botonG) captionBoton = new String(botonG.innerHTML); else captionBoton = ''; return (captionBoton.indexOf("...", 0) >= 0); } catch (e) { alert('errchkg:' + e.description); } } function cargaHelpAjaxVacio(zdivName,t) { try { var zdiv = document.getElementById(zdivName); if (zdiv && zdiv.innerHTML=='') { esperando(zdivName); var httpGetDatos = getHTTPObject(); if (httpGetDatos.readyState == 4 || httpGetDatos.readyState == 0) { httpGetDatos.open("GET", '/es/comun/help.asp?fx=ZAY&t=' + t + '&rand=' + Math.floor(Math.random() * 1000000), true); httpGetDatos.onreadystatechange = function() { var results; try { if (httpGetDatos.readyState == 4) { results = httpGetDatos.responseText; runResultadoAjax(zdivName, results); } } catch (e) { } }; httpGetDatos.send(null); } } } catch (e) { alert('err:' + e.description); } } function printFormLoginAjax(divDest) { getRemote_std(divDest, 'Enviando', '/es/comun/_remote.asp?fx=SOLINVI&m=' + email); } function doLoginAjax(nombreForm, zonaDiv) { var res; res = checkForm(nombreForm); if (res == '') { postFormAjaxSite(zonaDiv, nombreForm, '/es/comun/_remote.asp?fx=LOGAJAX'); } else alert(res); }