Relation Between Schottky Barrier Heights, Band Offsets and the Energy Levels of Transition Metal Impurities