Lari, from my understanding, boys dont produce testosterone until the testes have been produced. From my limited biology, I think what determines the sex of a child is whether the X or the Y gene from the father or the mother dominates. If the maternal gene dominates, then the child will be a girl, if the male gene dominates then the child will be a boy.
Matt - you're probably right about boys not producing testosterone until the testes have been produced. But in this case, in the womb, the testosterone surge isn't produced by the testes. I'm not sure if its the mother or the placenta or some other part of the developing foetus, but that surge is basically triggered by the fact that the Y gene is present. It is possible (rare, but possible) for someone to be XY or XX genetically but to have the apparent gender of the opposite. For example, with an XY foetus, the testosterone surge doesn't happen, so the child develops as a girl, or an XX foetus, the testosterone surge mistakenly happens, or something similar happens, and the child develops as a boy. Its also possible (again, rare) for someone to be XXY. If i remember correctly there was a case a few years ago where a woman competing in a sport was subsequently discovered (and even she didn't know) to be genetically male, and of course, there's the recent hoo-ha with that other female athlete...
And then, there's the whole thing of being transgendered, which is still not really understood, something to do with the brain, and then there's the intersex - those who have the genital attributes of both genders (and some tragic mistakes were made in the past where a baby was born intersex, had surgery to make them one gender, but the brain turned out to want the opposite gender so had to go through surgery all over again to make them the proper gender). The whole issue of gender really isn't as simple as many people think it is.
lari
xx