Automatic determination of calcium and magnesium in water.