the solution i have is dont go to 3.1.3 as i have been trying it keeps coming up saying incompatable file... how ever 3.1.2 works just fine. i still ran into some minor issues along the way but heres the deal.
the phone i was working on at the time is a iphone 3g 16 gig which was locked out in a way i ahvent seen before... some american thing where you can use the phone with out the right sim card installed basically. due to this it had some other issues aswell and forced me to do a restore. stupidly i clicked restore and update pushing it to 4.0.1. phone remained locked out. after many tries pushing it back to 3.1.3 heres what i did..
download a restore file of 3.1.2 and save it some where easy to find (it gets hidden some where in windows thats a bit hard to track down from the itunes window)
turn the phone off completely (theres many vids on you tube showing this process if you would like a visual)
hold power and home as if your doing a restart and hold them for 10 seconds (apparently this should be as close to actual 10 seconds as possible)
after 10 seconds release the power button but continue to hold the home button untill you hear the sound of your computer recognising a USB input.
the screen will remain black this is called DFU mode. itunes will say its recognised a phone in restore mode or something similar.
click ok on the box then you need to hold down shift and click restore a box will open so that you can select the firmware version you wish to use.
once this is done it will again come up in recovery mode. (i just used umbrella to kick it out) you can just restart the phone according to most posts.
i then tried to jailbreak with spirit but it failed i believe due tot he way it was locked to the provider so i tried the same thing with black rain which worked and then proceeded to jailbreak it with spirit also which apears to work fine together.
any videos and information to help you with this is available online and it easy to do once you get your head around it. im posting this because no one seemed to know how to fix the issue i was having.
if you have any problems like this or any questions feel free to contact me on here. ill help how ever i can