<!--

    function validar( form ) {
      var error = false;
      var j     = -1;
      var chain = '';
      for ( var i = 0; i < form.elements.length; i++ ) {
        if ( form.elements[i].title && ( form.elements[i].value == '' || ( form.elements[i].type == "checkbox" && !form.elements[i].checked ) ) ) {
          if ( j < 0 ) {
            j   = i;
          }
          chain = chain + '· ' + form.elements[i].title + '\n';
          error = true;
        }
      }
      if ( error ) {
        alert( 'El o los siguientes campos no pueden quedar incompletos antes de proceder:\n\n' + chain );
        form.elements[j].focus();
        return false;
      }else {
        for ( var i = 0; i < form.elements.length; i++ ) {
          if ( form.elements[i].title && form.elements[i].name == 'email' ) {
            if ( !emailValido( form.elements[i].value ) ) {
              alert( 'Email invαlido!' );
              form.elements[i].focus();
              return false;
            }
            else {
              return true;
            }
          }
        }
      }
    }
        	
	function letrasYNumeros(f){
		if(f.value.match(/[^a-zαινσϊρΡ0-9\ ]/)){ 
		    f.value=f.value.replace(/[^a-zαινσϊρΡ0-9\ ]/gi,"");
		}
	}

    function numeroValido( campo ) {
      var digitos	 = "0123456789";
      var numero	 = "";
      for ( i = 0; i < campo.value.length; i++ ) {
        x		 = campo.value.charAt(i);
        if ( digitos.indexOf( x, 0 ) != -1 )
          numero	+= x;
      }
      campo.value	 = numero;
    }
    
    function soloLetras(f){
		if(f.value.match(/[^a-zαινσϊρΡ\ ]/)){ 
		    f.value=f.value.replace(/[^a-zαινσϊρΡ\ ]/gi,"");
		} 
	}
	
	function vacio(e) {
       tecla = (document.all) ? e.keyCode : e.which;
       if (tecla != "")
	   		return false;
    }
    
    function emailValido( email ) {
    	if(email.value.match(/[^a-zαινσϊρΡ0-9@"."\ ]/)){ 
		    email.value=email.value.replace(/[^a-zαινσϊρΡ0-9@"."\ ]/gi,"");
		}
      return email.value.match(/\b(^(\S+@).+((\.com)|(\.net)|(\.info)|(\.edu)|(\.gov)|(\.org)|(\.info)|(\.biz)|(\.tv)|(\.tk)|(\.es)|(\.cl)|(\.ch)|(\..{2,2}))$)\b/gi);
    }

    function limpiar( formulario ) {
      var form	= document.getElementById( formulario );
      if ( form )
        form.reset();
    }

    function contrato() {
      var form		= document.getElementById('perfil');
      form.action	= rel + 'contrato/';
      form.target	= '_blank';
      form.submit();
      form.action	= '';
      form.target	= '_self';
    }


 	function contratoTikeado_dgt(okcontrato){
      if (document.getElementById('okcontrato').checked)
	  	document.getElementById('okcont').value="1"; 
	  else
	    document.getElementById('okcont').value="0";
		
	  if (document.getElementById('okboletines').checked)
	  	document.getElementById('okbol').value="1";  
	  else
	  	document.getElementById('okbol').value="0";
	}
    function versionImpresion( id ) {
      window.open( rel + 'forex/depositos/impresion/?id=' + id, 'impresion' );
    }

    url           = document.location.href;
    xend          = url.lastIndexOf("/") + 1;
    var base_url  = url.substring( 0, xend );

    function ajax( url ) {

      if ( url.substring(0, 4) != 'http' ) {
        url       = base_url + url;
      }

      var jsElem  = document.createElement('SCRIPT');
      jsElem.type = 'text/javascript';
      jsElem.src  = url;

      document.body.appendChild( jsElem );
    }

-->
