N K-shell absorption spectra of ionic and molecular cyrstals