"How to code cookies in another domain without IE prompting privacy alert?"
In my opinion, we should avoid implementing third-party cookies at all, as it violates privacy policy, if not implemented in the right way.
However, my friend replied with another thought-provoking query - "But why websites like Yahoo can plant third-party cookies for Double Click?"
True enough, Double Click's cookies are generally accepted by default browser privacy policies.
At this point, if you're still uninitiated about third-party cookies, you may find out further relevant information at Microsoft and Wikipedia.
As quoted from Wikipedia:
Advertising companies use third-party cookies to track a user across multiple sites. In particular, an advertising company can track a user across all pages where it has placed advertising images or web bugs. Knowledge of the pages visited by a user allows the advertisement company to target advertisement to the user's presumed preferences.
IE Blocks Third-Party Cookies That Do Not Comply With P3P
The default privacy control in IE6, which is set to Medium level, blocks third-party cookies that do not have a compact privacy policy.
In this case, the compact privacy policy refers to W3C's Platform for Privacy Preference (P3P).
Platform for Privacy PreferencesThe Platform for Privacy Preferences Project (P3P) enables Websites to express their privacy practices in a standard format that can be retrieved automatically and interpreted easily by user agents. P3P user agents will allow users to be informed of site practices (in both machine- and human-readable formats) and to automate decision-making based on these practices when appropriate. Thus users need not read the privacy policies at every site they visit.
So, in order to implement third-party cookies with compliance to default privacy policy, you have to attach P3P compact privacy policy to HTTP header.

You may refer to the following references for details on deployment of P3P privacy policy in HTTP headers.
- - AOL Webmaster - How to Implement P3P HTTP Headers
- DUX Computer Digest - P3P Compact Privacy Policy
- - Microsoft MSDN - How to Deploy P3P Privacy Policies on Your Web Site