It might be helpful for you to identify. State laws vary about whether or not a lender can pursue a deficiency judgement.
CJ is correct is suggesting that you look at your mortgage docs. However, even if the mortgage docs say ":x", but it is not permissible by law in your state, the state law will prevail.
So, it depends upon the state laws for the location of the property and loan, and the terms of the loan. Even if a lender has the ability to collect a deficiency, there still needs to be a judgement defining the deficiency amount.
If you can identify your loan and property location, perhaps some RE Pros from the area can provide additional info.
Look at your original loan (and if you have a second) to see whether or not it is a recourse or non-recourse loan. http://en.wikipedia.org/wiki/Nonrecourse_debt
I am not an attorney and would highly recommend you consult with a real estate attorney and or tax attorney to understand all the ramifications of a foreclosure.