Theory of Adsorption, Diffusion and Spinpolarization of Mn on Si(001) and Si(111) Substrates