Is homosexuality an important factor in determining custody?

This very much depends on the laws in your state (and biases among the judges). Some states treat gay or straight lifestyles in the same light. In other words, being homosexual does not automatically deny you child custody. Rather, the courts apply the same criteria, just as with an heterosexual parent -- how well the parent can meet the needs of the child involved and in "the best interests of the child". If the gay parent measures best, then proper custody could be awarded.

Other states see it differently. A parent’s sexual orientation carries significant weight on the judicial scales, and homosexuality is viewed as being detrimental and unhealthy and "not in the best interests" of a child.

If you are caught in a custody battle, expert witnesses – psychiatrists, psychologists – may be a source of help in the courtroom. Credentialed professionals in their respective fields can give the judge an opinion as to who will better meet the needs of the children). Often, this means home evaluations and psychological evaluations about the fitness of a parent, the stability of the home environment, and the child’s emotional ties to each. See http://expertpages.com for a listing of expert witnesses.