You need to have access to your music files and iTunes on your old computer. You need to de-authorise your old computer and authorise your new one. I managed by having all my music transferred from my old computer to my new computer then re-selecting it all in iTunes to be re-synced to my iPhone. This is the same with video and apps. Or you can try it this way:
http://support.apple.com/kb/ht1329