<!-- começo da função
function formataCodLan($objeto){
// o textbox tem que ter maxlength="20"
// e essa função entra no onKeyDown
	var $tecla=(document.layers) ? event.which : event.keyCode;

	if (($tecla!=8) && ($objeto.value.charAt($objeto.value.length-1) != '.')) {
		switch ($objeto.value.length){
			case 1:{
				$objeto.value=$objeto.value + '.';
				return;
			}
			case 4:{
				$objeto.value=$objeto.value + '.';
				return;
			}
			case 7:{
				$objeto.value=$objeto.value + '.';
				return;
			}
			case 11:{
				$objeto.value=$objeto.value + '.';
				return;
			}
			case 15:{
				$objeto.value=$objeto.value + '.';
				return;
			}
		}
	}
}
//--> Fim da função

// funcao que recebe o lancamento e formata
function formataLancamento(codLan){
//	alert(codLan.length + ' - ' + codLan);	
	if (codLan.length != 15) {
		return false;
	}
	codLan = codLan.substr(0,1) + '.' + codLan.substr(1,2) + '.' + codLan.substr(3,2) + '.' + codLan.substr(5,3) + '.' + codLan.substr(8,3) + '.' + codLan.substr(11,4);
	return codLan;
}