Electronic transition dipole moment functions and difference potentials for transitions among low-lying states of Li2 and Na2