<?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:include href="namedtemplates.xsl"/>
	<xsl:template match="/">
		<html>
			<head>
				<title><xsl:value-of select="$web_title"/></title>
				<xsl:call-template name="common_imports"/>
			    <script language="JavaScript" type="text/javascript">
<xsl:comment> Begin
function toggle(_s,_h) {
  if (_s == 'one_span') 
    {
      document.getElementById('one_span').style.visibility='visible';
      document.getElementById('two_span').style.visibility='hidden';
      document.getElementById('three_span').style.visibility='hidden';
      document.getElementById('four_span').style.visibility='hidden';
      document.getElementById('five_span').style.visibility='hidden';
    }
  else if (_s == 'two_span')
    {
      document.getElementById('one_span').style.visibility='hidden';
      document.getElementById('two_span').style.visibility='visible';
      document.getElementById('three_span').style.visibility='hidden';
      document.getElementById('four_span').style.visibility='hidden';
      document.getElementById('five_span').style.visibility='hidden';
    }
  else if (_s == 'three_span')
    {
      document.getElementById('one_span').style.visibility='hidden';
      document.getElementById('two_span').style.visibility='hidden';
      document.getElementById('three_span').style.visibility='visible';
      document.getElementById('four_span').style.visibility='hidden';
      document.getElementById('five_span').style.visibility='hidden';
    }
  else if (_s == 'four_span')
    {
      document.getElementById('one_span').style.visibility='hidden';
      document.getElementById('two_span').style.visibility='hidden';
      document.getElementById('three_span').style.visibility='hidden';
      document.getElementById('four_span').style.visibility='visible';
      document.getElementById('five_span').style.visibility='hidden';
    }
  else if (_s == 'five_span')
    {
      document.getElementById('one_span').style.visibility='hidden';
      document.getElementById('two_span').style.visibility='hidden';
      document.getElementById('three_span').style.visibility='hidden';
      document.getElementById('four_span').style.visibility='hidden'; 
      document.getElementById('five_span').style.visibility='visible';
    }
}
				//</xsl:comment></script>
			</head>
			<body onload="window.defaultStatus='';">
				<xsl:call-template name="initROPage">
					<xsl:with-param name="pageName">advca.py</xsl:with-param>
					<xsl:with-param name="message" select="$message"/>
				</xsl:call-template>
				<div id="displayresults">
					<h1 class="display">CLSM</h1>
					<hr width="485" size="1" align="left"/>
					<div class="row">
						<div class="generalcell">
							<b>Redundancy Group:</b>
						</div>
						<div class="generalcell">
							<select name="function" onchange="toggle(this.options[this.selectedIndex].value,'')" style="width:75px">
								<option value="one_span">1</option>
								<option value="two_span">2</option>
								<option value="three_span">3</option>
								<option value="four_span">4</option>
								<option value="five_span">5</option>
							</select>
						</div>
					</div>
					<br/>
					<xsl:apply-templates/>
				</div>
			</body>
		</html>
	</xsl:template>
	<xsl:template match="configuration/clsm">
		<div id="one_span" class="clsm_display" style="visibility:visible;">
			<div class="row">
				<div class="generalcell">
					<b>Maximum Group Rate:</b>
				</div>
				<div class="generalcell">
					<xsl:value-of select="group[@index=1]/max_group_rate"/> bps
				</div>
			</div>
			<div class="row">
				<div class="generalcell">
					<b>Minimum Encoder Rate:</b>
				</div>
				<div class="generalcell">
					<xsl:value-of select="group[@index=1]/min_encoder_rate"/> bps
				</div>
			</div>
			<div class="row">
				<div class="generalcell">
					<b>Maximum Encoder Rate:</b>
				</div>
				<div class="generalcell">
					<xsl:value-of select="group[@index=1]/max_encoder_rate"/> bps
				</div>
			</div>
		</div>
		<div id="two_span" class="clsm_display" style="visibility:hidden;">
			<div class="row">
				<div class="generalcell">
					<b>Maximum Group Rate:</b>
				</div>
				<div class="generalcell">
					<xsl:value-of select="group[@index=2]/max_group_rate"/> bps
				</div>
			</div>
			<div class="row">
				<div class="generalcell">
					<b>Minimum Encoder Rate:</b>
				</div>
				<div class="generalcell">
					<xsl:value-of select="group[@index=2]/min_encoder_rate"/> bps
				</div>
			</div>
			<div class="row">
				<div class="generalcell">
					<b>Maximum Encoder Rate:</b>
				</div>
				<div class="generalcell">
					<xsl:value-of select="group[@index=2]/max_encoder_rate"/> bps
				</div>
			</div>
		</div>
		<div id="three_span" class="clsm_display" style="visibility:hidden;">
			<div class="row">
				<div class="generalcell">
					<b>Maximum Group Rate:</b>
				</div>
				<div class="generalcell">
					<xsl:value-of select="group[@index=3]/max_group_rate"/> bps
				</div>
			</div>
			<div class="row">
				<div class="generalcell">
					<b>Minimum Encoder Rate:</b>
				</div>
				<div class="generalcell">
					<xsl:value-of select="group[@index=3]/min_encoder_rate"/> bps
				</div>
			</div>
			<div class="row">
				<div class="generalcell">
					<b>Maximum Encoder Rate:</b>
				</div>
				<div class="generalcell">
					<xsl:value-of select="group[@index=3]/max_encoder_rate"/> bps
				</div>
			</div>
		</div>
		<div id="four_span" class="clsm_display" style="visibility:hidden;">
			<div class="row">
				<div class="generalcell">
					<b>Maximum Group Rate:</b>
				</div>
				<div class="generalcell">
					<xsl:value-of select="group[@index=4]/max_group_rate"/> bps
				</div>
			</div>
			<div class="row">
				<div class="generalcell">
					<b>Minimum Encoder Rate:</b>
				</div>
				<div class="generalcell">
					<xsl:value-of select="group[@index=4]/min_encoder_rate"/> bps
				</div>
			</div>
			<div class="row">
				<div class="generalcell">
					<b>Maximum Encoder Rate:</b>
				</div>
				<div class="generalcell">
					<xsl:value-of select="group[@index=4]/max_encoder_rate"/> bps
				</div>
			</div>
		</div>
		<div id="five_span" class="clsm_display" style="visibility:hidden;">
			<div class="row">
				<div class="generalcell">
					<b>Maximum Group Rate:</b>
				</div>
				<div class="generalcell">
					<xsl:value-of select="group[@index=5]/max_group_rate"/> bps
				</div>
			</div>
			<div class="row">
				<div class="generalcell">
					<b>Minimum Encoder Rate:</b>
				</div>
				<div class="generalcell">
					<xsl:value-of select="group[@index=5]/min_encoder_rate"/> bps
				</div>
			</div>
			<div class="row">
				<div class="generalcell">
					<b>Maximum Encoder Rate:</b>
				</div>
				<div class="generalcell">
					<xsl:value-of select="group[@index=5]/max_encoder_rate"/> bps
				</div>
			</div>
		</div>
	</xsl:template>
	<xsl:template match="text()">
	</xsl:template>
</xsl:stylesheet>
