Hi,
You may get away with just the battery replacement,if not there is a reset proceedure.
Also inside the car near to the trunk release is a switch marked "remote on/off" make sure this is in the on position when trying the key.
I had the same problem when I bought my LS and the battery sorted it and it has been working without problems for over 4 years now.