  function soloNumeros(e) {
	 var key;
	 var keychar;
	 var reg;
	  if (window.event) key = e.keyCode; // for IE, e.keyCode or window.event.keyCode can be used
		 else if (e.which) key = e.which; // netscape
                 else return true; // no event, so pass through		
	  keychar = String.fromCharCode(key);
	  reg = /\d/;
	  return reg.test(keychar);
  }
  
  //busca caracteres que no sean espacio en blanco en una cadena
  function vacio(obj) {
        for ( i = 0; i < obj.length; i++ )
            if ( obj.charAt(i) != " " ) return true
        return false
  }
  //valida que el campo no este vacio y no tenga solo espacios en blanco
  function valida(Campo) {     
        if ( vacio(Campo.value) == false )
            return false
        else 
		    return true
   }
   // JJBM, 27/06/00. Reconocer si un e-mail es correcto o no.   
   function emailValido(txt){	
	 var b=/^[^@\s]+@[^@\.\s]+(\.[^@\.\s]+)+$/       
     return b.test(txt)
   }
   
   function comprobarDatos(d)
   { if (isDatosOK(d))
        return true;
     else
        return false;
   }
   
   function isDatosOK(d) 
   { if (!valida(d.forms[0].txtNombre)) 
       { alert("\nFalta el nombre.");
         d.forms[0].txtNombre.focus();
		 return false; 
	   } 
	 if (!valida(d.forms[0].txtApellidos)) 
       { alert("\nFaltan los apellidos.");
         d.forms[0].txtApellidos.focus();
		 return false; 
	 } 
	 if (!emailValido(d.forms[0].txtEmail.value)) 
       { alert("\nEl e-mail introducido no es válido.");
	     d.forms[0].txtEmail.focus();
		 return false; 
	 }
	 if (!valida(d.forms[0].txtTelefono)) 
       { alert("\nFalta el teléfono de contacto.");
         d.forms[0].txtTelefono.focus();
		 return false; 
	 }
		
	 if (d.forms[0].dtcPaises.value == 0) {	  
				 alert("\nFalta el País.");
		 		d.forms[0].dtcPaises.focus();
				 return false;		 
  }
		
	 return true;
   }