function mascara_cpf(cpf, evento){
	if(document.all){
		var tecla = window.event.keyCode;
	}
	else{
		var tecla = evento.which;
	}
	if ((tecla != 8) && (tecla != 46)){
  		if (cpf.value.length == 3)
			cpf.value = cpf.value + ".";	
		else
			if (cpf.value.length == 7)
				cpf.value = cpf.value + ".";	
			else
				if (cpf.value.length == 11)
					cpf.value = cpf.value + "-";
	}
}
