Diabatic states from ab initio calculations. A new method applied to the Na(2S,2P) + N2 system.