Ideals and congruence relations in lattices