Java script hacked adverts?

I installed a program call MacKeeper, when I found strange things happening with Safari web-browser I uninstalled it.

Then I found the makers of MacKeeper, a firm called Zoebit, managed to embed their advert for MacKeeper into Get free Email accounts: Web based and secure Email - and [url=]Product reviews and prices, software downloads, and tech news - CNET - just two examples. I was particularly concerned that because they could hack their advert into and that some rogue javascript had been placed in my system.

When using or or a proxy server using http:// the MacKeeper advert was no longer there.

Does anyone know how this company managed to hack these adverts into webpages I view?

Here’s the Apple discussion thread on solving the problem.
]MacKeeper can’t be deleted