Deuteronomy 25: 5-6: 5. If brothers dwell together, and one of them dies and has no son, the widow of the dead man shall not be married to a stranger outside the family; her husband's brother shall go into her, take her as his wife, and dwell with her. 6. Then it shall be, the firstborn son she bears shall be named by the name of his dead brother, that his name may not be blotted out of Israel.+
(+25:5, 6: This law explains how Joseph (the foster father of Jesus) could have two fathers, as recorded in the two genealogies of Jesus. In Luke's record of the genealogy, Joseph's father was Heli (Lk 3:23-38). Heli was his legal father, for he died childless. Jacob, his brother by the same mother, raised up seed for him. This seed was Joseph, according to Matthew's genealogy (Mt. 1:1-16). Thus, Jacob was Joseph's natural father (JohnDm).)
Right, so I'm not going to type out the genealogies, because, well. They're long, and I am being lazy. However, I found this interesting and thought I'd put it out there. What'd ya'll think? Make sense?
Also, as to the question of *why* include genealogies of Joseph since Christ was not his biological son, but rather, adopted. It's my understanding that Joseph, being a righteous man, would have married within his own tribe. Thus, Mary would have shared many of the same ancestors - she was also descended from David, but the genealogies of the time were traced through the men, not the women.