function spa_render_usergroups_panel($formid)
{
    ?>
	<div class="clearboth"></div>

	<div class="wrap sfatag">
		<?php 
    spa_render_sidemenu();
    ?>
		<div id='sfmsgspot'></div>
		<div id="sfmaincontainer">
			<?php 
    spa_render_usergroups_container($formid);
    ?>
		</div>
			<div class="clearboth"></div>
	</div>
<?php 
}
}
include_once SF_PLUGIN_DIR . '/admin/panel-usergroups/spa-usergroups-display.php';
include_once SF_PLUGIN_DIR . '/admin/panel-usergroups/support/spa-usergroups-prepare.php';
include_once SF_PLUGIN_DIR . '/admin/panel-usergroups/support/spa-usergroups-save.php';
include_once SF_PLUGIN_DIR . '/admin/library/spa-tab-support.php';
global $adminhelpfile;
$adminhelpfile = 'admin-usergroups';
# --------------------------------------------------------------------
# ----------------------------------
# Check Whether User Can Manage User Groups
if (!sp_current_user_can('SPF Manage User Groups')) {
    spa_etext('Access denied - you do not have permission');
    die;
}
if (isset($_GET['loadform'])) {
    spa_render_usergroups_container($_GET['loadform']);
    die;
}
if (isset($_GET['saveform'])) {
    if ($_GET['saveform'] == 'newusergroup') {
        echo spa_save_usergroups_new_usergroup();
        die;
    }
    if ($_GET['saveform'] == 'editusergroup') {
        echo spa_save_usergroups_edit_usergroup();
        die;
    }
    if ($_GET['saveform'] == 'delusergroup') {
        echo spa_save_usergroups_delete_usergroup();
        die;
    }