From my understanding, an individual can withdraw up to $10,000 from a traditional IRA w/o paying the 10% penalty to make their "first" home purchase. You can also withdraw up to $10,000 from a Roth IRA's earnings w/o paying the 10% penalty.
So for example, if I had 2 traditional IRA accounts with over $10,000 in each and a Roth IRA with over $10,000 in earnings, could I withdraw $10,000 from each traditional IRA account and my Roth IRA's contributions + $10,000 in my Roth IRA's earnings?
Nope. It's $10K allowable for IRA contributions. Period. It doesn't matter how many accounts it comes from.
Look at it this way: if the contribution limit for IRAs is $5K for all accounts combined, why would they make the rule different for money going out from the rule for money going in?
Anyway, RIRAs are a different kind of animal. You can get your contributions out anyway regardless of the reason but as for the earnings, it has to be in the account for 5 years or it's taxable.
And don't forget that you have to buy your home within 120 days of withdrawing it or your withdrawal is basically disqualified from being a first time home buyer exemption.
It's kind of hard to tease all that info out from IRS Publication 590 so I did some looking around and I think that Bankrate's http://www.bankrate.com/finance/money-guides/irs-rules-for-early-ira-withdrawals-1.aspx
does the best job of summarizing what you need to know.