The following is at the IRS site. Check out that publication on allocating moving expenses.
[QUOTE]
Allocation Of Moving Expenses
When your new place of work is in a foreign country, your moving expenses are directly connected with the income earned in that foreign country. If all or part of the income that you earn at the new location is excluded under the foreign earned income exclusion or the housing exclusion, the part of your moving expense that is allocable to the excluded income is not deductible.
If your new place of work is in the United States, the deductible moving expenses are directly connected with the income earned in the United States. If you treat a reimbursement from your employer as foreign earned income, you must allocate deductible moving expenses to foreign earned income.
For an explanation and example of how the allocation is done, refer to Moving Expenses in Publication 54, Tax Guide for U.S. Citizens and Resident Aliens Abroad.
http://www.irs.gov/publications/p54/index.html