i have an iphone 3gs 5.1.3.04...i updated it to ios4 but now dont know how to unlock n jailbreak it..can you tell me how to do it or downgrade to a lower firmware n then unlock it?

only unlocking would do..Thanks