Manipulation of the Electron Spin in a Quantum Dot Using a Magnetic Field and Voltage Gates