Also this site does a good job covering the subject of slavery during Biblical times:
"First, we must recognize that the Bible does not say God supports slavery. In fact, the slavery described in the Old Testament was quite different from the kind of slavery we think of today - in which people are captured and sold as slaves. According to Old Testament law, anyone caught selling another person into slavery was to be executed:
"He who kidnaps a man, whether he sells him or he is found in his possession, shall surely be put to death." (Exodus 21:16)
So, obviously, slavery during Old Testament times was not what we commonly recognize as slavery, such as that practiced in the 17th century Americas, when Africans were captured and forcibly brought to work on plantations.
Unlike our modern government welfare programs, there was no safety-net for ancient Middle Easterners who could not provide a living for themselves. In ancient Israel, people who could not provide for themselves or their families sold them into slavery so they would not die of starvation or exposure. In this way, a person would receive food and housing in exchange for labor.
From the site: Does God approve Slavery According to the Bible?
http://www.godandscience.org/apologetics/slavery_bible.html