I have not seen a rule covering this issue, but I see no reason why both could not be in control at the same time with the most recent 'command' being the dominant command.
I also remember it being an opposed charisma check. It does not appear to be in the SRD but I beleive it is in the DMG but I dont have that with me atm so I dont have a page # handy.
I've had it come up a couple times back in the 2nd edition days - I used an opposed Charisma check. These days I might use an opposed caster level check. A good argument can be made for leaving charisma out of the equation, since it's really a "power of magic" sort of thing.
Of course, some spells trump each other - Dominate will always overcome Charm Person, in my view.
"If a creature is under the mental control of two or more creatures, it tends to obey each to the best of its ability (and to the extent of the control each effect allows). If the controlled creatures receives conflicting orders simultaneously, the competing controllers must make opposed Charisma checks to determine which one the creature obeys."