Effects of magnesium on calcium phosphate formation.