Out-of-warranty repairs for anything other than the iPhone 4s was $149 the last time I looked on Apple's support website.
And at the store I worked at, they could do out-of-warranty repairs for iPods that were like 5+ generations behind (although it'd take a day or two to get the replacement shipped over to the store), so I don't think you're likely to get a 3GS.
Here you go:
http://support.apple.com/kb/index?page=servicefaq&geo=United_States&product=iphone
Expand the bottom "My iPhone is not eligible for warranty service. What are my service options?" option.