  function menuSetBg(obj, flag){
    if(flag == 1){
				  document.getElementById(obj).className  = "divMenu divMenu_1";
				  document.getElementById(obj+'Image_0').style.display  = "none";
				  document.getElementById(obj+'Image_1').style.display  = "block";
				}else{
  				document.getElementById(obj).className  = "divMenu divMenu_0";
				  document.getElementById(obj+'Image_0').style.display  = "block";
				  document.getElementById(obj+'Image_1').style.display  = "none";
				}
		}

  function menuCadastroSetBg(obj, flag){
    if(flag == 1){
				  document.getElementById(obj).className  = "divMenu divMenu_Cadastro_1";
				  document.getElementById(obj+'Image_0').style.display  = "none";
				  document.getElementById(obj+'Image_1').style.display  = "block";
				}else{
  				document.getElementById(obj).className  = "divMenu divMenu_Cadastro_0";
				  document.getElementById(obj+'Image_0').style.display  = "block";
				  document.getElementById(obj+'Image_1').style.display  = "none";
				}
		}


  function coordinates() {
    var scrollX, scrollY;

    if (document.all)
    {
        if (!document.documentElement.scrollLeft)
            scrollX = document.body.scrollLeft;
        else
            scrollX = document.documentElement.scrollLeft;

        if (!document.documentElement.scrollTop)
            scrollY = document.body.scrollTop;
        else
            scrollY = document.documentElement.scrollTop;
    }
    else
    {
        scrollX = window.pageXOffset;
        scrollY = window.pageYOffset;
    }

    return scrollY;
}


		function mostraEsconde(obj, flag, acompanharBarraRolagem){
    altura = coordinates();

		  obj = document.getElementById(obj);
		  if(flag == 0){
					 obj.style.display = 'none';
					
				}else{
				  if(acompanharBarraRolagem == 1){
  					 obj.style.marginTop = (altura-150)+'px';
  				}
      obj.style.display  = 'block';
				}
		}

		function proximaPagina(pagina){
		  document.formCad.action = 'cadastro_v.php';
		  document.formCad.target = '_self';
		  document.formCad.proximaPagina.value = pagina;
		  document.formCad.submit();
		}

		function perfilRemover(){
		  window.location = 'cadastro_r.php';
		}

  function mascaraData(campoData){
     var data = campoData.value;
     if(data.length == 2){
       data = data + '/';
       campoData.value = data;
       return true;
     }

     if(data.length == 5){
       data = data + '/';
       campoData.value = data;
       return true;
      }
  }

  function mascaraFone(campo){
    separador3 = '-';
    conjunto3 = 4;
    if (campo.value.length == conjunto3){
      campo.value = campo.value + separador3;
    }
  }

  function mascaraCpf(campo){
    separador1 = '.';
    separador2 = '-';
    conjunto1 = 3;
    conjunto2 = 7;
    conjunto3 = 11;
    if(campo.value.length == conjunto1){
      campo.value = campo.value + separador1;
    }
    if(campo.value.length == conjunto2){
      campo.value = campo.value + separador1;
    }
    if(campo.value.length == conjunto3){
      campo.value = campo.value + separador2;
    }
  }

  function validarConvite(){
    document.formConvite.formularioCaptcha.value = document.getElementById('cadastroCaptcha').value;
    document.formConvite.submit();
  }

  function conviteConfirmacao(){
    mostraEsconde('divAprovarConvite', 1, 1);
  }

  function validarDepoimento(){
    erro = '';
    if(document.formDepoimento.depoimentoNome.value.length < 5){ erro += "\n- Escreva o seu nome"; }
    if(!checkMail(document.formDepoimento.depoimentoEmail.value)){ erro += "\n- E-mail invÃ¡lido"; }
    if(document.formDepoimento.depoimentoTexto.value.length < 5){ erro += "\n- NÃ£o esqueÃ§a de deixar o seu comentÃ¡rio."; }

    if(erro.length == 0){
      document.formDepoimento.captcha.value = document.getElementById('depoimentoCaptcha').value;
      document.formDepoimento.submit();
    }else{
      alert("Os seguintes erros foram encontrados:\n"+erro);
    }
  }

  function validarDenuncia(){
    erro = '';
    if(!get_radio_value()){ erro += "\n- Selecione uma das opÃ§Ãµes"; }
    if(document.formDenuncia.abuso.value){ erro += "\n- Escreva o seu nome"; }
    if(document.formDenuncia.denunciaCaptcha.value.length < 6){ erro += "\n- Digete o cÃ³digo na caixa ao lado"; }

    if(erro.length == 0){
      document.formDenuncia.submit();
    }else{
      alert("Os seguintes erros foram encontrados:\n"+erro);
    }
  }

  function get_radio_value(){
    for (var i=0; i < document.formDenuncia.abuso.length; i++){
      if (document.formDenuncia.abuso[i].checked){
        rad_val = document.formDenuncia.abuso[i].value;
        return i;
      }
    }
    return false
  }


  function validarCadastro1(pagina){
    erro = '';
    if(document.formCad.criancaNome.value.length < 5){ erro += "\n- Escreva o nome da crianÃ§a"; 
	
	document.getElementById("nome").style.color="red";
	}
    if(document.formCad.criancaTamanhoRoupa.value == '-'){ erro += "\n- Selecione o tamanho da roupa"; }
    if(document.formCad.criancaDataNascimento.value.length < 10){ erro += "\n- Data de nascimento da crinÃ§a Ã© invÃ¡lida."; 
	document.getElementById("datacrianca").style.color="red";
	}

    if(document.formCad.responsavelNome.value.length < 5){ erro += "\n- Escreva o nome do responsÃ¡vel"; 
	 document.getElementById("nomeresp").style.color="red";
	}


    if(document.formCad.responsavelEmail.value.length < 7){ erro += "\n- Escreva o e-mail do responsÃ¡vel"; 
		document.getElementById("emailresp").style.color="red";
	}
    if(document.formCad.responsavelDataNascimento.value.length < 10){ erro += "\n- Data de nascimento do responsÃ¡vel Ã© invÃ¡lida."; 
		document.getElementById("dataresp").style.color="red";
	}
    if(document.formCad.responsavelCpf.value.length < 14){ erro += "\n- CPF do responsÃ¡vel invÃ¡lido."; 
	document.getElementById("cpf").style.color="red";
	}
//    if(document.formCad.responsavelEndereco.value.length < 5){ erro += "\n- EndereÃ§o do responsÃ¡vel invÃ¡lido."; }

    if(document.formCad.responsavelTelefoneDdd.value.length < 2 || document.formCad.responsavelTelefoneNumero.value.length < 5){ erro += "\n- Telefone do responsÃ¡vel invÃ¡lido."; 
	document.getElementById("telefone").style.color="red";
	}

    if(document.formCad.responsavelLogradouro.value.length < 5){ erro += "\n- Logradouro do responsÃ¡vel invÃ¡lido."; 
	document.getElementById("logradouro").style.color="red";
	}
    if(document.formCad.responsavelNumero.value.length < 1){ erro += "\n- NÃºmero do responsÃ¡vel invÃ¡lido."; 
		document.getElementById("numero").style.color="red";
	}
    if(document.formCad.responsavelBairro.value.length < 3){ erro += "\n- Bairro do responsÃ¡vel invÃ¡lido."; 
	document.getElementById("bairro").style.color="red";
	}
    if(document.formCad.responsavelCep.value.length < 8){ erro += "\n- CEP do responsÃ¡vel invÃ¡lido.";
		document.getElementById("cep").style.color="red";
	}

    if(document.formCad.responsavelCidade.value.length < 3){ erro += "\n- Cidade do responsÃ¡vel invÃ¡lido."; 
		document.getElementById("cidade").style.color="red";
	}
    if(document.formCad.responsavelEstado.value=="-"){ erro += "\n- Estado do responsÃ¡vel invÃ¡lido."; 
		document.getElementById("estado").style.color="red";
	}
    if(document.formCad.cadastroLoginNome.value.length < 2){ erro += "\n- Nome do FÃ£-Clube muito pequeno."; 
		document.getElementById("loginnome").style.color="red";
	}
    if(document.formCad.cadastroLoginUsuario.value.length < 4){ erro += "\n- UsuÃ¡rio deve ter pelo menos 4 caractesres.";
		document.getElementById("usuario").style.color="red";
	}
    if(document.formCad.cadastroLoginSenha.value.length < 5){ erro += "\n- Senha deve ter pelo menos 5 caracteres."; 
		document.getElementById("senha").style.color="red";
	}else{
      if(document.formCad.cadastroLoginSenha2.value != document.formCad.cadastroLoginSenha.value){ erro += "\n- As senhas nÃ£o conferem."; }
    }
    if(!document.formCad.cadastroRegulamento.checked){ erro += "\n- VocÃª deve aceitar os termos e condiÃ§Ãµes do regulamento."; }

    if(erro.length == 0){
      proximaPagina(pagina);
    }else{
      alert("Os seguintes erros foram encontrados:\n"+erro);
    }
  }

  function validarEditar1(){
    erro = '';
    if(document.formCad.criancaNome.value.length < 5){ erro += "\n- Escreva o nome da crianÃ§a";
		document.getElementById("nome").style.color="red";
	}
    if(document.formCad.criancaTamanhoRoupa.value == '-'){ erro += "\n- Selecione o tamanho da roupa"; }
    if(document.formCad.criancaDataNascimento.value.length < 10){ erro += "\n- Data de nascimento da crinÃ§a Ã© invÃ¡lida."; 
		
	}

    if(document.formCad.responsavelNome.value.length < 5){ erro += "\n- Escreva o nome do responsÃ¡vel"; 
		document.getElementById("nomeresponsavel").style.color="red";
	}
    if(document.formCad.responsavelEmail.value.length < 7){ erro += "\n- Escreva o e-mail do responsÃ¡vel";
		document.getElementById("email").style.color="red";	
	}
    if(document.formCad.responsavelDataNascimento.value.length < 10){ erro += "\n- Data de nascimento do responsavel Ã© invÃ¡lida."; 
		document.getElementById("datanasc").style.color="red";	
	
	}
    if(document.formCad.responsavelCpf.value.length < 14){ erro += "\n- CPF do responsÃ¡vel invÃ¡lido.";
		document.getElementById("cpf").style.color="red";
	}
//    if(document.formCad.responsavelEndereco.value.length < 5){ erro += "\n- EndereÃ§o do responsÃ¡vel invÃ¡lido."; }

    if(document.formCad.responsavelTelefoneDdd.value.length < 2 || document.formCad.responsavelTelefoneNumero.value.length < 5){ 
		erro += "\n- Telefone do responsÃ¡vel invÃ¡lido."; 
		document.getElementById("telefoneresp").style.color="red";
	}
	if(document.formCad.responsavelEstado.value=="-"){ 
		erro += "\n- Estado nÃ£o estÃ¡ definido."; 
		document.getElementById("estado").style.color="red";
	}

    if(document.formCad.responsavelLogradouro.value.length < 5){ erro += "\n- Logradouro do responsÃ¡vel invÃ¡lido."; 
		document.getElementById("logradouro").style.color="red";
	}
    if(document.formCad.responsavelNumero.value.length < 1){ erro += "\n- NÃºmero do responsÃ¡vel invÃ¡lido."; 
	document.getElementById("numero").style.color="red";
	}
    if(document.formCad.responsavelBairro.value.length < 3){ erro += "\n- Bairro do responsÃ¡vel invÃ¡lido."; 
	document.getElementById("bairro").style.color="red";
	}
    if(document.formCad.responsavelCep.value.length < 8){ erro += "\n- CEP do responsÃ¡vel invÃ¡lido.";
		document.getElementById("cep").style.color="red";
	}

    if(document.formCad.responsavelCidade.value.length < 3){ erro += "\n- Cidade do responsÃ¡vel invÃ¡lido."; 
	document.getElementById("cidade").style.color="red";
	}

    if(document.formCad.cadastroLoginNome.value.length < 2){ erro += "\n- Nome do FÃ£-Clube muito pequeno."; 
		document.getElementById("nomefaclube").style.color="red";
	}
    if(document.formCad.cadastroLoginSenha.value.length > 0){
      if(document.formCad.cadastroLoginSenha.value.length < 5){ erro += "\n- Senha deve ter pelo menos 5 caracteres."; }else{
        if(document.formCad.cadastroLoginSenha2.value != document.formCad.cadastroLoginSenha.value){ erro += "\n- As senhas nÃ£o conferem."; }
      }
    }
    if(!document.formCad.cadastroRegulamento.checked){ erro += "\n- VocÃª deve aceitar os termos e condiÃ§Ãµes do regulamento."; }

    if(erro.length == 0){
      document.formCad.submit();
    }else{
      alert("Os seguintes erros foram encontrados:\n"+erro);
    }
  }


  function validarIndiqueFaClube(){
    erro = '';
    if(document.formIndique.seuNome.value.length < 3){ erro += "\n- Escreva seu nome"; }
    if(document.formIndique.seuEmail.value == '-'){ erro += "\n- Indique seu e-mail"; }
    if(document.formIndique.seuEmail.value.length < 9){ erro += "\n- email incorreto"; }

    if(document.formIndique.nomeAmigo1.value.length < 3){ erro += "\n- Escreva o nome do seu primeiro amigo"; }
    if(document.formIndique.emailAmigo1.value.length < 10){ erro += "\n- o E-mail de seu primeiro amigo parece incorreto."; }
    if (document.formIndique.nomeAmigo2.value != ""){
    	if(document.formIndique.nomeAmigo2.value.length < 3){ erro += "\n- Escreva o nome do seu segundo amigo"; }
    	if(document.formIndique.emailAmigo2.value.length < 10){ erro += "\n- o E-mail de seu segundo amigo parece incorreto."; }
    }
    if (document.formIndique.nomeAmigo3.value != ""){
    if(document.formIndique.nomeAmigo3.value.length < 3){ erro += "\n- Escreva o nome do seu terceiro amigo"; }
    if(document.formIndique.emailAmigo3.value.length < 10){ erro += "\n- o E-mail de seu terceiro amigo parece incorreto."; }
    }
    if(erro.length == 0){
      document.formIndique.submit();
    }else{
      alert("Os seguintes erros foram encontrados:\n"+erro);
    }
  }

  function validarContato(){
    erro = '';
    if(document.formContato.contatoNome.value.length < 5){ erro += "\n- Escreva o seu nome."; }
    if(!checkMail(document.formContato.contatoEmail.value)){ erro += "\n- E-mail invÃ¡lido"; }
    if(document.formContato.contatoMensagem.value.length < 5){ erro += "\n- Escreva uma mensagem."; }

    if(erro.length == 0){
      contatoConfirmacao();
    }else{
      alert("Os seguintes erros foram encontrados:\n"+erro);
    }
  }



  function validarEditar3(){
    erro = "";
    if(document.formCad.cadastroDepoimentoTexto.value.length < 10){ erro += "\n- O depoimento precisa ter pelo menos 10 caracteres."; }

    if(erro.length == 0){
      document.formCad.submit();
    }else{
      alert("Os seguintes erros foram encontrados:\n"+erro);
    }
  }

  function validarEditar2(){
      s = document.formCad.myfile.value.substr(document.formCad.myfile.value.length-3, 3);
      s = s.toLowerCase();
      erro = '';

      if(document.formCad.myfile.value.length == 0){
        window.location = 'perfil_gerencia.php';
      }else{
        if(s != 'jpg' && s != 'gif' && erro.length == 0){ erro += 'A sua imagem deve estar no formato JPG ou GIF'; }

        if(erro.length == 0){
          startUpload();
          document.formCad.submit();
        }
      }
  }


  function checkMail(mail){
      var er = new RegExp(/^[A-Za-z0-9_\-\.]+@[A-Za-z0-9_\-\.]{2,}\.[A-Za-z0-9]{2,}(\.[A-Za-z0-9])?/);
      if(typeof(mail) == "string"){
          if(er.test(mail)){ return true; }
      }else if(typeof(mail) == "object"){
          if(er.test(mail.value)){
                      return true;
                  }
      }else{
          return false;
          }
  }

  function depoimentoAprovar(depoimentoId){
    window.location = 'perfil_gerencia.php?depoimentoStatus=1&depoimentoId='+depoimentoId;
  }

  function amigoRemover(cadastroId){
    window.location = 'amigo_v.php?cadastroId='+cadastroId+'&acao=remover';
  }

  function amigoAprovar(cadastroId){
    window.location = 'amigo_v.php?cadastroId='+cadastroId+'&acao=pedir';
  }

  function amigoAprovarAmizade(cadastroId){
    window.location = 'amigo_v.php?cadastroId='+cadastroId+'&acao=aprovar';
  }

  function amigoReprovarAmizade(cadastroId){
    window.location = 'amigo_v.php?cadastroId='+cadastroId+'&acao=reprovar';
  }

  function depoimentoConfirmacao(depoimentoId){
    document.depoimentoId = depoimentoId;
    mostraEsconde('divRemoverDepoimento', 1, 1);
  }

  function depoimentoReprovar(depoimentoId){
    window.location = 'perfil_gerencia.php?depoimentoStatus=0&depoimentoId='+depoimentoId;
  }


  function fotoConfirmacao(fotoId){
    document.fotoId = fotoId;
    mostraEsconde('divRemoverFoto', 1, 1);
  }

  function fotoRemover(fotoId){
    window.location = 'foto_gerencia.php?fotoStatus=0&fotoId='+fotoId;
  }

  function votoAprovar(cadastroId){
    captcha = document.getElementById('cadastroCaptcha').value;
    window.location = 'voto_v.php?votoStatus=1&cadastroId='+cadastroId+"&captcha="+captcha;
  }

  function votoConfirmacao(cadastroId){
    document.cadastroId = cadastroId;
    mostraEsconde('divAprovarVoto', 1, 1);
  }

  function depoimentoCaptcha(){
    mostraEsconde('divAprovarDepoimento', 1, 1);
  }

  function indiqueAprovar(){
    document.formIndique.captcha.value = document.getElementById('cadastroCaptcha').value;
    document.formIndique.submit();
  }

  function indiqueConfirmacao(){
    mostraEsconde('divAprovarIndique', 1, 1);
  }


  function contatoAprovar(){
    document.formContato.captcha.value = document.getElementById('cadastroCaptcha').value;
    document.formContato.submit();
  }

  function contatoConfirmacao(){
    mostraEsconde('divAprovarContato', 1, 1);
  }


  function soma(obj, limite){

    var mais_um=eval(obj.value.length-1);
    mais_um++;

    if (obj.value.length>limite)
    {
      obj.value=obj.value.substr(0, limite);
    }

    obj.focus();
  }

  function somaRetorna(obj, limite, objRetorno){

    var mais_um=eval(obj.value.length-1);
    mais_um++;

    if (obj.value.length>limite){
      obj.value=obj.value.substr(0, limite);
    }
    obj.focus();

    obj2           = document.getElementById(objRetorno);
    obj2.innerHTML = limite - obj.value.length;

    obj.focus();
  }

  function setaCorSite(isFundo, cor){
    var browserName = navigator.appName;
    if(browserName == 'Netscape'){
      pos = cor.indexOf(')');
      cor = cor.substring(4,pos);
      cor = cor.split(',');
      hex = RGBtoHex(trim(cor[0]), trim(cor[1]), trim(cor[2]));
    }else{
      hex = cor.substr(1,6);
    }

    if(isFundo == 1){
      document.formCores.corFundo.value = hex;
    }else{
      document.formCores.corFonte.value = hex;
    }
//    alert(document.formCores.corFundo.value);
//    alert(document.formCores.corFonte.value);

    document.formCores.submit();
  }

  function trim(str, chars) {
  	return ltrim(rtrim(str, chars), chars);
  }

  function ltrim(str, chars) {
  	chars = chars || "\\s";
  	return str.replace(new RegExp("^[" + chars + "]+", "g"), "");
  }

  function rtrim(str, chars) {
  	chars = chars || "\\s";
  	return str.replace(new RegExp("[" + chars + "]+$", "g"), "");
  }

  function RGBtoHex(R,G,B) {return toHex(R)+toHex(G)+toHex(B)}
  function toHex(N) {
   if (N==null) return "00";
   N=parseInt(N); if (N==0 || isNaN(N)) return "00";
   N=Math.max(0,N); N=Math.min(N,255); N=Math.round(N);
   return "0123456789ABCDEF".charAt((N-N%16)/16)
        + "0123456789ABCDEF".charAt(N%16);
  }

  function mostraEscondePergunta(numero){
    objP = document.getElementById('pergunta'+numero);
    objR = document.getElementById('resposta'+numero);
    if(objP.innerHTML == "[+]"){
      objR.style.display = "block";
      objP.innerHTML = "[-]";
    }else{
      objR.style.display = "none";
      objP.innerHTML = "[+]";
    }
  }



  function validarTopico(){
    erro = '';
    if(document.formTopico.topicoAssunto.value.length < 5){ erro += "\n- Escreva o assunto do tÃ³pico"; }
    if(document.formTopico.topicoMensagem.value.length < 5){ erro += "\n- Mensagem do tÃ³pico muito curta"; }

    if(erro.length == 0){
      document.formTopico.submit();
    }else{
      alert("Os seguintes erros foram encontrados:\n"+erro);
    }
  }

  function validarPost(){
    erro = '';
    if(document.formPost.postMensagem.value.length < 5){ erro += "\n- Mensagem do post muito curta"; }

    if(erro.length == 0){
      document.formPost.submit();
    }else{
      alert("Os seguintes erros foram encontrados:\n"+erro);
    }
  }

  function avisaLogin(){
    alert('VocÃª precisa estar logado pra postar um tÃ³pico');
  }


  function sobrepoeTwitter(flag){
    if(flag){
      document.getElementById('divTwitter').style.zIndex = '600';
      document.getElementById('divTwitter').style.height = '278px';
    }else{
      document.getElementById('divTwitter').style.zIndex = '1';
      document.getElementById('divTwitter').style.height = '70px';
    }
  }


  function validarVoto(){
    erro = '';
    if(document.formVotoPontos.votoCaptchaUsuario.value.length < 6){ erro += "\n- Escreva o cÃ³digo que aparece na imagem acima"; }

    if(erro.length == 0){
      document.formVotoPontos.submit();
    }else{
      alert("Os seguintes erros foram encontrados:\n"+erro);
    }
  }

  function validarComentario(){
    erro = '';
    if(document.formPostaComentario.comentarioTexto.value.length < 10){ erro += "\n- O comentÃ¡rio deve ter mais de 10 caracteres."; }

    if(erro.length == 0){
      document.formPostaComentario.submit();
    }else{
      alert("Os seguintes erros foram encontrados:\n"+erro);
    }
  }


function validar_CPF(Ncampo)   
{   		
		
		erro = new String;   
  		cpf=document.formCad.responsavelCpf;
		//alert(cpf.value.length);
        if (cpf.value.length == 14)   
   		 {     
				
				strCpf   =cpf.value;
				strCpf = cpf.value.replace('.', '');   
				strCpf = cpf.value.replace('.', '');   
				strCpf = cpf.value.replace('-', ''); 
	  
				var nonNumbers = /\D/;   
				
				if (nonNumbers.test(strCpf))   
				{   
						erro = "A verificacao de CPF suporta apenas n&uacute;meros!";   
				}   
				else   
				{   
						if (strCpf == "00000000000" ||   
								strCpf == "11111111111" ||   
								strCpf == "22222222222" ||   
								strCpf == "33333333333" ||   
								strCpf == "44444444444" ||   
								strCpf == "55555555555" ||   
								strCpf == "66666666666" ||   
								strCpf == "77777777777" ||   
								strCpf == "88888888888" ||   
								strCpf == "99999999999") {   
								   
								erro = "Número de CPF inválido !"   
								//document.getElementById(Ncampo).value = cpf.value;
						}   
						
						
						var a = [];   
						var b = new Number;   
						var c = 11;   
	  
						for (i=0; i<11; i++){   
								a[i] = strCpf.charAt(i);   
								if (i < 9) b += (a[i] * --c);   
						}   
		   
						if ((x = b % 11) < 2) { a[9] = 0 } else { a[9] = 11-x }   
						b = 0;   
						c = 11;   
		   
						for (y=0; y<10; y++) b += (a[y] * c--);   
		   
						if ((x = b % 11) < 2) { a[10] = 0; } else { a[10] = 11-x; }   
		   
						if ((strCpf.charAt(9) != a[9]) || (strCpf.charAt(10) != a[10])) {   
							erro = "CPF incorreto.";  
							//document.getElementById(Ncampo).value = cpf.value; 
						}   
				}   
		}   
		else   
		{   
			if(cpf.value.length == 0)  
			{
				//document.getElementById('resposta'+Ncampo).innerHTML="";
				//document.getElementById(Ncampo).style.background="#FFFFFF" 
				return false;   
			}
			else   
				erro = "CPF incorreto.";   
		}   
		if (erro.length > 0) {   
				alert(erro);   

				if (cpf.value.length == 11)   
				{     
					str = cpf.value;
					str2 = cpf.value.substring(0,3);
					str3 = cpf.value.substring(3,6);
					str4 = cpf.value.substring(6,9);
					str5 = cpf.value.substring(9,12);
					result=str.replace(str,str2+'.');
					result2=str.replace(str,str3+'.');
					result3=str.replace(str,str4+'-');
					//document.getElementById(Ncampo).value = result + result2 + result3 + str5;
					//document.getElementById(Ncampo).style.background="red";
					//document.getElementById(Ncampo).focus(); 
					document.formCad.responsavelCpf.focus();
					return false;   
				}				
			
				//document.getElementById(Ncampo).value = cpf.value;
				//document.getElementById(Ncampo).style.background="red";
				//document.getElementById(Ncampo).focus(); 
				document.formCad.responsavelCpf.focus();
				return false;   
		}     
		//document.getElementById(Ncampo).style.background="#98EE84";
		//document.getElementById('resposta'+Ncampo).innerHTML="";
		//str = cpf.value;
		//str2 = cpf.value.substring(0,3);
		//str3 = cpf.value.substring(3,6);
		//str4 = cpf.value.substring(6,9);
		//str5 = cpf.value.substring(9,12);
		//result=str.replace(str,str2+'.');
		//result2=str.replace(str,str3+'.');
		//result3=str.replace(str,str4+'-');
		//document.getElementById(Ncampo).value = result + result2 + result3 + str5;
		return true;       
}   




