Electronic structure and magnetic properties of 3d impurities in ferromagnetic metals.