/**
     * Displays a selection list for menu item types
     */
    public static function addMenuItem(&$cid, $menutype, $option, $types_content, $types_component, $types_link, $types_other, $types_submit)
    {
        mosCommonHTML::loadOverlib();
        ?>
		<style type="text/css">
		fieldset {
			border: 1px solid #777;
		}
		legend {
			font-weight: bold;
		}
		</style>

		<form action="index2.php" method="post" name="adminForm">
		<table class="adminheading">
		<tr>
			<th class="menus">
			New Menu Item
			</th>
			<td valign="bottom" nowrap="nowrap" style="color: red;">
			<?php 
        //echo _MENU_GROUP;
        ?>
			* Note that some menu types appear in more than one grouping, but they are still the same menu type.
			</td>
		</tr>
		</table>

		<table class="adminform">
		<tr>
			<td width="50%" valign="top">
				<fieldset>
					<legend>Content</legend>
					<table class="adminform">
					<?php 
        $k = 0;
        $count = count($types_content);
        for ($i = 0; $i < $count; $i++) {
            $row =& $types_content[$i];
            $link = 'index2.php?option=com_menus&menutype=' . $menutype . '&task=edit&type=' . $row->type . '&hidemainmenu=1';
            HTML_menusections::htmlOptions($row, $link, $k, $i);
            $k = 1 - $k;
        }
        ?>
					</table>
				</fieldset>
				<fieldset>
					<legend>Miscellaneous</legend>
					<table class="adminform">
					<?php 
        $k = 0;
        $count = count($types_other);
        for ($i = 0; $i < $count; $i++) {
            $row =& $types_other[$i];
            $link = 'index2.php?option=com_menus&menutype=' . $menutype . '&task=edit&type=' . $row->type . '&hidemainmenu=1';
            HTML_menusections::htmlOptions($row, $link, $k, $i);
            $k = 1 - $k;
        }
        ?>
					</table>
				</fieldset>
				<fieldset>
					<legend>Submit</legend>
					<table class="adminform">
					<?php 
        $k = 0;
        $count = count($types_submit);
        for ($i = 0; $i < $count; $i++) {
            $row =& $types_submit[$i];
            $link = 'index2.php?option=com_menus&menutype=' . $menutype . '&task=edit&type=' . $row->type . '&hidemainmenu=1';
            HTML_menusections::htmlOptions($row, $link, $k, $i);
            $k = 1 - $k;
        }
        ?>
					</table>
				</fieldset>
			</td>
			<td width="50%" valign="top">
				<fieldset>
					<legend>Components</legend>
					<table class="adminform">
					<?php 
        $k = 0;
        $count = count($types_component);
        for ($i = 0; $i < $count; $i++) {
            $row =& $types_component[$i];
            $link = 'index2.php?option=com_menus&menutype=' . $menutype . '&task=edit&type=' . $row->type . '&hidemainmenu=1';
            HTML_menusections::htmlOptions($row, $link, $k, $i);
            $k = 1 - $k;
        }
        ?>
					</table>
				</fieldset>
				<fieldset>
					<legend>Links</legend>
					<table class="adminform">
					<?php 
        $k = 0;
        $count = count($types_link);
        for ($i = 0; $i < $count; $i++) {
            $row =& $types_link[$i];
            $link = 'index2.php?option=com_menus&menutype=' . $menutype . '&task=edit&type=' . $row->type . '&hidemainmenu=1';
            HTML_menusections::htmlOptions($row, $link, $k, $i);
            $k = 1 - $k;
        }
        ?>
					</table>
				</fieldset>
			</td>
		</tr>
		</table>

		<input type="hidden" name="option" value="<?php 
        echo $option;
        ?>
" />
		<input type="hidden" name="menutype" value="<?php 
        echo $menutype;
        ?>
" />
		<input type="hidden" name="task" value="edit" />
		<input type="hidden" name="boxchecked" value="0" />
		<input type="hidden" name="hidemainmenu" value="0" />
		<input type="hidden" name="<?php 
        echo josSpoofValue();
        ?>
" value="1" />
		</form>
		<?php 
    }