The Electronic Structures and Magnetic Properties of the Chromyl and Molybdenyl Ions