My first bit of advice would be not to use two 250kb gif images
It's probably the simplest way of doing it - you could achieve the same thing more effectively in Flash, perhaps (although that then makes accessibility an issue)
Look into a simple javascript framework like MooTools, jQuery, Prototype too, which makes things like that a lot simpler (and even if not for this example, it's a great thing to know about)