
<div id="start_menu" style="display:none;max-width:100%;overflow:scroll;background-color:<%= $config->{$device}->{'start_menu'}->{'background_colour'} || 'yellow' %>;">
	<span style="float:left;">
		<img style="vertical-align:bottom;" class="little_thumb permission_asker hover" src="/images/make believe/good.png">
		<% foreach my $b ( qw/run up/ ) { %>
			<button class="start_menu_menu hover <% if ($menu eq $b) { %>selected<% } %>" menu="<%= $b %>"><%= &subs::format_name($b) %></button>
		<% } %>

		<!--

			<a target="_blank" class="take_on_me" href="https://<%= $c->req->url->base->host . ':' . $ENV{'PORT_AHOY'} %>/"><img class="jonathan" src="<%= $gb::known_appts->{'guest'}->{'icon'} %>"></a>
			<a target="_blank" class="take_on_me" href="https://<%= $c->req->url->base->host . ':' . $ENV{'PORT_AHOY'} %>/manager"><img class="jonathan" src="<%= $gb::known_appts->{'citizen'}->{'icon'} %>"></a>
			<a target="_blank" class="take_on_me" href="https://<%= $c->req->url->base->host . ':' . $ENV{'PORT_AHOY'} %>/store"><img class="jonathan" src="<%= $gb::known_appts->{'resident'}->{'icon'} %>"></a>
		-->
	</span>
	<span style="float:right;">
		<img id="main_logo" class="jonathan little_thumb configuration"  src="/images/decipherable/wrench.png"></img>
	</span>
	<% if ($menu eq 'apps') { %>
		<!--
		<img src="/images/make believe/eye.png" id="browser_toggle" style="border-color: yellow" class="little_thumb jonathan"></img>
		-->
		<div id="parking_lot" style="position:absolute;width:100%;bottom:0px;">
			<% foreach my $pl ( sort keys %{$parking_lot} ) { %>
				<span class="past_life" direction="load" start_menu="yes" timestamp="<%= $parking_lot->{$pl}->{'timestamp'} %>"><b><%= &subs::format_name($pl) %></b></span>
			<% } %>
		</div>


	<% } elsif ($menu eq 'run' || $menu eq 'up') { %>
		<div id="start_apps"></div>
		<div id="running_start">
			<table style="overflow:scroll;width:100%;text-align:left;">
				<thead>
					<th></th><th>App</th><th>Time</th>
				</thead>
				<tbody>
					<% my $query; 
						if ($menu eq 'run') {
						$query = &subs::db_query('select * from appointments where (type=? or type=?) and timestamp <= ? order by timestamp desc', 'start','record', &subs::rightNow())->hashes
					} else { 
						$query = &subs::db_query('select * from appointments where timestamp >= ? order by timestamp asc limit 10', &subs::rightNow())->hashes
					} %>
					<% foreach my $app ( @{$query} ) { %>
						<% my @title = split '', &subs::format_name($app->{'app'}); %>
						<tr>
							<td><%== &subs::main_icon_maker({ app => $app->{'app'}, timestamp => &subs::rightNow(), size => 'little' }) %></td>
							<td>
								<span class="start_menu_list hover" onClick="appointmentGrabber('<%= $app->{'app'} %>','<%= &subs::rightNow() %>')">
									<% foreach my $t ( @title ) { %>
										<% my $style; %>
										<% if ($t eq ' ') { $t = 'blank'; $style= "opacity:0;" } elsif ($t eq '.') { $t = 'dot'; } else {  } %>
										<% if ($t =~ /[A-Z]/) { %>
											<img src="/icons/uppercase/<%= $t %>.png" style="height:24px;<%= $style %>">
										<% } else { %>
											<img src="/icons/lettering/<%= $t %>.png" style="height:24px;<%= $style %>">
										<% } %>
									<% } %>
								</span>
							</td>
							<td class="time" timestamp="<%= $app->{'timestamp'} %>"></td>
						</tr>
					<% } %>
				</tbody>
			</table>
		</div>
	<% } %>
</div>