<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
	<xsl:output method="xml" indent="yes" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"/>
	<xsl:param name="message"/>
	<xsl:param name="pageTitle">MPE</xsl:param>
	<xsl:include href="namedtemplates.xsl"/>
	<xsl:template match="/">
		<html>
			<head>
				<title>
					<xsl:value-of select="$web_title"/>
				</title>
				<xsl:if test="configuration/user_data/auto_logout_time != 0">
					<xsl:element name="meta">
						<xsl:attribute name="http-equiv">refresh</xsl:attribute>
						<xsl:attribute name="content"><xsl:value-of select="(configuration/user_data/auto_logout_time * 60)+ 5"/>;URL=advmpe.py</xsl:attribute>
					</xsl:element>
				</xsl:if>
				<xsl:call-template name="common_imports"/>
				<script src="/javascript/selectbox.js" type="text/javascript"/>
				<script src="/javascript/update.js" type="text/javascript"/>
			</head>
			<body onload="StartFloat();">
				<xsl:call-template name="initPage">
					<xsl:with-param name="pageName">advmpe.py</xsl:with-param>
					<xsl:with-param name="message" select="$message"/>
				</xsl:call-template>
				<div id="displayresults">
					<form action="advmpe.py" method="post" name="applyform">
						<input type="hidden" name="action" value="apply"/>
						<h1 class="display">MPE</h1>
						<xsl:apply-templates/>
					</form>
				</div>
			</body>
		</html>
	</xsl:template>
	<xsl:template match="configuration/mpe">
		<!-- beginning of view route span -->
		<!--span id="view_span" style="visibility:visible;position:absolute;">
			<div id="row">
				<div id="headerroutecell">Route</div>
				<div id="headerroutecell">Name</div>
				<div id="headerroutecell">IP Address</div>
				<div id="headerroutecell">PID</div>
			</div>
			<xsl:for-each select="current_routes/route">
				<xsl:variable name="index" select="@index"/>
				<div id="row">
					<div id="routecell">
						<xsl:value-of select="@index"/>
					</div>
					<div id="routecell">
						<xsl:value-of select="name"/>
					</div>
					<div id="routecell">
						<xsl:value-of select="inet_addr"/>
					</div>
					<div id="routecell">
						<xsl:value-of select="pid"/>
					</div>
				</div>
			</xsl:for-each>
		</span-->
		<!-- end of view route span -->
		<!-- beginning of delete route span -->
		<span id="delete_span" style="visibility:hidden;position:absolute;">

		</span>
		<!-- end of delete route span -->
		<!-- beginning of add route span -->
		<span id="add_span" style="visibility:hidden;position:absolute;">
				
				</span>
		<!-- end of add route span -->
		<!-- beginning of modify route span -->
		<div id="modify_span" class="mpe_display" style="visibility:visible;">
			<div class="row">
				<div class="largegeneralcell">
					<select name="mySelect" size="15" multiple="multiple" style="width:190px;" onchange="updateForm(this.form,4)">
						<xsl:for-each select="current_routes/route">
							<xsl:element name="option">
								<xsl:attribute name="value"><xsl:text>index:</xsl:text><xsl:value-of select="@index"/>,<xsl:text/><xsl:text>mode:</xsl:text><xsl:value-of select="mode"/>,<xsl:text/><xsl:text>max:</xsl:text><xsl:value-of select="max_rate"/>,<xsl:text/><xsl:text>name:</xsl:text><xsl:value-of select="name"/>,<xsl:text/><xsl:text>addr:</xsl:text><xsl:value-of select="inet_addr"/>,<xsl:text/><xsl:text>port:</xsl:text><xsl:value-of select="inet_port"/>,<xsl:text/><xsl:text>pid:</xsl:text><xsl:value-of select="pid"/>,<xsl:text/><xsl:text>enabled:</xsl:text><xsl:value-of select="enabled"/>,<xsl:text/></xsl:attribute>
								<xsl:value-of select="@index"/> - <xsl:value-of select="name"/>
							</xsl:element>
						</xsl:for-each>
					</select>
				</div>
				<div class="generalcell">
					<table>
						<tr class="mperow">
							<td class="generalcell">Route</td>
							<td class="generalcell">
								<select name="route_index" style="width:50px">
									<option value=""/>
									<option value="1">1</option>
									<option value="2">2</option>
									<option value="3">3</option>
									<option value="4">4</option>
									<option value="5">5</option>
									<option value="6">6</option>
									<option value="7">7</option>
									<option value="8">8</option>
									<option value="9">9</option>
									<option value="10">10</option>
									<option value="11">11</option>
									<option value="12">12</option>
									<option value="13">13</option>
									<option value="14">14</option>
									<option value="15">15</option>
									<option value="16">16</option>
									<option value="17">17</option>
									<option value="18">18</option>
									<option value="19">19</option>
									<option value="20">20</option>
									<option value="21">21</option>
									<option value="22">22</option>
									<option value="23">23</option>
									<option value="24">24</option>
									<option value="25">25</option>
									<option value="26">26</option>
									<option value="27">27</option>
									<option value="28">28</option>
									<option value="29">29</option>
									<option value="30">30</option>
									<option value="31">31</option>
									<option value="32">32</option>
								</select>
							</td>
						</tr>
						<tr class="mperow">
							<td class="generalcell">Name</td>
							<td class="generalcell">
								<input type="text" name="name"/>
							</td>
						</tr>
						<tr class="mperow">
							<td class="generalcell" nowrap="nowrap">IP Address</td>
							<td class="generalcell">
								<input type="text" name="inet_addr"/>
							</td>
						</tr>
						<!--tr class="mperow">
						<td class="generalcell">IP Port</td>
						<td class="generalcell">
							<input type="text" name="inet_port"/>
						</td>
					</tr-->
						<tr class="mperow">
							<td class="generalcell">PID</td>
							<td class="generalcell">
								<input type="text" name="pid"/>
							</td>
						</tr>
						<tr class="mperow">
							<td class="generalcell">Max Rate</td>
							<td class="generalcell">
								<input type="text" name="max_rate"/>
							</td>
						</tr>
						<tr class="mperow">
							<td class="generalcell">Enabled</td>
							<td class="generalcell">
								<select name="enabled" style="width:50px">
									<option value=""/>
									<option value="yes">Yes</option>
									<option value="no">No</option>
								</select>
							</td>
						</tr>
						<!--tr class="mperow">
						<td class="generalcell">
							<input type="image" name="add" src="../images/addroute.gif" width="90" height="29" align="middle" border="0" onclick="addRoute(this.form); return false;"/>
							<input type="image" name="modify" src="../images/modifyroute.gif" width="90" height="29" align="middle" border="0" onclick="modifyRoute(this.form);return false;"/>
							<input type="image" name="delete" src="../images/deleteroute.gif" width="90" height="29" align="middle" border="0" onclick="removeSelectedOptions(this.form.mySelect); clearText(this.form); return false;"/>
						</td>
					</tr-->
					</table>
				</div>
			</div>
		</div>
		<!-- end of modify route span -->
	</xsl:template>
	<xsl:template match="text()">
	</xsl:template>
</xsl:stylesheet>
