I am not going to say that this is definately your problem, but it sounds like what happened to me. All of a sudden I had no gears, forward or reverse. When I took it to Ford, they said it was either the torque converter going out or the transmission range sensor. The sensor tells the cpu what gear or position the transmission is in. It was $30 and some change, only took about 10 minutes to switch it out. It sits right on top of the tranny.

Next time it does it to you, try this....with your foot on the brake, slowly go through the full range of the transmission. P - 1, and back again. Do this a couple of times. It should come back.

I hope this helps.

Beaz
'97 Contour