I restored successfully my Apple iphone 3G 3.0 but following messages appear

SIM carrier not recognized
Only emergency
I used earlier 3rd party SIM card on this mobile.
(is it jailbroken)
Please help me how i can unlock it.