function sendSolicitud() { var error = new Array(); var form = document.frm; if (validateText(form.nombre) == false) { error.push('- Nombre'); } if (validateText(form.apellidos) == false) { error.push('- Apellidos'); } if (validateTelf(form.telefono) == false) { error.push('- Teléfono'); } indice = form.provincia.selectedIndex; if( indice == null || indice == 0 || indice == '') { error.push('- Provincia'); } if ((validateEmail(document.getElementById('req_email'))) == false) { error.push('- La dirección de email es errónea. Comprueba que esté escrita correctamente y sin espacios'); } if (error.length > 0) { var str = 'Por favor, rellene todos los campos correctamente\n\n'; str += error.join("\n"); alert(str); return false; } else { form.submit(); return true; } } function validateTelf(obj) { var notValid = " -()"; var cadFinal = ""; for (x = 0;x 1) && (arroba + 1 < punto) && (punto + 1 < (texto.length)) && (mailres == true) && (texto.indexOf('..',0) == -1)) { mailres = true; } else { mailres = false; } return mailres; } function loadSearcher() { var txt_indicar = 'Indicar'; var txt_empresa = 'Empresa'; var txt_derecho = 'Derecho'; var txt_informatica = 'Informática / Internet'; var txt_medicina = 'Medicina / Salud'; var txt_ciencias = 'Ciencias / Ingenierias'; var txt_humanidades = 'Humanidades'; var txt_comunicacion = 'Comunicación'; var txt_oposiciones = 'Oposiciones'; var txt_hosteleria = 'Hostelería y Turismo'; var txt_deportes = 'Deportes y Ocio'; var txt_idioma = 'Idiomas'; var txt_buscar = 'Buscar'; var a = document.getElementById('searcher'); a.innerHTML += "
" + "" + "-" + "" + "
"; } function redir(url) { url = url.replace('http://',''); window.location = 'http://' + url.replace('//','/'); } function openWindow(url) { window.open(url, url, 'width=400, height=400, scrollbars=yes, menubar=no, location=no, resizable=no'); } function doIt(){ var arrayElements = document.getElementsByTagName('blink'); for (x=0;x -1){ if(VALUE.charAt(iTemp) == w_space){ }else{ strTemp = VALUE.substring(0,iTemp +1); break; } iTemp = iTemp-1; } //End While return strTemp; } //End Function function LTrim(VALUE){ var w_space = String.fromCharCode(32); if(v_length < 1){ return""; } var v_length = VALUE.length; var strTemp = ""; var iTemp = 0; while(iTemp < v_length){ if(VALUE.charAt(iTemp) == w_space){ }else{ strTemp = VALUE.substring(iTemp,v_length); break; } iTemp = iTemp + 1; } return strTemp; } function validateText(obj) { if (Trim(obj.value) == ''){ return false; } else { return true; } } function replace(texto,s1,s2){ return texto.split(s1).join(s2); } function validaSearch(oForm) { var txt_maximo3 = 'Introduce al menos 3 caracteres'; texto = Trim(document.getElementById('txtBusqueda').value); texto = replace(texto,'%', ''); textoBase = Trim(document.getElementById('txtBusquedaBase').value); if ((texto.length < 3) || (textoBase == texto)) { alert(txt_maximo3); document.getElementById('txtBusqueda').focus(); return false; } else { return true; } }