<?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">Outputs</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=outputs.py</xsl:attribute>
					</xsl:element>
				</xsl:if>
				<xsl:call-template name="common_imports"/>
				<script type="text/javascript" src="/javascript/outputs.js"/>
			</head>
			<body onload="init(); StartFloat();">
				<xsl:call-template name="initPage">
					<xsl:with-param name="pageName">outputs.py</xsl:with-param>
					<xsl:with-param name="message" select="$message"/>
				</xsl:call-template>
				<div id="displayresults">
					<form action="outputs.py" method="post" name="applyform">
						<input type="hidden" name="action" value="apply"/>
						<h1 class="display">Outputs</h1>
						<xsl:apply-templates/>
					</form>
				</div>
			</body>
		</html>
	</xsl:template>
	<xsl:template match="configuration/egress">
		<table class="outer">
			<tr>
				<td>
					<input type="radio" name="egress" value="asi" onclick="alterDisplay()">
						<xsl:if test="smpte310/output = 'Off'">
							<xsl:attribute name="checked">checked</xsl:attribute>
						</xsl:if>
					</input>
					<b>ASI</b>
				</td>
				<td>
					<input type="radio" name="egress" value="smpte" onclick="alterDisplay()">
						<xsl:if test="smpte310/output != 'Off'">
							<xsl:attribute name="checked">checked</xsl:attribute>
						</xsl:if>
					</input>
					<b>SMPTE - 310M</b>
				</td>
			</tr>
			<tr>
				<td>
					Audio Type:
				</td>
				<td>
					<select name="format" onchange="alterDisplay()">
						<xsl:call-template name="printOptions">
							<xsl:with-param name="optionName">audio_type</xsl:with-param>
							<xsl:with-param name="defaultValue" select="../audio/format"/>
						</xsl:call-template>
					</select>
				</td>
			</tr>
			<tbody id="asi">
				<tr>
					<td>
						Format:
					</td>
					<td>
						<select name="framing_mode" onchange="whichMR(this.form); alterDisplay()">
							<xsl:call-template name="printOptions">
								<xsl:with-param name="optionName">framing_mode</xsl:with-param>
								<xsl:with-param name="defaultValue" select="asi/framing_mode">/</xsl:with-param>
							</xsl:call-template>
						</select>
					</td>
				</tr>
				<tr>
					<td>
						Modulation Target:
						<font face="arial" size="-2">(reference only)</font>
					</td>
					<td>
						<select name="modulation_target" onchange="whichMR(this.form); alterDisplay()">
							<xsl:call-template name="printOptions">
								<xsl:with-param name="optionName">modulation_target</xsl:with-param>
								<xsl:with-param name="defaultValue" select="asi/modulation_target"/>
							</xsl:call-template>
						</select>
					</td>
				</tr>
				<tr>
					<td>
						Egress Clock Mode:
					</td>
					<td>
						<select name="clock_mode">
							<xsl:call-template name="printOptions">
								<xsl:with-param name="optionName">clock_mode</xsl:with-param>
								<xsl:with-param name="defaultValue" select="asi/clock_mode"/>
							</xsl:call-template>
						</select>
					</td>
				</tr>
				<tr>
					<td>
						Manual Rate:
					</td>
					<td style="font-weight: normal">
						<input name="manual_rate" type="text" value="{asi/egress_clock_rate}"/> bps
					</td>
				</tr>
			</tbody>
			<tbody id="qpsk">
				<tr>
					<td>
						QPSK Viterbi:
					</td>
					<td>
						<select name="qpsk_viterbi">
							<xsl:call-template name="printOptions">
								<xsl:with-param name="optionName">qpsk</xsl:with-param>
								<xsl:with-param name="defaultValue" select="asi/qpsk_viterbi"/>
							</xsl:call-template>
						</select>
					</td>
				</tr>
				<tr>
					<td>
						QPSK Symbol Rate:
						<font face="arial" size="-2">(read only)</font>
					</td>
					<td>
						<input name="qpsk_symbol_rate" type="text" value="{asi/qpsk_symbol_rate}" disabled="disabled"/>
					</td>
				</tr>
			</tbody>
			<tbody id="smpte">
				<tr>
					<td>
						Rate:
					</td>
					<td style="font-weight: normal">
						19,392,568.46 bps
					</td>
				</tr>
			</tbody>
		</table>
	</xsl:template>
	<xsl:template match="text()">
	</xsl:template>
</xsl:stylesheet>
