A Photochemical Model of the Martian Atmosphere