Your sales price - (cost basis - depreciation) = gain
(as previously mentioned) in a 1031 you have to reinvest entire proceeds of sales price to avoid 'boot', of which you will be taxed on. You are not able to just reinvest the gain...(darn). You can still shelter some gains, as long as you exceed your cost basis.
I'm downsizing as well, but at the current >LOW< LTCG rates I have chosen to pay taxes on the previous 1031's I'm selling, .. until they raise the LTCG rate back to 28%++ (2011). I'm trying to complete all sales by the end of 2008, just in case the new leadership raises the LTCG rates.
I like to get 1031 info here
http://www.1031help.com/
they used to have a 1031 'university' at this site but was too much to maintain. All the info is still there, and I've used them for several exchanges.