<xsl:stylesheet xmlns:x="http://www.w3.org/2001/XMLSchema" xmlns:d="http://schemas.microsoft.com/sharepoint/dsp" version="1.0" exclude-result-prefixes="xsl msxsl ddwrt" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" xmlns:asp="http://schemas.microsoft.com/ASPNET/20" xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:SharePoint="Microsoft.SharePoint.WebControls" xmlns:ddwrt2="urn:frontpage:internal" xmlns:o="urn:schemas-microsoft-com:office:office" ddwrt:ghost="show_all">
  <xsl:include href="/_layouts/xsl/blog.xsl"/>
  <xsl:include href="/_layouts/xsl/internal.xsl"/>
  	<xsl:param name="AllRows" select="/dsQueryResponse/Rows/Row[$EntityName = '' or (position() &gt;= $FirstRow and position() &lt;= $LastRow)]"/>
  	<xsl:param name="dvt_apos">&apos;</xsl:param>
  	<xsl:template match="/" ddwrt:ghost="hide">
    	<xsl:choose>
      		<xsl:when test="$RenderCTXOnly='True'">
        		<xsl:call-template name="CTXGeneration"/>
      </xsl:when>
      		<xsl:when test="($ManualRefresh = 'True')">
        		<xsl:call-template name="AjaxWrapper" />
      </xsl:when>
      		<xsl:otherwise>
        <xsl:apply-templates mode="RootTemplate" select="$XmlDefinition"/>
      </xsl:otherwise>
    	</xsl:choose>
  </xsl:template>
  	<xsl:template name="View_DefaultSummary_RootTemplate" mode="RootTemplate" match="View[@BaseViewID='0']" ddwrt:dvt_mode="root" ddwrt:ghost="hide">
    <xsl:apply-templates select="." mode="full" />
  </xsl:template>
  	<xsl:template match="View[@BaseViewID='0' and List/@TemplateType='301']" mode="full" ddwrt:ghost="hide">
    <xsl:apply-templates select="." mode="RenderView" />
    <xsl:apply-templates mode="footer" select="." />
  </xsl:template>
  	<xsl:template match="View" mode="RenderView" ddwrt:ghost="hide">
    	<xsl:variable name="ViewStyleID">
      <xsl:value-of select="ViewStyle/@ID"/>
    </xsl:variable>
    	<xsl:variable name="HasExtraColumn" select="$TabularView='1' and $MasterVersion=4 and ($ViewStyleID = '' or $ViewStyleID = '17')"/>
    	<xsl:if test="Aggregations[not(@Value='Off')]/FieldRef">
      <tr>
        <xsl:if test="$HasExtraColumn">
          <td/>
        </xsl:if>
        <xsl:if test="$InlineEdit">
          <td width="1%"/>
        </xsl:if >
        <xsl:apply-templates mode="aggregate" select="ViewFields/FieldRef[not(@Explicit='TRUE')]">
          	<xsl:with-param name="Rows" select="$AllRows"/>
          	<xsl:with-param name="GroupLevel" select="0"/>
        </xsl:apply-templates>
      </tr>
    </xsl:if>
    	<xsl:variable name="Fields" select="ViewFields/FieldRef[not(@Explicit='TRUE')]"/>
    	<xsl:variable name="Groups" select="Query/GroupBy/FieldRef"/>
    	<xsl:variable name="Collapse" select="Query/GroupBy[@Collapse='TRUE']"/>
    	<xsl:variable name="GroupCount" select="count($Groups)"/>
    	<xsl:for-each select="$AllRows">
      		<xsl:variable name="thisNode" select="."/>
      		<xsl:if test="$GroupCount &gt; 0">
        		<xsl:call-template name="GroupTemplate">
          			<xsl:with-param name="Groups" select="$Groups"/>
          			<xsl:with-param name="Collapse" select="$Collapse"/>
          			<xsl:with-param name="HasExtraColumn" select="$HasExtraColumn"/>
        		</xsl:call-template>
      </xsl:if>
      		<xsl:if test="not(not($NoAJAX) and not($InlineEdit) and $Collapse and $GroupCount &gt; 0)">
        <xsl:apply-templates mode="Item" select=".">
          	<xsl:with-param name="Fields" select="$Fields"/>
          	<xsl:with-param name="Collapse" select="$Collapse"/>
          	<xsl:with-param name="Position" select="position()"/>
          	<xsl:with-param name="Last" select="last()"/>
        </xsl:apply-templates>
      </xsl:if>
    </xsl:for-each>
    	<xsl:if test="$InlineEdit and not($IsDocLib) and $ListRight_AddListItems = '1'">
      		<xsl:call-template name="rowinsert">
        		<xsl:with-param name="Fields" select="$Fields"/>
      		</xsl:call-template>
    </xsl:if>
  </xsl:template>
  
  	<xsl:template mode="Item" match="Row[../../@TemplateType='301' and (../../@BaseViewID='0' or ../../@BaseViewID='7' or ../../@BaseViewID='8' or ../../@BaseViewID='9')]" ddwrt:ghost="" xmlns:ddwrt2="urn:frontpage:internal">
    	<xsl:param name="Fields" select="."/>
    	<xsl:param name="Collapse" select="."/>
    	<xsl:param name="Position" select="1"/>
    	<xsl:param name="Last" select="1"/>
    	<xsl:variable name="ShowBody">
      		<xsl:if test="../../@BaseViewID='0' or ../../@BaseViewID='7'">1</xsl:if>
    </xsl:variable>
    	<xsl:variable name="ShowTopDate">
      		<xsl:if test="../../@BaseViewID='0' or ../../@BaseViewID='7'">1</xsl:if>
    </xsl:variable>
    	<xsl:variable name="ShowDrafts">
      		<xsl:if test="../../@BaseViewID='7'">1</xsl:if>
    </xsl:variable>
    	<xsl:variable name="thisNode" select="."/>
    	<xsl:if test="$ShowDrafts=1 or $thisNode/@_ModerationStatus. = 0">
      <table>
        <tr class="ms-blogpostdatecol" valign="top">
          <td class= "ms-leftblogdate" style="width: 93px">
            <div id="PostDateTopBox{generate-id()}" class="ms-postcalendardateboxtop">
            </div>
            <xsl:if test="$MasterVersion = 4">
              <div id="PostDateBottomBox{generate-id()}" class="ms-postcalendardateboxbottom" style="overflow-x:hidden">
                <div>
                  <xsl:value-of select="$thisNode/@PublishedDate.MonthDayOnly" disable-output-escaping="yes" />
                </div>
              </div>
            </xsl:if>
            <xsl:if test="$MasterVersion != 4">
              <div id="PostDateBottomBox" class="ms-postcalendardateboxbottom" style="overflow-x:hidden;font-size:0.8em">
                <div>
                  <xsl:value-of select="$thisNode/@PublishedDate.MonthDayOnly" disable-output-escaping="yes" />
                </div>
              </div>
            </xsl:if>
          </td>
          <td class = "ms-rightblogpost">
            <table dir="None" cellspacing="0" cellpadding="0" width="100%" border="0">
              <tbody>
                <tr>
                  <td class="ms-PostTitle">
                    <a href="{$HttpVDir}/{$thisNode/../@resource.wss.lists_Folder}/{$thisNode/../@resource.wss.blogpost_Folder}/Post.aspx?ID={$thisNode/@ID}">
                      <xsl:apply-templates select="$Fields[@Name='Title']" mode="PrintField">
                        <xsl:with-param name="thisNode" select="$thisNode"/>
                        <xsl:with-param name="Position" select="$Position"/>
                      </xsl:apply-templates>
                    </a>
         <!--Start Blog Post Average Rating  --> 
         <div style="margin-left:5px;"> 
          	<xsl:for-each select="$Fields">            
            	<xsl:if test="@Name ='AverageRating'">
            		<xsl:choose>
              			<xsl:when test="@Name='AverageRating'">
	              			<xsl:apply-templates select="." mode="PrintFieldWithDisplayFormLink">
	              				<xsl:with-param name="thisNode" select="$thisNode"/>
	              				<xsl:with-param name="Position" select="$Position"/>
	              			</xsl:apply-templates>
              			</xsl:when>
            		</xsl:choose>
            </xsl:if>
          </xsl:for-each>
        </div>
        <!--End Blog Post Average Rating   -->
                    
                  </td>
                  	<xsl:if test="../../@BaseViewID='7'">
                    	<xsl:if test="($thisNode/../@value.listpermission.EditListItems = '1' and (($thisNode/../@value.listpermission.ManageLists  = '1') or ($XmlDefinition/List/@WriteSecurity = '2' and $thisNode/@Author.id = $Userid) or ($XmlDefinition/List/@WriteSecurity != '2')))">
                      <td align="right" class="ms-blogedit">
                        <a href="javascript:" onclick="javascript:ShowPopupDialog('{$HttpVDir}/{$thisNode/../@resource.wss.lists_Folder}/{$thisNode/../@resource.wss.blogpost_Folder}/EditPost.aspx?ID={$thisNode/@ID}&amp;Source={$HttpVDir}%2Fdefault.aspx');">
                          <xsl:value-of select="'Edit'" />
                        </a>
                      </td>
                    </xsl:if>
                  </xsl:if>
                </tr>
              </tbody>
            </table>
            <div class="ms-PostFooter">
              	<xsl:for-each select="$Fields">
                	<xsl:if test="@Name!='Title' and @Type!='Note' and not(@Name='PostCategory' and $thisNode/@PostCategory='')">
                  		<xsl:choose>
                    		<xsl:when test="@Name='Author'">
                      <span class="ms-postfootercolor">
                        <xsl:value-of select="'by '"/>
                      </span>
                      			<xsl:text disable-output-escaping="yes" ddwrt:nbsp-preserve="yes">&amp;nbsp;</xsl:text>
                      <xsl:value-of select="$thisNode/@Author.span" disable-output-escaping="yes" />
                    </xsl:when>
                    		<xsl:when test="@Name='PublishedDate'">
                      			<xsl:text disable-output-escaping="yes" ddwrt:nbsp-preserve="yes">&amp;nbsp;&amp;nbsp;</xsl:text>
                      <span class="ms-postfootercolor">
                        <xsl:value-of select="'on'"/>
                        		<xsl:text disable-output-escaping="yes" ddwrt:nbsp-preserve="yes">&amp;nbsp;</xsl:text>
                        <xsl:value-of select="$thisNode/@PublishedDate" />
                      </span>
                    </xsl:when>
                  		</xsl:choose>
                </xsl:if>
              </xsl:for-each>
              <div>
                <xsl:for-each select="$Fields">
                  	<xsl:if test="@Name='PostCategory' and not ($thisNode/@PostCategory='')">
                    <xsl:value-of select="'Category'" />
                    	<xsl:text disable-output-escaping="yes" ddwrt:nbsp-preserve="yes">:&amp;nbsp;</xsl:text>
                    <xsl:apply-templates select="$Fields[@Name='CategoryWithLink']" mode="Computed_body">
                      	<xsl:with-param name="thisNode" select="$thisNode"/>
                    </xsl:apply-templates>
                  </xsl:if>
                </xsl:for-each>
              </div>
            </div>
            <xsl:if test="$ShowBody=1">
              <div class="ms-PostBody">
                <div>
                  <xsl:apply-templates select="$Fields[@Name='Body']" mode="PrintField">
                    <xsl:with-param name="thisNode" select="$thisNode"/>
                    <xsl:with-param name="Position" select="$Position"/>
                  </xsl:apply-templates>
                </div>
              </div>
            </xsl:if>
            <div class="ms-PostFooter">
              	<xsl:for-each select="$Fields">
                	<xsl:if test="@Name ='Permalink' or @Name ='EmailPostLink' or @Name ='NumCommentsWithLink'">
                  		<xsl:choose>
                    		<xsl:when test="@Name='Permalink' or @Name='EmailPostLink' or @Name='NumCommentsWithLink'">
                      <xsl:apply-templates select="." mode="PrintFieldWithDisplayFormLink">
                        <xsl:with-param name="thisNode" select="$thisNode"/>
                        <xsl:with-param name="Position" select="$Position"/>
                      </xsl:apply-templates>
                      			<xsl:if test="@Name='Permalink' or @Name='EmailPostLink'">
                        			<xsl:text disable-output-escaping="yes" ddwrt:nbsp-preserve="yes">&amp;nbsp;|&amp;nbsp;</xsl:text>
                      </xsl:if>
                    </xsl:when>
                    		<xsl:when test="$thisNode/@*[name()=current()/@Name]!=''">
                      <xsl:apply-templates select="." mode="PrintFieldWithDisplayFormLink">
                        <xsl:with-param name="thisNode" select="$thisNode"/>
                        <xsl:with-param name="Position" select="$Position"/>
                      </xsl:apply-templates>
                      			<xsl:text disable-output-escaping="yes" ddwrt:nbsp-preserve="yes">&amp;nbsp;|&amp;nbsp;</xsl:text>
                    </xsl:when>
                  		</xsl:choose>
                </xsl:if>
              </xsl:for-each>
            </div>
            
          </td>
        </tr>
      </table>
    </xsl:if>
  </xsl:template>
  
  	<xsl:template name="FieldRef_Text_body.Title" ddwrt:dvt_mode="body" match ="FieldRef[@Name='Title']" mode="Text_body" ddwrt:ghost="hide">
    	<xsl:param name="thisNode" select="."/>
    	<xsl:choose>
      		<xsl:when test="@AutoHyperLink='TRUE'">
        <xsl:value-of select="$thisNode/@*[name()=current()/@Name]" disable-output-escaping ="yes"/>
      </xsl:when>
      		<xsl:otherwise>
        <xsl:value-of select="$thisNode/@*[name()=current()/@Name]"/>
      </xsl:otherwise>
    	</xsl:choose>
  </xsl:template>
  	<xsl:template name="FieldRef_Note_body.Body" ddwrt:dvt_mode="body" match="FieldRef[@Name='Body']" mode="Note_body" ddwrt:ghost="hide">
    	<xsl:param name="thisNode" select="."/>
    <div dir="{@Direction}" class="ms-rtestate-field">
      <xsl:value-of select="$thisNode/@*[name()=current()/@Name]" disable-output-escaping="yes"/>
    </div>
  </xsl:template>
  	<xsl:template name="FieldRef_Blog_Permalink_Computed_Body.Permalink" match="FieldRef[(@ID='a194bd80-24e6-e71b-b235-3a283b9f1e71') and @Name='Permalink']" ddwrt:dvt_mode="body" mode="Computed_body" ddwrt:ghost="hide">
    	<xsl:param name="thisNode" select="."/>
    <span style="vertical-align:middle">
      <span style="height:16px;width:16px;position:relative;display:inline-block;overflow:hidden;" class="s4-clust">
        <a href="{$HttpVDir}/{$thisNode/../@resource.wss.lists_Folder}/{$thisNode/../@resource.wss.blogpost_Folder}/Post.aspx?ID={$thisNode/@ID}" style="height:16px;width:16px;display:inline-block;" >
          <img src="/_layouts/images/fgimg.png" alt="{$thisNode/../@resource.wss.posts_permlink_alt}" style="left:-0px !important;top:-412px !important;position:absolute;" title="{$thisNode/../@resource.wss.posts_permlink_alt}" class="imglink" longDesc="{$thisNode/../@resource.wss.posts_permlink_alt}" />
        </a>
      </span>
    </span>
  </xsl:template>
  	<xsl:template name="FieldRef_Blog_EmailPostLink_Computed_Body.EmailPostLink" match="FieldRef[(@ID='1c216b4a-13a6-cd5c-b37b-3776b29ff92e') and @Name='EmailPostLink']" ddwrt:dvt_mode="body" mode="Computed_body" ddwrt:ghost="hide">
    	<xsl:param name="thisNode" select="."/>
    <span style="vertical-align:middle">
      <span style="height:16px;width:16px;position:relative;display:inline-block;overflow:hidden;" class="s4-clust">
        <a href="javascript:navigateMailToLink('{$HttpVDir}%2F{$thisNode/../@resource.wss.lists_Folder}%2F{$thisNode/../@resource.wss.blogpost_Folder}%2FPost.aspx?ID%3D{$thisNode/@ID}')" style="height:16px;width:16px;display:inline-block;" >
          <img src="/_layouts/images/fgimg.png" alt="{$thisNode/../@resource.wss.posts_emailpostlink_alt}" style="left:-0px !important;top:-267px !important;position:absolute;" title="{$thisNode/../@resource.wss.posts_emailpostlink_alt}" class="imglink" longDesc ="{$thisNode/../@resource.wss.posts_emailpostlink_alt}" />
        </a>
      </span>
    </span>
  </xsl:template>
  	<xsl:template name="FieldRef_Blog_NumCommentsWithLink_Computed_Body.NumCommentsWithLink" match="FieldRef[(@ID='65746b4a-13a6-a72c-b815-3a96b29f1f9e') and @Name='NumCommentsWithLink']" ddwrt:dvt_mode="body" mode="Computed_body" ddwrt:ghost="hide">
    	<xsl:param name="thisNode" select="."/>
    <span style="vertical-align:middle">
      <span style="height:16px;width:16px;position:relative;display:inline-block;overflow:hidden;" class="s4-clust">
        <a href="{$HttpVDir}/{$thisNode/../@resource.wss.lists_Folder}/{$thisNode/../@resource.wss.blogpost_Folder}/Post.aspx?ID={$thisNode/@ID}" style="height:16px;width:16px;display:inline-block;" >
          <img src="/_layouts/images/fgimg.png" alt="{$thisNode/../@resource.wss.posts_numcommentswithlink_alt}" style="left:-0px !important;top:-396px !important;position:absolute;" title="{$thisNode/../@resource.wss.posts_numcommentswithlink_alt}" class="imglink" longDesc="{$thisNode/../@resource.wss.posts_numcommentswithlink_alt}" />
        </a>
      </span>
    </span>
    <span>
      <a href="{$HttpVDir}/{$thisNode/../@resource.wss.lists_Folder}/{$thisNode/../@resource.wss.blogpost_Folder}/Post.aspx?ID={$thisNode/@ID}">
        <xsl:text disable-output-escaping="yes" ddwrt:nbsp-preserve="yes">&amp;nbsp;</xsl:text>
        <xsl:value-of select="$thisNode/@NumComments" />
        <xsl:text disable-output-escaping="yes" ddwrt:nbsp-preserve="yes">&amp;nbsp;</xsl:text>
        <xsl:value-of select="'Comment(s)'"/>
      </a>
    </span>
  </xsl:template>
  	<xsl:template match="View[List/@TemplateType='301' and (@BaseViewID='0' or @BaseViewID='8' or @BaseViewID='9')]" mode="footer" ddwrt:ghost="hide">
    	<xsl:call-template name="pagingButtons" />
    	<xsl:if test="List/@EnableSyndication=1">
      <div class="ms-blogrss" id="BlogRSSMain{generate-id()}">
        <span style="vertical-align:middle">
          <span style="height:16px;width:16px;position:relative;display:inline-block;overflow:hidden;" class="s4-clust">
            <a href="{$HttpVDir}/_layouts/listfeed.aspx?List={$List}" style="height:16px;width:16px;display:inline-block;" >
              <img src="/_layouts/images/fgimg.png" alt="{$Rows/@resource.wss.blog_rss_link}" style="left:-0px !important;top:-475px !important;position:absolute;" title="{$Rows/@resource.wss.blog_rss_link}" align="absmiddle" />
            </a>
          </span>
        </span>
        <a href="{$HttpVDir}/_layouts/listfeed.aspx?List={$List}">
          <xsl:text disable-output-escaping="yes" ddwrt:nbsp-preserve="yes">&amp;nbsp;</xsl:text>
          <xsl:value-of select="'RSS Feed'"/>
        </a>
      </div>
      <script type="text/javascript">
        var divBlogRSSNav = document.getElementById(&quot;BlogRSSNav&quot;);
        var divBlogRSSMain = document.getElementById(&quot;BlogRSSMain&quot;);
        if (divBlogRSSNav != null &amp;&amp; divBlogRSSMain != null)
        {
        divBlogRSSNav.innerHTML = divBlogRSSMain.innerHTML;
        divBlogRSSNav.className = &quot;ms-blogrssnav&quot;;
        divBlogRSSMain.removeNode(true);
        }
      </script>
    </xsl:if>
    	<xsl:if test="$EnableAlert">
      <div class="ms-blogrss" >
        <a href="{$HttpVDir}/_layouts/SubNew.aspx?List={$List}&amp;Source={$HttpVDir}%2Fdefault.aspx" longDesc="{$Rows/@resource.wss.ToolBarMenuItemAlertMe}">
          <img src="/_layouts/images/menualert.gif" alt="{$Rows/@resource.wss.ToolBarMenuItemAlertMe}" title="{$Rows/@resource.wss.ToolBarMenuItemAlertMe}" align="absmiddle" height="16px" width="16px"/>
          <xsl:text disable-output-escaping="yes" ddwrt:nbsp-preserve="yes">&amp;nbsp;</xsl:text>
          <xsl:value-of select="'Alert Me'"/>
        </a>
      </div>
    </xsl:if>
  </xsl:template>
  	<xsl:template name="pagingButtons" ddwrt:ghost="hide">
    	<xsl:choose>
      		<xsl:when test="$XmlDefinition/List/@TemplateType = 106 and $XmlDefinition/@RecurrenceRowset='TRUE'">
        		<xsl:if test="$dvt_nextpagedata or $dvt_prevpagedata">
          			<xsl:call-template name="CalendarExpandedRecurrenceFooter"/>
        </xsl:if>
      </xsl:when>
      		<xsl:otherwise>
        		<xsl:if test="$XmlDefinition/RowLimit[@Paged='TRUE']">
          			<xsl:call-template name="CommandFooter">
            			<xsl:with-param name="FirstRow" select="$FirstRow" />
            			<xsl:with-param name="LastRow" select="$LastRow" />
            			<xsl:with-param name="dvt_RowCount" select="$dvt_RowCount" />
          			</xsl:call-template>
        </xsl:if>
      </xsl:otherwise>
    	</xsl:choose>
  </xsl:template>
  	<xsl:template name="CommandFooter" ddwrt:ghost="hide">
    	<xsl:param name="FirstRow" select="1"/>
    	<xsl:param name="LastRow" select="1"/>
    	<xsl:param name="dvt_RowCount" select="1"/>
    	<xsl:if test="$FirstRow &gt; 1 or $dvt_nextpagedata">
      		<xsl:call-template name="Navigation">
        		<xsl:with-param name="FirstRow" select="$FirstRow" />
        		<xsl:with-param name="LastRow" select="$LastRow" />
        		<xsl:with-param name="dvt_RowCount" select="$dvt_RowCount" />
      		</xsl:call-template>
    </xsl:if>
  </xsl:template>
  	<xsl:template name="Navigation" ddwrt:ghost="hide">
    	<xsl:param name="FirstRow" select="1"/>
    	<xsl:param name="LastRow" select="1"/>
    	<xsl:param name="dvt_RowCount" select="1"/>
    	<xsl:variable name="LastRowValue">
      		<xsl:choose>
        		<xsl:when test="$EntityName = '' or $LastRow &lt; $RowTotalCount">
          <xsl:value-of select="$LastRow"/>
        </xsl:when>
        		<xsl:otherwise>
          <xsl:value-of select="$RowTotalCount"/>
        </xsl:otherwise>
      		</xsl:choose>
    </xsl:variable>
    	<xsl:variable name="NextRow">
      <xsl:value-of select="$LastRowValue + 1"/>
    </xsl:variable>
    <table width="100%" border="0" cellpadding="0" cellspacing="0" class="ms-bottompaging">
      <tr>
        <td class="ms-bottompagingline1">
          <img src="/_layouts/images/blank.gif" width="1" height="1" alt=""/>
        </td>
      </tr>
      <tr>
        <td class="ms-bottompagingline2">
          <img src="/_layouts/images/blank.gif" width="1" height="1" alt=""/>
        </td>
      </tr>
      <tr>
        <td class="ms-vb" id="bottomPagingCell{$WPQ}">
          	<xsl:if test="not($GroupingRender)">
            	<xsl:attribute name="align">center</xsl:attribute>
          </xsl:if>
          <table>
            <tr>
              	<xsl:if test="$dvt_firstrow &gt; 1">
                <td>
                  <a>
                    <xsl:choose>
                      	<xsl:when test="$dvt_RowCount = 0 and not($NoAJAX)">
                        	<xsl:attribute name="onclick">
                          javascript:RefreshPageTo(event, &quot;<xsl:value-of select="$PagePath"/>?<xsl:value-of select="$ShowWebPart"/>\u0026<xsl:value-of select='$FieldSortParam'/><xsl:value-of select='$SortQueryString'/>\u0026View=<xsl:value-of select="$View"/>&quot;);javascript:return false;
                        </xsl:attribute>
                        	<xsl:attribute name="href">javascript:</xsl:attribute>
                        <img src="/_layouts/{$LCID}/images/prev.gif" border="0" alt="{$Rows/@idRewind}" />
                        <img src="/_layouts/{$LCID}/images/prev.gif" border="0" alt="{$Rows/@idRewind}" />
                      </xsl:when>
                      	<xsl:otherwise>
                        	<xsl:variable name="RealRowLimit">
                          		<xsl:choose>
                            		<xsl:when test="$XmlDefinition/Query/GroupBy[@Collapse='TRUE']/@GroupLimit">
                              <xsl:value-of select ="$XmlDefinition/Query/GroupBy[@Collapse='TRUE']/@GroupLimit"/>
                            </xsl:when>
                            		<xsl:otherwise>
                              <xsl:value-of select = "$XmlDefinition/RowLimit"/>
                            </xsl:otherwise>
                          		</xsl:choose>
                        </xsl:variable>
                        	<xsl:choose>
                          		<xsl:when test="not($NoAJAX)">
                            		<xsl:attribute name="onclick">
                              javascript:RefreshPageTo(event, &quot;<xsl:value-of select="$PagePath"/>?<xsl:value-of select="$dvt_prevpagedata"/><xsl:value-of select="$ShowWebPart"/>\u0026PageFirstRow=<xsl:value-of select="$FirstRow - $RealRowLimit"/>\u0026<xsl:value-of select='$FieldSortParam'/><xsl:value-of select='$SortQueryString'/>\u0026View=<xsl:value-of select="$View"/>&quot;);javascript:return false;
                            </xsl:attribute>
                            		<xsl:attribute name="href">javascript:</xsl:attribute>
                          </xsl:when>
                          		<xsl:otherwise>
                            		<xsl:attribute name="href">
                              javascript: <xsl:call-template name="GenFireServerEvent">
                                			<xsl:with-param name="param" select="concat('dvt_firstrow={',$FirstRow - $XmlDefinition/RowLimit,'};dvt_startposition={',$dvt_prevpagedata,'}')"/>
                              			</xsl:call-template>
                            </xsl:attribute>
                          </xsl:otherwise>
                        	</xsl:choose>
                        <img src="/_layouts/{$LCID}/images/prev.gif" border="0" alt="{$Rows/@idPrevious}" />
                      </xsl:otherwise>
                    </xsl:choose>
                  </a>
                </td>
              </xsl:if>
              	<xsl:if test="$FirstRow &lt;= $LastRowValue">
                <td class="ms-paging">
                  <xsl:value-of select="$FirstRow" /> - <xsl:value-of select="$LastRowValue" />
                </td>
              </xsl:if>
              	<xsl:if test="$LastRowValue &lt; $dvt_RowCount or string-length($dvt_nextpagedata)!=0">
                <td>
                  <a>
                    <xsl:choose>
                      	<xsl:when test="not($NoAJAX)">
                        	<xsl:attribute name="onclick">
                          javascript:RefreshPageTo(event, &quot;<xsl:value-of select="$PagePath"/>?<xsl:value-of select="$dvt_nextpagedata"/><xsl:value-of select="$ShowWebPart"/>\u0026PageFirstRow=<xsl:value-of select="$NextRow"/>\u0026<xsl:value-of select='$FieldSortParam'/><xsl:value-of select='$SortQueryString'/>\u0026View=<xsl:value-of select="$View"/>&quot;);javascript:return false;
                        </xsl:attribute>
                        	<xsl:attribute name="href">javascript:</xsl:attribute>
                      </xsl:when>
                      	<xsl:otherwise>
                        	<xsl:attribute name="href">
                          javascript:
                          		<xsl:call-template name="GenFireServerEvent">
                            		<xsl:with-param name="param" select="concat('dvt_firstrow={',$NextRow,'};dvt_startposition={',$dvt_nextpagedata,'}')"/>
                          		</xsl:call-template>
                        </xsl:attribute>
                      </xsl:otherwise>
                    </xsl:choose>
                    <img src="/_layouts/{$LCID}/images/next.gif" border="0" alt="{$Rows/@tb_nextpage}" />
                  </a>
                </td>
              </xsl:if>
            </tr>
          </table>
        </td>
      </tr>
      <tr>
        <td class="ms-bottompagingline3">
          <img src="/_layouts/images/blank.gif" width="1" height="1" alt=""/>
        </td>
      </tr>
    </table>
    	<xsl:if test="not($GroupingRender)">
      <script>
        var topPagingCell = document.getElementById(&quot;topPagingCell<xsl:value-of select='$WPQ'/>&quot;);
        var bottomPagingCell = document.getElementById(&quot;bottomPagingCell<xsl:value-of select='$WPQ'/>&quot;);
        if (topPagingCell != null &amp;&amp; bottomPagingCell != null)
        {
        topPagingCell.innerHTML = bottomPagingCell.innerHTML;
        }
      </script>
    </xsl:if>
  </xsl:template>
</xsl:stylesheet>
