<ViewStyles
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
  xmlns:asp="http://schemas.microsoft.com/ASPNET/20"
  xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime">

  <Defaults>
    <CommandHeader>
      <!-- contrary to appearances this is not just a regular div, it's a magic
           div! it helps our product in mystical ways, so don't remove it
           unless you really know what you're doing! and if you don't know what
           you're doing but still want to remove this div, ask rchen about it.
      -->
      <div>
        <dvt_Navigation />
        <dvt_ListActionBar />
        <dvt_SearchTable />
      </div>
    </CommandHeader>
  
    <Navigation>
      <xsl:variable name="NextRow">
        <xsl:choose>
          <xsl:when test="$LastRow &gt;= $dvt_RowCount">
            <xsl:value-of select="$FirstRow" />
          </xsl:when>
          <xsl:otherwise>
            <xsl:value-of select="$LastRow + 1" />
          </xsl:otherwise>
        </xsl:choose>
      </xsl:variable>
      <asp:Literal id="PagerControl" runat="server">
        <xsl:choose>
          <xsl:when test="$dvt_RowCount = 0">
            <dvt_EmptyText />
          </xsl:when>
          <xsl:when test="$FirstRow = 1 and $LastRow = $dvt_RowCount">
            <dvt_FullText />
          </xsl:when>
          <xsl:otherwise>
            <xsl:if test="$FirstRow != 1">
              <dvt_PrevLink />
              <dvt_NBSP />
            </xsl:if>
            <dvt_PageItemText />
            <xsl:if test="$LastRow != $dvt_RowCount">
              <dvt_NBSP />
              <dvt_NextLink />
            </xsl:if>
          </xsl:otherwise>
        </xsl:choose>
        <dvt_NBSP />
        <dvt_NBSP />
        <xsl:if test="$IsEditViewVisible">
          <a href="{$dvt_url}">
            <dvt_EditView />
          </a>
          <dvt_NBSP />
          <dvt_NBSP />
        </xsl:if>
      </asp:Literal>
    </Navigation>
  
    <AutoModeVertical>
      <table border="0" cellspacing="0" cellpadding="1">
        <xsl:choose>
          <dvt_WhenAutoModeEdit>
            <tr><td class="ms-vb" width="1"><dvt_SaveEditLink /></td></tr>
            <tr><td class="ms-vb" width="1"><dvt_CancelEditLink /></td></tr>
          </dvt_WhenAutoModeEdit>
          <dvt_WhenAutoModeInsert>
            <tr><td class="ms-vb" width="1"><dvt_SaveInsertLink /></td></tr>
            <tr><td class="ms-vb" width="1"><dvt_CancelInsertLink /></td></tr>
          </dvt_WhenAutoModeInsert>
          <xsl:otherwise>
            <tr><td class="ms-vb" width="1"><dvt_EditLink /></td></tr>
            <tr><td class="ms-vb" width="1"><dvt_DeleteLink /></td></tr>
            <tr><td class="ms-vb" width="1"><dvt_SelectLink /></td></tr>
          </xsl:otherwise>
        </xsl:choose>
      </table>
    </AutoModeVertical>
  
    <AutoModeHorizontal>
      <table border="0" cellspacing="0" cellpadding="1">
        <tr>
          <xsl:choose>
            <dvt_WhenAutoModeEdit>
              <td class="ms-vb"><dvt_SaveEditLink /></td>
              <td class="ms-vb"></td>
              <td class="ms-vb"><dvt_CancelEditLink /></td>
            </dvt_WhenAutoModeEdit>
            <dvt_WhenAutoModeInsert>
              <td class="ms-vb"><dvt_SaveInsertLink /></td>
              <td class="ms-vb"></td>
              <td class="ms-vb"><dvt_CancelInsertLink /></td>
            </dvt_WhenAutoModeInsert>
            <xsl:otherwise>
              <td class="ms-vb"><dvt_EditLink /></td>
              <td class="ms-vb"></td>
              <td class="ms-vb"><dvt_DeleteLink /></td>
              <td class="ms-vb"></td>
              <td class="ms-vb"><dvt_SelectLink /></td>
            </xsl:otherwise>
          </xsl:choose>
        </tr>
      </table>
    </AutoModeHorizontal>
  </Defaults>
  
  <Style>
    <ID>Table</ID>
    <HasRowEnum>true</HasRowEnum>
    <HasFieldEnum>true</HasFieldEnum>
    <RequiredFields />
    <Params />
    <Tag>body</Tag>
    <TagRow>tbody</TagRow>
    <Tabular>true</Tabular>
    <Preview>table.gif</Preview>
    <Main>
      <dvt_CommandHeader />
      <!--dvt_ErrorText/-->
      <table id="BdwpRows" border="0" width="100%" cellpadding="2" cellspacing="0">
        <dvt_TableSummary />
        <tr valign="top">
          <dvt_IfAutoMode>
            <th class="ms-vh" width="1"></th>
          </dvt_IfAutoMode>
          <dvt_ForEachField>
            <th class="ms-vh" align="left"><dvt_FieldTitle /></th>
          </dvt_ForEachField>
        </tr>
        <dvt_Body />
      </table>
    </Main>
    <Body>
      <RowView>
        <tr>
          <dvt_IfAutoMode>
            <td class="ms-vb" width="1"><dvt_AutoMode mode="select" /></td>
          </dvt_IfAutoMode>
          <dvt_ForEachField>
            <dvt_TDFieldView />
          </dvt_ForEachField>
        </tr>
      </RowView>
    </Body>
  </Style>
  
  <!-- RepForm3 -->
  <Style>
    <ID>RepForm3</ID>
    <HasRowEnum>true</HasRowEnum>
    <HasFieldEnum>true</HasFieldEnum>
    <RequiredFields />
    <Params />
    <Tag>body</Tag>
    <TagRow>tbody</TagRow>
    <Tabular>false</Tabular>
    <Preview>repform3.gif</Preview>
    <Main>
      <dvt_Header />
      <div><dvt_ItemActionBar /></div> <!-- another magic div -->
      <table border="0" width="100%">
        <dvt_TableSummary />
        <dvt_Body />
      </table>
      <dvt_Footer />
    </Main>
    <Body>
      <RowView>
        <tr><td>
          <table border="0" width="100%">
            <dvt_ForEachField>
              <tr>
                <td class="ms-descriptiontext ms-alignright"><nobr><dvt_FieldTitle />:</nobr></td>
                <td class="ms-descriptiontext ms-alignleft" width="100%"><dvt_FieldView /></td>
              </tr>
            </dvt_ForEachField>
          </table>
        </td></tr>
      </RowView>
    </Body>
  </Style>
</ViewStyles>
