 function atualizarCBO(node){
   document.join_form.profissao.value=node.label;
   document.join_form.cbo.value=node.data.id;
 }
 function atualizarCNAE(node){
   document.join_form.cnae_texto.value=node.label;
   document.join_form.cnae.value=node.data.id;
 }

function testEmpresa(campo){

  if(campo.checked){
	ee = document.getElementById('camposempresa');
	if(campo.value=='1'){
		  ee.style.position = 'relative';
		  ee.style.visibility= 'visible';
		  if (navigator.appName.indexOf('Explorer') != -1){
				joinForm = document.getElementById('join_form');
				reposicionaForm(joinForm);
		  }
	}else{
	  ee.style.position = 'absolute';
	  ee.style.top = '0px';
	  ee.style.visibility="hidden";
	}
  }    
}

function testCamposForumConsultasPublicas(){

  ee = document.getElementById('camposForumConsultasPublicas');
  joinForm = document.getElementById('join_form');
  senha = document.getElementById('password');
  confirmacao_senha = document.getElementById('password_confirm');
  divContainer = document.getElementById('conteiner');
  divSecao03 = document.getElementById('uma-coluna');

  if((document.join_form.forum.checked) || (document.join_form.consultas_publicas.checked)){
	ee.style.position = 'relative';
	ee.style.visibility='visible';
	    if (navigator.appName.indexOf('Explorer') != -1){
		divContainer.style.height = '1100px';
		divSecao03.style.height = '800px';
	}
	reposicionaForm(joinForm);
	if (navigator.appName.indexOf('Explorer') != -1){
		senhaX = document.getElementById('password');
		senhaX.value = senha.value;
		confirmacao_senhaX = document.getElementById('password_confirm');
		confirmacao_senhaX.value = confirmacao_senha.value;
	}
	if(document.join_form.representaempresa[0].checked){
	  representaEmpresa = document.getElementById('camposempresa');
	  representaEmpresa.style.visibility="visible";
	}
  }else{
	reposicionaBotaoRegistrar();
	ee.style.visibility="hidden";
	representaEmpresa = document.getElementById('camposempresa');
	representaEmpresa.style.visibility="hidden";
  }
}

function testCamposBoletim(){

  ee = document.getElementById('camposBoletim');
  
  if(document.join_form.boletim.checked){
	ee.style.visibility="hidden";
  }else{
	ee.style.visibility="visible";
  }
}

function reposicionaForm(form){
	if (navigator.appName.indexOf('Explorer') != -1)
	{
		joinForm.innerHTML = joinForm.innerHTML;
	}

	return;
}

function reposicionaBotaoRegistrar(){
	divConsultas = document.getElementById('camposForumConsultasPublicas');
	divConsultas.style.position = 'absolute';
	divConsultas.style.top = '0px';
	divContainer = document.getElementById('conteiner');
	divSecao03 = document.getElementById('uma-coluna');

	if (navigator.appName.indexOf('Explorer') != -1)
	{
		divSecao03.style.height = '550px';
		divContainer.style.height = '780px';

	}


	return;
}

try{
	divConsultas = document.getElementById('camposForumConsultasPublicas');
	divContainer = document.getElementById('conteiner');
	divSecao03 = document.getElementById('uma-coluna');

	camposEmpresa = document.getElementById('camposempresa');

	if (navigator.appName.indexOf('Explorer') != -1)
	{
		divSecao03.style.height = '550px';
		divContainer.style.height = '780px';
	}
	camposEmpresa.style.position = 'absolute';
	camposEmpresa.style.top = '0px'
	divConsultas.style.position = 'absolute';
	divConsultas.style.top = '0px';
}
catch(error){}


