function setIdCid(id){
	
	var hidenCid = document.getElementById('hidenCid');
	var idCid = document.getElementById(id);
		
	hidenCid.value = idCid.value;
}

function tipoPessoa(tipo){
	
	obj0 = document.getElementById('fisica');
	obj1 = document.getElementById('juridica');
	
	if(tipo==0){
		
		removeFromValidate('form','razao');
		removeFromValidate('form','cnpj');
		addToValidate('form', 'nome', 'name', true, 'Nome');
		addToValidate('form', 'cpf', 'cpf', true, 'CPF');
		
		obj0.style.display=''
		obj1.style.display='none';
		
	} else if(tipo == 1){
		
		removeFromValidate('form','nome');
		removeFromValidate('form','cpf');
		addToValidate('form', 'razao', 'name', true, 'Razão Social');
		addToValidate('form', 'cnpj', 'cnpj', true, 'CNPJ');
		
		obj0.style.display='none'
		obj1.style.display='';
	
	}
	
}