<!--                                                                  -->
<!--  Copyright (C) 2006 RoyaltyShare, Inc.   All Rights Reserved     -->
<!--  $Id$  -->
<!--                                                                  -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:output method="html" indent="no" doctype-system="http://www.w3.org/TR/html4/strict.dtd" doctype-public="-//W3C//DTD HTML 4.01//EN" encoding="utf-8" />

    <xsl:include href="/app/tools/rps/templates/global.xsl" />
    <xsl:include href="../shared_layouts/statements.xsl" />


    <xsl:template name="pickLayout">
        <div class="section">
			<xsl:call-template name="payorTable" />
		</div>
	</xsl:template>

	<xsl:template name="payorTable">
        <table class="textChart hiOn">
            <tr>
                <th class="rowLeft">Payor</th>
				<th># of Statements</th>
            </tr>
            <xsl:for-each select="MechanicalPayorList/Payor">
                <tr class="row{position() mod 2}">
                    <td class="rowLeft">
          	            <a>
          		            <xsl:attribute name="href">
          			            <xsl:choose>
          				            <xsl:when test="/Root/Params/Payments">
          					            ?c=editpay&amp;MechanicalRunID=<xsl:value-of select="/Root/Params/MechanicalRunID" />&amp;PayorID=<xsl:value-of select="PayorID" />
          				            </xsl:when>
          				            <xsl:otherwise>
          					            ?c=show&amp;MechanicalRunID=<xsl:value-of select="/Root/Params/MechanicalRunID" />&amp;PayorID=<xsl:value-of select="PayorID" />
          				            </xsl:otherwise>
								</xsl:choose>
							</xsl:attribute>
							<xsl:value-of select="Name" />
        	            </a>
                    </td>
					<td>
						<xsl:value-of select="NumStatements" />
					</td>
                </tr>
            </xsl:for-each>
        </table>
    </xsl:template>

</xsl:stylesheet>

