Dipole excitation, ionization and fragmentation of N2and CO in the 10-60 eV region