How to unlock Iphone - factory restored?

I have an Iphone 3Gs that was unlocked to any network and jailbroken. I accidently updated it under settings and now it has returned to factory settings and won't accept my SIM card. I have no idea what the IPW is or anything like that, all i know is my phone is completeley useless to me now! It won't recognise my SIM and when i switch it on it just has a grey screen saying IPHONE.

These iphones can be unlocked via software, but not the latest models made in 2012 or late 2011. But you need to check this production date before moving on with the software unlock.