Cherie beat me to it - unless a horse is travelling forward, it will not be straight. If you take a look at the pyramid of training : Google Image Result for http://www.dressage-academy.com/images/dressage-training-pyramid.jpg
You will see that straightness does not come until very late in the scale, rhythm, relaxation, connection and impulsion must first be achieved.
A German rider has been staying with friends of mine for the last few weeks and has been riding some horses for us. Watching her ride a newly broken 3 year old, all she does is get him forward. She does not worry about ANYTHING other than forward. Once a horse is forward, everything else will come.
On the more educated horses, she does exactly the same thing. The first 10-15minutes of her ride, she rides FORWARD FORWARD FORWARD, the horse MUST be in front of the leg and really motoring, before we worry about the smaller details and fine tuning.
Straight lines are actually one of the hardest movements to ride in dressage. To keep a horse dead straight, supple, over the back and moving with activity and rhythm while on a straight line is HARD!
If the pony you are working is young and green, don't push the straight lines issue. You want to try and stay on a bend as much as you can, until you can establish a nice forward even rhythm, and start to feel a connection come from the hind legs to your hand.
THEN you can start asking for short periods of straight lines, and when you lose her, go back onto a curve, re-establish your connection, and ride out again until you can build up the time spent on a straight line.