By design, the iphone will sync itunes content with one computer at a time. Any attempt to sync such content with a second computer will result in ALL itunes content being first erased from your phone & then replaced with the content from the second computer. This is a design feature and cannot be overridden. Because you re replacing your computer, your phone will see this computer as a "new" computer. The itunes content sync is one way: computer to phone. If you have photos that were synced to your phone or music ripped on your own that were not backed up, you will first have to extract them from your phone using third party software, before you do anything else, as Apple makes no provision to do so:
http://www.wideanglesoftware.com/touchcopy/index.php
Once you've done that, do the following in the order specified:
1. Disable auto sync when an iPod/iPhone is connected under Preferences>Devices in itunes(under the edit menu if using Windows).
2. Make sure you have one contact & one event in the supported applications(Outlook, Windows Address Book) on your computer. These entries can be fake, doesn't matter, the important point is that these programs not be empty.
3. Connect your phone, iTunes running, do not sync at this point.
4. Store>Authorize this computer.
5. File>Transfer Purchases(To make sure all purchased content on your phone will be in your itunes library).
6. Right click in the device pane & select reset warnings.
7. Right click again and select backup.
8. Right click again & select restore from backup, select the backup you just made. When prompted to create another backup, decline.
9. This MUST be followed by a sync to restore your itunes content, which you select from the various tabs, You'll get a popup regarding your contacts & calendars asking to merge or replace, select merge.
You should be good to go.