You’ve been infected with the “Flashback” malware. See this Apple support document:
Flashback Removal Security Update
Back up all data, if you haven't already done so.
Select ▹ Software Update to install the Flashback malware removal tool, as well as any other available updates. Installing that item should clear the infection in most cases. You must update to OS X 10.5.8 before you can install the removal tool.
The removal tool runs automatically in the background and is then deleted. Don’t look for something to click. If the malware is removed, you’ll be notified.
After you’ve secured your system — not before — change every Internet password you have, starting with banking passwords, and check all financial accounts for unauthorized transactions.
The update will disable Java (not JavaScript) in all your web browsers. Leave it disabled as long as you're running 10.5. Your version of Java has bugs that make it unsafe to use on the Internet, and those bugs will probably never be fixed.
If the update fails to remove the malware, you may be able to clear it by running the removal tool developed by a third party:
Flashback Removal Tool - F-Secure