Does this still happen if you open them up in safe mode? If you have a desktop icon for internet explorer, you can right click and open in safe mode. Firefox has a safe mode option in the start menu. This disables any plugins that might cause issues. This is the first easy thing to try, though its not very likely that its a plugin causing the problem since it is the same for both web browsers.
You can of course download spybot search and destroy along with updates onto a thumb drive from another computer and then install it/update it on the infected computer and then do a scan. You can also do the same with standard free antivirus programs like AVG free, Avast, Avira, PC-tools antivirus... and many more. Viruses can sometimes hide themselves on an infected system. You can do a more thorough scan by scanning it from another computer or a live CD.
I'm curious how they did it though, so if you have time... it would be cool if you followed these steps for me and reported the information.
Whatever it is may have modified your hosts file to redirect you to random sites or it may have put in a prankster DNS server in your network connection settings.
First go to this directory:
and open up the "hosts" file in notepad. This file should have between 0 and 2 lines of un-commented information (its a comment if the line starts with #). If it has any websites or names or anything other than "127.0.0.1" and "localhost" in it, then that might be the problem. If you have spybot Search and destroy installed and use the immunize feature, it will fill this file with hundreds of known bad sites and redirect them to 127.0.0.1 to keep you safe (which is kinda cool).
Next open up control panel and go to "network connections" if its pre-vista or "network and sharing center" if its post-vista. Then go to "change adapter settings". Right click properties on the connection you are using for internet. Click on the line below that says "Internet Protocol Version 4 (TCP/IPv4). Then click properties. Now take note of the lines below that says stuff about DNS servers. Is this set to automatic or is it set to use specific DNS servers? If there are numbers typed in, be sure to keep a record of them and then try googles public DNS servers as listed here:
Or try setting it to automatic and see if that works. These changes may take a few minutes to take effect... you can reboot just to be safe if you like.
Note that if this is your work computer and they have a bunch of servers and corporate network stuff... they will manually enter in their own DNS servers in order for host names in the work place to be managed internally.
So in either case, it would be cool if you could mention something if you find something strange in the places that I described. If you want to get this issue over with, try doing the virus scan thing. If the issue persists, run hijackthis and post the log.