function ValidarNumerico(cadena) {
        var numeros = "0123456789";
        for (var i = 0; i < cadena.length; i++) {
            if (numeros.indexOf(cadena.substring(i, i + 1)) == -1) {
                return (false);
            }
        }
        return (true);
    }
    
    function valcampos() {

        var nom = document.getElementById('nombre').value;
        var em = document.getElementById('email').value;
        var tel = document.getElementById('telefono').value;
        var hor = document.getElementById('horario_llamada').value;
        var validaMail = /^[0-9a-zA-Z]([0-9a-zA-Z\._-]{0,30})([0-9a-zA-Z]{1})@([0-9a-zA-Z]{1})([0-9a-zA-Z\._-]{1,15})(\.[0-9a-zA-Z]{2,3})$/;

        if (nom == null || nom.length == 0 || nom == "Nombre completo" || nom == "Introduzca el Nombre" || /^\s+$/.test(nom)) {
			document.getElementById('nombre').value = 'Introduzca el Nombre';	
            return (false);
		} else if (!ValidarNumerico(tel) || tel == "Teléfono") {
			document.getElementById('telefono').value = "Tel"+'\u00e9'+"fono no v"+'\u00e1'+"lido";
            return (false);
        } else if (!validaMail.test(em) || em == "eMail") {
			document.getElementById('email').value = "Email no v"+'\u00e1'+"lido";
            return (false);
        } else if (hor == null || hor.length == 0 || hor == "Horario preferido de contacto" || hor == "Introduzca el horario" || /^\s+$/.test(hor)) {
			document.getElementById('horario_llamada').value = 'Introduzca el horario';	
            return (false); 
		} else if (!document.getElementById('acepto').checked) {
           alert("Por favor, debe aceptar la pol"+'\u00ed'+"tica de privacidad");
            return (false);
        }
		document.forms.form2.submit();
    }
