OK, the rogue piece of script has been located and removed, WP has been upgraded and now it is a matter of getting all the little add-ons working with the newer version of WordPress. Hopefully Google/StopBadWare will take this site off their “OMG, it will kill you!!!” list in short order.
I seem to have lost all my categories in the process of upgrading? At least in the write post page.