Now that popups are taken care of, we need to install Adblock plus. This will keep Firefox from ever opening the flash ads, images, or even stop the script that loads ads. Go to https://addons.mozilla.org/en-US/firefox/addon/1865
and install the extension. It will warn you about installing unsigned code, etc. but it's from the Mozilla website, so you know it's clean. I've been using it for quite a while now.
So, it should have installed and asked you to restart Firefox. If you restart Firefox, it will keep the pages you were viewing and history and such. But, it needs some definition files to know what to block and work properly. This is covered in step 3.