This is a rather complicated question, and I'll answer it in two ways:
The Short Answer.
The Longer Answer.