<table width="100%" cellpadding="5" cellspacing="0" border="0">
	<tr><td class="nav"><a href="index.php?section=home">Home</a>&nbsp;&gt;&nbsp;<a href="index.php?section=menus&theme=<?php echo $data["theme"] ?>">Menus</a></td></tr>
	<tr><td>
	<table cellpadding="0" cellspacing=3" border="0" align="center">
		<form action='index.php' method='post'>
		<input type='hidden' name='section' value='menus'>
			<tr>
				<td class="body">Select Theme:</td>
				<td><?php
				$options = $data["themes"];
				admin_form_element( array ("type" => "select", "name" => "theme", "options" => $options, "value" => $data["theme"]) );
				?></td>
			<td align="center" colspan="2"><?php
			admin_form_element( array ("type" => "button", "value" => "Load") );
			?></td></tr>
		</form>	
	</table>
	</td></tr>
	<tr><td>
	<table width="100%" cellpadding="0" cellspacing="0" border="0">		
	<tr><td>
		<table align="center" cellpadding="2" cellspacing="2" border="0" width="400">
		<tr><td colspan="4" class="lined blue_bcg white_body padded" align="center">Page Groups</td></tr>
		<tr><td colspan="4" class="form_cell" align="center"><?php
		admin_form_element( array ("type" => "button", "value" => "Create New Group", "link" => "index.php?section=menus&action=edit_group&theme=".$data["theme"]) );
		?></td></tr>
		<tr>
			<td class="list_header" align="center">Group Name</td>			
			<td class="list_header" align="center" colspan="2">Pages</td>
			<td class="list_header" align="center">Action</td>
		</tr>
		<?php
			foreach($data["groups"] as $group){
			?>
			<tr>				
				<td class="list_cell"><?php echo $group["name"]; ?></td>				
				<td class="list_cell" align="center" colspan="2"><?php echo $group["pages"]; ?></td>				
				<td class="list_cell" align="center"><?php					
					admin_output_image("buttons/but_edit_small.gif", $group["edit"], 0, "edit");
					admin_output_image("buttons/but_delete_small.gif", $group["delete"], 0, "delete");
				?></td>
			</tr>
			<?php
			}//foreach
		?>
		<tr><td colspan="4" class="lined blue_bcg white_body padded" align="center">Menus</td></tr>
		<tr><td colspan="4" align="center" class="form_cell">
			<table cellpadding="0" cellspacing="3" border="0" align="center">
			<form action="index.php" method="post">
			<input type="hidden" name="section" value="menus">
			<input type="hidden" name="action" value="create_menu">
			<input type="hidden" name="theme" value="<?php echo $data["theme"]; ?>">
				<tr>
					<td class="highlight">Name:</td>
					<td class="highlight"><?php
					admin_form_element( array ("type" => "input", "size" => 10, "name" => "name") );
					?></td>
				</tr>
				<tr>
					<td class="highlight">Number of items:</td>
					<td class="highlight"><?php
					admin_form_element( array ("type" => "input", "size" => 10, "name" => "items") );
					?></td>
				</tr>
				<tr>
					<td colspan="2" align="center"><?php
					admin_form_element( array ("type" => "button", "value" => "Create New Menu") );
					?></td>
				</tr>
			</form>
			</table>
		</td></tr>
		<tr>
			<td class="list_header" align="center">Menu Name</td>
			<td class="list_header" align="center">Menu Type</td>
			<td class="list_header" align="center">Items</td>
			<td class="list_header" align="center">Action</td>
		</tr>
		<?php
			foreach($data["menus"] as $menu){
			?>
			<tr>				
				<td class="list_cell"><?php echo $menu["name"]; ?></td>
				<td class="list_cell" align="center"><?php echo $menu["type"]; ?></td>
				<td class="list_cell" align="center"><?php echo $menu["items"]; ?></td>				
				<td class="list_cell" align="center"><?php					
					admin_output_image("buttons/but_edit_small.gif", $menu["edit"], 0, "edit");
					admin_output_image("buttons/but_delete_small.gif", $menu["delete"], 0, "delete");
				?></td>
			</tr>
			<?php
			}//foreach
		?>
		</table>
	</td></tr>
	</table>
	</td></tr>
</table>