Ejection-collision orbits in two degrees of freedom problems of Celestial Mechanics