Time-dependent density functional study of the electronic potential energy curves and excitation spectrum of the oxygen molecule.