Cars can act weird when the charging system in on the fritz. Take it to Pep Boys or some auto parts store and ask them to check the charging system. Most places have portable battery & alternator testers to determine if that's the correct course of action (replacing the battery)