I posted it a few messages back, but I didn't know if the new posters on this topic read it, so here it is again.
Ann N Y Acad Sci. 2003 Jun;989:105-17
The etiology of anomalous sexual preferences in men.
Quinsey VL.
Psychology Department, Queen's University, Kingston, Ontario, K7L 3N6, Canada. quinseypsyc.queensu.ca
People discover rather than choose their sexual interests. The process of discovery typically begins before the onset of puberty and is associated with an increase in the secretion of sex hormones from the adrenal glands. However, the determinants of the direction of sexual interest, in the sense of preferences for the same or opposite sex, are earlier. These preferences, although not manifest until much later in development, appear to be caused by the neural organizational effects of intrauterine hormonal events. Variations in these hormonal events likely have several causes and two of these appear to have been identified for males. One cause is genetic and the other involves the sensitization of the maternal immune system to some aspect of the male fetus. It is presently unclear how these two causes relate to each other. The most important question for future research is whether preferences for particular-aged partners and parts of the male courtship sequence share causes similar to those of erotic gender orientation.