Thermoelectric power and electronic structure of dilute alloys of nickel and cobalt with d transition elements