I believe Willow is correct in that you only have something like 15 seconds to swap the battery before the key decodes itself.
If you've got another two coded keys then you can re-code your remote from them - see the owners guide in the glovebox !
If you haven't got two coded keys then it is indeed time for a trip to the dealer !
HTH
Edd