Initial and final molecular states as ‘‘virtual states’’ in two-photon processes