// JavaScript Document function abrirventana (url) { window.open (url); } function legal() { alto = 130; ancho = 320; izquierda = (screen.width / 2) - (ancho / 2); superior = (screen.height / 2) - (alto / 2); newwin=window.open("http://www.webpositer.com/datos.php","legal","height="+alto+",width="+ancho+",location=no,directories=no,menubar=no,resizable=auto,copyhistory=no,scrollbars=yes,status=no,titlebar=no,toolbar=no,left=" + izquierda + ",top=" + superior) } function privacidad() { alto = 400; ancho = 500; izquierda = (screen.width / 2) - (ancho / 2); superior = (screen.height / 2) - (alto / 2); newwin=window.open("http://www.webpositer.com/privacidad.html","legal","height="+alto+",width="+ancho+",location=no,directories=no,menubar=no,resizable=auto,copyhistory=no,scrollbars=yes,status=no,titlebar=no,toolbar=no,left=" + izquierda + ",top=" + superior) } function visualizaRespuestas() { if (document.getElementById("respuestaFlash").style.display == "block") { document.getElementById("respuestaFlash2").style.display = "none"; document.getElementById("respuestaFlash").style.display = "none"; document.getElementById("respuestaGif").style.display = "none"; } else { document.getElementById("respuestaFlash2").style.display = "block"; document.getElementById("respuestaFlash").style.display = "block"; document.getElementById("respuestaGif").style.display = "block"; } } function checkEmail(str) { if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/.test(str)){ return true; } return false; } function checkURL(value) { var urlregex = /^(http:\/\/)?\w+([\.-]?\w+\.)*\w+([\.-]?\w+)*(\.\w{2,4})+$/; if(urlregex.test(value)) { return true; } return false; } function validarAdwords() { if (document.frmPublicidad.nNombre.value == "" || document.frmPublicidad.nTelefono.value == "") { alert('Debes rellenar los campos obligatorios resaltados en negrita.'); return false; } else { if (!checkURL(document.frmPublicidad.nUrl.value)) { alert('Por favor, introduce una URL válida.'); return false; } else { if (!checkEmail(document.frmPublicidad.nEmail.value)) { alert('Por favor, introduce una dirección de correo electrónico válida.'); return false; } else { return true; } } } } function validar(form) { if (form.email.value=="") { alert('Debe introducir su e-mail'); form.email.focus(); return false; } if (form.comentario.value=="") { alert('Debe introducir su comentario'); form.comentario.focus(); return false; } return true; }