function formatarCpfCnpj(campo,event){
	if(document.getElementById('tipo').value == 'J'){
		return txtBoxFormat(campo.form, campo.name, '99.999.999/9999-99', event);
	}else if(document.getElementById('tipo').value == 'F'){	
		return txtBoxFormat(campo.form, campo.name, '999.999.999-99', event);
	}
} 

function autoTabCpfCnpj(campo,event){	
	if(document.getElementById('tipo').value == 'J'){
		return autoTab(campo, 18, event);
	}else if(document.getElementById('tipo').value == 'F'){
		return autoTab(campo, 14, event);
	}
}

function ajustarForm(tipo){
	if(tipo=="F"){				
		$('#label_cnpj').html("CPF");
	}else{		
		$('#label_cnpj').html("CNPJ");
	}
}

function recuperarSenhaEmpresa(){
	displayWait("wait");
	xajax_recuperarSenha(xajax.getFormValues('recuperarSenha'));
}

function recuperarSenhaViaHash(hash){
	displayWait("wait");
	xajax_recuperarSenhaViaHash(hash);	
}
