Bought a used jailbroken iphone 3gs

The person I got the phone from did NOT delete all their old data. It is jailbroken, and I clicked to restore to factory settings and update so that I could have a like-new iphone. Unfortunately, nothing is working for me. I have no idea how to get the phone working. When I click restore, it says it can't because there's no backup. When I click to use 4.0 version of the firmware, it says its not eligible. What can I do to get my iphone 3gs restored to factory settings without a backup? What can I do?

I've gotten DFU mode, a white screen, a silver apple logo, and a connect to itunes thing to appear on the screen at different points. I'm on a mac btw. Please let me know what I can do.

I have never seen this situation, Were you restoring it via iTunes or from the phone itself?