//script q complementa a página e pesquia da CNH
function exibir(tipo)
{  
  document.getElementById('divCampo').style.visibility='visible';
  if ( tipo == 'n' ) {
    document.getElementById('nomeCampo').innerHTML = "Digite o CPF:";
  }  
  else if ( tipo == 'a' )
  {
    document.getElementById('nomeCampo').innerHTML = "Digite a data de nascimento:";
  }

  document.getElementById('txtCampo').value = '';
  document.getElementById('txtRegistro').value = '';
  
}

function validar() 
{ 
  msgErro='';
  if ( document.getElementById('txtRegistro').value == '' )
  {
    msgErro = "\n. Registro";
  }

  if ( document.getElementById('txtCampo').value == '' )
  {
    nc = document.getElementById('nomeCampo').innerHTML;
    msgErro += "\n. " + nc.substring(0, nc.length-1) ;
  }  
  if ( msgErro != '' )
  {
    alert('Por favor, preencha os campos:' + msgErro);
  }
  else 
  {
    document.forms['frmPesquisa'].submit();
  }
}
function seleciona() {
if (document.BarraSP.escolha.options[document.BarraSP.escolha.selectedIndex].value != 0) {
	parent.document.location = document.BarraSP.escolha.options[document.BarraSP.escolha.selectedIndex].value; }
else { return false; } }  

function selecionaClique() {
if (document.formClique.Clique.options[document.formClique.Clique.selectedIndex].value != 0) {
	parent.document.location = document.formClique.Clique.options[document.formClique.Clique.selectedIndex].value; }
else { return false; } }
