function loadSubpanel($module_name, $child_module)
    {
        $this->parent_module = $module_name;
        $this->child_module = $child_module;
        global $beanList, $beanFiles;
        $class = $beanList[$module_name];
        require_once $beanFiles[$class];
        require_once 'include/SubPanel/SubPanelDefinitions.php';
        $mod = new $class();
        $spd = new SubPanelDefinitions($mod);
        $spd->open_layout_defs(true);
        $panel = $spd->load_subpanel($child_module, true);
        $this->panel = $panel;
        $subpanel = new SubPanel($module_name, 'fab4', $child_module, $panel);
        $subpanel->setTemplateFile('include/SubPanel/SubPanelDynamic.html');
        $oldcontents = ob_get_contents();
        ob_clean();
        $subpanel->display();
        $this->curText = ob_get_contents();
        ob_clean();
        echo $oldcontents;
        $this->subpanel = $subpanel;
        $this->form = <<<EOQ
\t\t</form>
\t\t<form name='studio' method='POST'>
\t\t\t<input type='hidden' name='action' value='saveSubpanel'>
\t\t\t<input type='hidden' name='module' value='Studio'>
\t\t\t<input type='hidden' name='subpanel' value='{$child_module}'>
EOQ;
    }
 function set_subpanel($module_name, $child_module)
 {
     $this->parent_module = $module_name;
     $this->child_module = $child_module;
     global $beanList, $beanFiles;
     $class = $beanList[$module_name];
     require_once $beanFiles[$class];
     require_once 'include/SubPanel/SubPanelDefinitions.php';
     $mod = new $class();
     $spd = new SubPanelDefinitions($mod);
     $spd->open_layout_defs(true);
     $panel = $spd->load_subpanel($child_module, true);
     $this->panel = $panel;
     $subpanel = new SubPanel($module_name, 'fab4', $child_module, $panel);
     $subpanel->setTemplateFile('include/SubPanel/SubPanelDynamic.html');
     ob_flush();
     ob_clean();
     $subpanel->display();
     $this->contents = ob_get_contents();
     ob_clean();
     $this->subpanel = $subpanel;
 }