by bmcclure: Initial version, still has some issues with infinite AJAX loops and profile select conflicts.