OMG i've been bothered by this a lot lately. fucking programs stealing focus.
say you're happily chatting away on msn, and you remember that u hafta visit some page so u click ie and continue typing, and midsentence you get cut off by ie loading. everything wants to be on top, and only in this case is this a bad thing (har har). usually this is just annoying but sometimes a dialogue pops up with yes selected by default and u press the spacebar, or u type a word with a "y" and BAM, you've installed some spyware, or let something thru your firewall or something has happened that you're unaware of. fuckers!
here is the quick and easy fix, u need tweakui - which is available for download from the microsoft website, click here. (this program is also really good for other things, i've had it since windows 95, which i hung on to for far too long, fucking stupid OS, lol.)
under "general" click the checkbox for Prevent applications from stealing focus. and that's it!