I would agree with OverAllComa, its probably your alternator... your battery would be the problem... when the car is running you don't actually need the battery to keep it running if your alternator is putting out strong enough you... a cheaters way of testing that would be to pull your negative battery cable off and see if the engine stops right away...from my experience that usually means the alternator is dead or the wire to the alternator isn't tight.