I left my x3 parked for 3 weeks, and came back to a completely dead battery. I jumped started it, and drove around for 20 minutes, and found that I could start it up, but after driving around some more, it would not start up again

. I've managed to jump start it again, drive it around, and then was able to start it up again... but I'm guessing that the battery is on its last legs.
Unless someone has some suggestions on my prolonging the life of the battery, I'm wondering if anyone could recommend a good replacement (I've got the '04 2.5i).