</p>

      <div id="menu_options" style="display:none">
        <?php 
echo smarty_function_pages_dropdown(array('menu_type' => 'admin', 'name_id' => "page_identifier_%%X%%", 'is_building_menu' => true), $this);
?>

      </div>

      <div id="form_dropdown_template" style="display:none">
        <?php 
echo smarty_function_forms_dropdown(array('name_id' => "custom_options_%%X%%", 'style' => "width:155px"), $this);
?>

      </div>

      <div id="client_dropdown_template" style="display:none">
        <?php 
echo smarty_function_clients_dropdown(array('name_id' => "custom_options_%%X%%", 'style' => "width:150px"), $this);
?>

      </div>

      <p>
        <input type="submit" name="update_admin_menu" value="<?php 
echo $this->_tpl_vars['LANG']['word_update'];
?>
" />
      </p>
    </form>
              </td>
              <td align="center" valign="middle" width="100">
                <input type="button" value="<?php 
echo $this->_tpl_vars['LANG']['word_add_uc_rightarrow'];
?>
"
                  onclick="ft.move_options(this.form['available_client_ids[]'], this.form['selected_client_ids[]']);" /><br />
                <input type="button" value="<?php 
echo $this->_tpl_vars['LANG']['word_remove_uc_leftarrow'];
?>
"
                  onclick="ft.move_options(this.form['selected_client_ids[]'], this.form['available_client_ids[]']);" />
              </td>
              <td>
                <?php 
echo smarty_function_clients_dropdown(array('name_id' => "selected_client_ids[]", 'multiple' => 'true', 'multiple_action' => 'show', 'clients' => $this->_tpl_vars['selected_client_ids'], 'size' => '4', 'style' => "width: 220px"), $this);
?>

              </td>
            </tr>
            </table>
          </div>

        </td>
      </tr>
      </table>

      <?php 
if ($this->_tpl_vars['submission_type'] == 'direct') {
    ?>
        <p>
</span>
                      <?php 
                    } elseif ($this->_tpl_vars['view']['access_type'] == 'public') {
                        ?>
                        <?php 
                        if (count($this->_tpl_vars['view']['client_omit_list']) == 0) {
                            ?>
                          <span class="pad_left_small blue"><?php 
                            echo $this->_tpl_vars['LANG']['phrase_all_clients'];
                            ?>
</span>
                        <?php 
                        } else {
                            ?>
                          <?php 
                            echo smarty_function_clients_dropdown(array('name_id' => "", 'only_show_clients' => $this->_tpl_vars['view']['client_omit_list'], 'include_blank_option' => true, 'blank_option' => $this->_tpl_vars['LANG']['phrase_all_clients_except_c']), $this);
                            ?>

                        <?php 
                        }
                        ?>
                      <?php 
                    } elseif ($this->_tpl_vars['view']['access_type'] == 'hidden') {
                        ?>
                        <span class="pad_left_small light_grey italic"><?php 
                        echo $this->_tpl_vars['LANG']['word_none'];
                        ?>
 - <?php 
                        echo $this->_tpl_vars['LANG']['word_hidden'];
                        ?>
</span>
</a>
      </p>

      <div id="menu_options" class="hidden">
        <?php 
echo smarty_function_pages_dropdown(array('menu_type' => 'admin', 'name_id' => "page_identifier_%%X%%", 'is_building_menu' => true, 'class' => 'page_type'), $this);
?>

      </div>

      <div id="form_dropdown_template" class="hidden">
        <?php 
echo smarty_function_forms_dropdown(array('name_id' => "custom_options_%%X%%", 'include_blank_option' => true, 'blank_option_is_optgroup' => true), $this);
?>

      </div>

      <div id="client_dropdown_template" class="hidden">
        <?php 
echo smarty_function_clients_dropdown(array('name_id' => "custom_options_%%X%%", 'include_blank_option' => true, 'blank_option_is_optgroup' => true), $this);
?>

      </div>

      <p>
        <input type="submit" name="update_admin_menu" value="<?php 
echo $this->_tpl_vars['LANG']['word_update'];
?>
" />
      </p>
    </form>
              <?php 
                } elseif ($this->_tpl_vars['form_info']['access_type'] == 'public') {
                    ?>

                <?php 
                    if (count($this->_tpl_vars['form_info']['client_omit_list']) == 0) {
                        ?>
                  <span class="pad_left_small blue"><?php 
                        echo $this->_tpl_vars['LANG']['phrase_all_clients'];
                        ?>
</span>
                <?php 
                    } else {
                        ?>
                  <?php 
                        echo smarty_function_clients_dropdown(array('only_show_clients' => $this->_tpl_vars['form_info']['client_omit_list'], 'display_single_client_as_text' => true, 'include_blank_option' => true, 'blank_option' => "All clients, except:", 'force_show_blank_option' => true), $this);
                        ?>

                <?php 
                    }
                    ?>

              <?php 
                } else {
                    ?>

                <?php 
                    if (count($this->_tpl_vars['clients']) == 0) {
                        ?>
                  <span class="pad_left_small light_grey"><?php 
                        echo $this->_tpl_vars['LANG']['phrase_no_clients'];
                } elseif ($this->_tpl_vars['form_info']['access_type'] == 'public') {
                    ?>

                <?php 
                    if (count($this->_tpl_vars['form_info']['client_omit_list']) == 0) {
                        ?>
                  <span class="pad_left_small blue"><?php 
                        echo $this->_tpl_vars['LANG']['phrase_all_clients'];
                        ?>
</span>
                <?php 
                    } else {
                        ?>
                  <span class="pad_left_small blue">All clients, except: </span>
                  <?php 
                        echo smarty_function_clients_dropdown(array('only_show_clients' => $this->_tpl_vars['form_info']['client_omit_list'], 'display_single_client_as_text' => true), $this);
                        ?>

                <?php 
                    }
                    ?>

              <?php 
                } else {
                    ?>

                <?php 
                    if (count($this->_tpl_vars['clients']) == 0) {
                        ?>
                  <span class="pad_left_small light_grey"><?php 
                        echo $this->_tpl_vars['LANG']['phrase_no_clients'];