Iphone 3g stuck on itunes screen?

Have a 3g on 4.2.1 bb 6.15 tried updating to 5.1 but got error with itunes, its now stuck on itunes screen tried tu to get it out of it but just goes back to itunes screen.tried to restore to custom 4.2.1 but getting error 1604 or 1603. Please help

Added (1). Done all that but got error 1015 at the end

First start with a soft reset which is when you hold the top power button witht he home cirlcle buton together for a about 30 seconds or so. If this doesn't fix the problem and the iphone won't boot up properly bcuase it was interupted duing the backing up or restoring process you would have to put the phone into a mode called DFU whichis very similar to the soft reset. But b4 you hold on to those two same buttons you need to plug your phone into your computer and have itunes loaded on your comp then you hold those two buttons once again until the phone resets. Now this is very important do not let go of the top and bottom button continue to hold. Now once you c the apple symbol pop back on the screen of the iphone you release the power button but contiue to hold the home button until the screen pops up where it sasy to plug into itunes. This will tell the itunes your phone is in recovery mode and will need to be restored. This will wipe all your info on the phone and return it back the factory settings. I hope you were able to back up you info becuse it will only restore it back your last known backup.