The following passage taken directly from the link provided might help. The fact that the sexual gender is inherited by a simple XY-system is essentially correct, but a smplyfied way of explanation. It has been known for a long time now, that there are also a large number of autosomal genes with some effect on the defining of sexual gender. When these become accumulated to a neccessary amount, pointing towards a certain gender f.ex. female, the XY-system can be "suppressed" and a XY-individual can become a fully functional female. The other way around, autosomal genes can produce a fully functional XX-male of an XX-individual. Such a male mated with a normal female, produces 100% daughters. But a XY-female produces 25% daughters, 50% normal sons as well as 25% YY-males! These (fully functional and vital) YY-males produce only 100% male offspring, a fact that has rendered great interest among commercial breeders in Singapore.
In research laboratories there has even been produced a functional YY-female, which within a test-mating with an XX-male produced 100% male offspring. It was argumented, that such females would be a suitable match for matings with YY-males in order to produce enough amount of YY-males for commercial purposes ... There are since a long time well elaborated methods to force the whole batch to become either 100% female or 100% male, through feeding gravid females with either oestrogen-enhanced or testosterone-enhanced food. But genetically seen, these batches are still a blend of XY-individuals and XX-individuals.
Here is the link http://hem.passagen.se/mikeno/english/texter/esge.htm