In many cases, there will not be a deficiency judgement, but there are exceptions. As more and more homes go into foreclosure, servicers and their investors are getting aggressive about securing deficiency judgements whenever possible by doing a judicial foreclosure rather than a foreclosure by advertisement. This is especially true when the lender has some indication that you have the ability to pay.
As Chris stated, a short sale may be an option...
But that too has its issues. You may want to consider the tax consequences as well. In some, but not all cases, the IRS will waive the taxes on the "forgiven" mortgage amount. But the Mortgage Debt Forgiveness will sunset at the end of the year. http://www.irs.gov/newsroom/article/0,,id=254930,00.html