Before I talk about the code I wanted to let you loose on it, so you could give it a good bashing. See if you can find a hole in the logic.
To setup your own hierarchy first create a team with no parent. Then create a team that has that team as its parent. Etc etc. To edit any team you'll need to login as Dext User/ROCKALL using the login link (top right).
The interface for adding parent teams isn't great, but it works for now. There are a few other bugs with it, depending on what browser you're using. Let me know what you make of the concept though and I'll work on making it fit for download.