How did they do this?

I wonder how did they do this one. It looks really simple, but I tried to make it and I didn’t know how.

If you hover your mouse to “Contact Us”, the picture will change to a man with a glasses. With cursor still in “Contact Us”, if you hover to “Employment”, a picture of a lady fades in (the picture of a man with glasses still on the back).
If you cursor is out of the three buttons, and you hover your cursor to “Employment”, the picture of a lady fades in (this time, the background is not a man with glasses anymore).

Somehow, this flash movie can keep track of the background that it used before. How did they do this?

Many many thanks in advanced!!!