Potential-energy curves of some electronic states of Na2 and Na2+