﻿<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl">

	<xsl:import href="../GenericTemplates/StringReplace.xslt"/>

	<xsl:output method="xml" indent="yes"/>

	<xsl:variable name="smallcase" select="'abcdefghijklmnopqrstuvwxyz'" />
	<xsl:variable name="uppercase" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'" />
	<xsl:key name="DistinctUserGoalsFilter" match="AjaxRequest/GoalFilterDataXML/GoalsXML/Goal" use="./GoalItemID"></xsl:key>
	<xsl:key name="GoalName" match="UserActionDetails/GoalName" use="." />
	<xsl:key name="TopicName" match="UserActionDetails/TopicName" use="." />
	<!--<xsl:key name="ActionName" match="UserActionDetails/ActionName" use="." />-->
	<xsl:key name="ResponsibleName" match="UserActionDetails/ResponsibleName" use="." />
	<xsl:key name="ActionDueDate" match="UserActionDetails/ActionDueDate" use="." />
	<xsl:key name="PriorityKey" match="UserActionDetails/Priority" use="." />
	<xsl:key name="CompletionPercentageKey" match="UserActionDetails/CompletionPercentage" use="." />
	<xsl:template match="/">
		<xsl:variable name="IsCompleted" select="AjaxRequest/Params/IsCompleted"></xsl:variable>
		<xsl:variable name="IsMyWorksheet" select="AjaxRequest/Params/IsMyWorksheet"/>
		<xsl:variable name="IsThisWeek" select="AjaxRequest/Params/IsThisWeek"/>
		<xsl:variable name="IsTask" select="AjaxRequest/Params/IsTask"/>
		<xsl:variable name="IsWorksheet" select="AjaxRequest/Params/IsWorksheet"/>
		<xsl:variable name="MasterPortalItemID" select="/AjaxRequest/Settings/MasterPortalItemID"></xsl:variable>
		<xsl:variable name="PortalItemID" select="AjaxRequest/Params/PortalItemID"></xsl:variable>
		<xsl:variable name="UserTasksFilterXML" select="AjaxRequest/GoalFilterDataXML/GoalsXML/."></xsl:variable>
		<xsl:variable name="TaskColumns" select="AjaxRequest/Records/Columns"></xsl:variable>
		<xsl:variable name="TaskRecords" select="AjaxRequest/Records/UserActionDetailXML"></xsl:variable>
		<xsl:variable name="SortColName" select="AjaxRequest/Params/SortColName"/>
		<xsl:variable name="SortOrder" select="AjaxRequest/Params/SortOrder"/>
		<xsl:variable name="SelectedUserID" select="AjaxRequest/Params/UserID"></xsl:variable>
		<xsl:variable name="SelectedUserIDFilters">
			<xsl:choose>
				<xsl:when test="AjaxRequest/Params/UserID[text()]">
					<xsl:value-of select="AjaxRequest/Params/UserID"/>
				</xsl:when>
				<xsl:otherwise>
					<xsl:text>null</xsl:text>
				</xsl:otherwise>
			</xsl:choose>
		</xsl:variable>
		<xsl:variable name="GoalItemID" select="AjaxRequest/Params/GoalItemID"></xsl:variable>
		<xsl:variable name="LoggedInUser" select="AjaxRequest/Params/LoggedInUser"></xsl:variable>
		<xsl:variable name="ResponsibleID" select="AjaxRequest/Params/ResponsibleID"></xsl:variable>
		<xsl:variable name="PageSize" select="AjaxRequest/DefaultPageSize"></xsl:variable>
		<xsl:variable name="LastRecRowID" select="$TaskRecords/UserActionDetails[last()]/RowID"></xsl:variable>
		<xsl:variable name="CurrentPage" select="ceiling($LastRecRowID div $PageSize)"></xsl:variable>
		<xsl:variable name="List" select="AjaxRequest/Records/List"/>
		<xsl:variable name="GoalPermList" select="AjaxRequest/GoalPermissionList"></xsl:variable>
		<xsl:variable name="Panel" select="AjaxRequest/Params/Panel"></xsl:variable>
		<xsl:variable name="TaskCategory" select="AjaxRequest/Params/TaskCategory"></xsl:variable>
		<xsl:variable name="GoalClassification" select="AjaxRequest/Params/GoalClassification"></xsl:variable>
		<xsl:variable name="PageNumber">
			<xsl:choose>
				<xsl:when test="AjaxRequest/Params/PageNumber">
					<xsl:value-of select="AjaxRequest/Params/PageNumber"/>
				</xsl:when>
				<xsl:otherwise>
					<xsl:text>1</xsl:text>
				</xsl:otherwise>
			</xsl:choose>
		</xsl:variable>
		<xsl:variable name="TotalPages">
			<xsl:choose>
				<xsl:when test="$TaskRecords/UserActionDetails/TotalPages">
					<xsl:value-of select="$TaskRecords/UserActionDetails/TotalPages"/>
				</xsl:when>
			</xsl:choose>
		</xsl:variable>
		<xsl:variable name="TotalRecords">
			<xsl:choose>
				<xsl:when test="$TaskRecords/UserActionDetails/TotalRecords">
					<xsl:value-of select="$TaskRecords/UserActionDetails/TotalRecords"/>
				</xsl:when>
			</xsl:choose>
		</xsl:variable>
		<xsl:variable name="SaveFiltersFunc">
			<xsl:text>saveGoalFilterSettings('chk_Task_Filter_HideCompleted', 'chk_Task_Filter_HideMyTask', 'chk_Task_Filter_HideThisWeek','', '</xsl:text>
			<xsl:value-of select="$PortalItemID"/>
			<xsl:text>');</xsl:text>
		</xsl:variable>
		<xsl:variable name="CurrentPageNumber" select="AjaxRequest/Records/CurrentPageNumber"></xsl:variable>
		<xsl:variable name="NextPageNo">
			<xsl:value-of select="$CurrentPageNumber + 1"/>
		</xsl:variable>
		<xsl:variable name="PrevPageNo">
			<xsl:value-of select="$CurrentPageNumber - 1"/>
		</xsl:variable>

		<xsl:variable name="Mode" select="AjaxRequest/Params/Mode"></xsl:variable>
		<xsl:variable name="ResponsibleUsersListXML" select="AjaxRequest/UsersXML/."></xsl:variable>

		<xsl:variable name="callBack">
			'<xsl:value-of select="AjaxRequest/CallBackSignature"/>'
		</xsl:variable>
		<xsl:variable name="DropdownUserID" select="AjaxRequest/Params/SelectedUserID"></xsl:variable>
		<xsl:variable name="DropdownSelectedUserID">
			<xsl:choose>
				<xsl:when test="$DropdownUserID=''">
					<xsl:value-of select="$SelectedUserID"/>
				</xsl:when>
				<xsl:otherwise>
					<xsl:value-of select="$DropdownUserID"/>
				</xsl:otherwise>
			</xsl:choose>
		</xsl:variable>
		<xsl:variable name="responsibleStyle">
			<xsl:choose>
				<xsl:when test="$Mode='CoachingDashboardHeader'">
					<xsl:text>display:none;</xsl:text>
				</xsl:when>
				<xsl:otherwise></xsl:otherwise>
			</xsl:choose>
		</xsl:variable>
		<xsl:variable name="DivID" select="AjaxRequest/Params/DivID"></xsl:variable>
		<xsl:variable name="DefaultLoad" select="AjaxRequest/Params/DefaultLoad"></xsl:variable>
		<div class="">
			<xsl:if test="$Mode='Header' or $Mode='CoachingDashboardHeader'">
				<div style="k" class="marginBottom10 marginTop10">
					<xsl:if test="$MasterPortalItemID != $PortalItemID">
						<xsl:if test="$SelectedUserIDFilters != 'null'">
							<div id="div_GoalNameFilter" style="float:left;">
								<span class="packageTitle">Program</span>
								<select id="opt_GoalNameTask" class="smallDropdown marginRight10" style="width:120px;"
										onchange="LoadPortalUserTasks_3_0('divTaskFilter', {$PortalItemID}, {$SelectedUserID},1, 'Filter', '', '', '{$SortColName}', '{$SortOrder}');">
									<option value="-99">-Select-</option>
									<xsl:for-each select="$UserTasksFilterXML/Goal[generate-id() = generate-id(key('DistinctUserGoalsFilter', ./GoalItemID)) 
											  and (SuccessKey='BusinessPlanning' or SuccessKey='Coaching' or SuccessKey='Action' or SuccessKey='Worksheets')]">
										<xsl:sort order="ascending" data-type="text" select="GoalItem"/>
										<option value="{GoalItemID}" successKey="{SuccessKey}">
											<xsl:value-of select="GoalItem"/>
										</option>
									</xsl:for-each>
								</select>
							</div>
						</xsl:if>
						<div id="div_CreatorFilter" style="float:left;{$responsibleStyle}">
							<span class="packageTitle">Responsible</span>
							<xsl:variable name="ResponsibleClickFunc">
								<xsl:choose>
									<xsl:when test="$Panel='ActionPlan'">
										<xsl:text>LoadPortalUserTasks_3_0('divTaskFilter',</xsl:text>
										<xsl:value-of select="$PortalItemID"/>
										<xsl:text>,</xsl:text>
										<xsl:value-of select="$SelectedUserIDFilters"/>
										<xsl:text>,1,'Filter', '', '', '</xsl:text>
										<xsl:value-of select="$SortColName"/>
										<xsl:text>','</xsl:text>
										<xsl:value-of select="$SortOrder"/>
										<xsl:text>');</xsl:text>
									</xsl:when>
									<xsl:when test="$SelectedUserIDFilters='null'">
										<xsl:text>LoadPortalUserTasks_3_0('divTaskFilter',</xsl:text>
										<xsl:value-of select="$PortalItemID"/>
										<xsl:text>,</xsl:text>
										<xsl:value-of select="$SelectedUserIDFilters"/>
										<xsl:text>,1,'Filter', '', '', '</xsl:text>
										<xsl:value-of select="$SortColName"/>
										<xsl:text>','</xsl:text>
										<xsl:value-of select="$SortOrder"/>
										<xsl:text>');</xsl:text>
									</xsl:when>
									<xsl:otherwise>
										<xsl:text>LoadPortalUserTasks_3_0('Employee_Operations_Filters',</xsl:text>
										<xsl:value-of select="$PortalItemID"/>
										<xsl:text>, </xsl:text>
										<xsl:value-of select="$SelectedUserIDFilters"/>
										<xsl:text>, 1, 'Header', '', '', '</xsl:text>
										<xsl:value-of select="$SortColName"/>
										<xsl:text>', '</xsl:text>
										<xsl:value-of select="$SortOrder"/>
										<xsl:text>','User');</xsl:text>
									</xsl:otherwise>
								</xsl:choose>
							</xsl:variable>
							<!--<select id="opt_ResponsibleUsersTask" class="smallDropdown marginRight10" style="width:120px;"
								 onchange="LoadPortalUserTasks_3_0('Employee_Operations_Filters', {$PortalItemID}, {$SelectedUserID}, 1, 'Header', '', '', '{$SortColName}', '{$SortOrder}','User');">
								<option value="-99">-Select-</option>
								<xsl:for-each select="$ResponsibleUsersListXML/User">
									<xsl:sort order="ascending" data-type="text" select="DisplayName"/>
									<xsl:choose>
										<xsl:when test="UserID=$DropdownSelectedUserID">
											<option value="{UserID}" selected="">
												<span class="sentenceFont">
													<xsl:value-of select="DisplayName"/>
												</span>
											</option>
										</xsl:when>
										<xsl:otherwise>
											<option value="{UserID}">
												<span class="sentenceFont">
													<xsl:value-of select="DisplayName"/>
												</span>
											</option>
										</xsl:otherwise>
									</xsl:choose>
								</xsl:for-each>
							</select>-->
							<select id="opt_ResponsibleUsersTask" class="smallDropdown marginRight10" style="width:120px;"
									 onchange="{$ResponsibleClickFunc}">
								<option value="-99">-Select-</option>
								<xsl:for-each select="$ResponsibleUsersListXML/User">
									<xsl:sort order="ascending" data-type="text" select="DisplayName"/>
									<xsl:choose>
										<xsl:when test="UserID=$DropdownSelectedUserID">
											<option value="{UserID}" selected="">
												<span class="sentenceFont">
													<xsl:value-of select="DisplayName"/>
												</span>
											</option>
										</xsl:when>
										<xsl:otherwise>
											<option value="{UserID}">
												<span class="sentenceFont">
													<xsl:value-of select="DisplayName"/>
												</span>
											</option>
										</xsl:otherwise>
									</xsl:choose>
								</xsl:for-each>
							</select>
						</div>
					</xsl:if>
				</div>
				<div style="" class="marginBottom10 marginTop10">
					<div class="marginBottom10 marginRight10" style="float:left;">
						<xsl:choose>
							<xsl:when test="translate($IsCompleted, $smallcase, $uppercase)='TRUE'">
								<input checked="" type="checkbox" id="chk_Task_Filter_HideCompleted"
						   onclick="{$SaveFiltersFunc}LoadPortalUserTasks_3_0('divTaskFilter', {$PortalItemID}, {$SelectedUserIDFilters}, 1, 'Filter', '', '', '{$SortColName}', '{$SortOrder}');"></input>
							</xsl:when>
							<xsl:otherwise>
								<input type="checkbox" id="chk_Task_Filter_HideCompleted"
							   onclick="{$SaveFiltersFunc}LoadPortalUserTasks_3_0('divTaskFilter', {$PortalItemID}, {$SelectedUserIDFilters}, 1, 'Filter', '', '', '{$SortColName}', '{$SortOrder}');"></input>
							</xsl:otherwise>
						</xsl:choose>
						<span class="packageTitle">Hide Completed</span>
					</div>
					<div class="marginBottom10 marginRight10" style="float:left;">
						<xsl:choose>
							<xsl:when test="translate($IsMyWorksheet, $smallcase, $uppercase)='TRUE'">
								<input checked="" type="checkbox" id="chk_Task_Filter_HideMyTask"
						   onclick="{$SaveFiltersFunc}LoadPortalUserTasks_3_0('divTaskFilter', {$PortalItemID}, {$SelectedUserIDFilters}, 1, 'Filter', '', '', '{$SortColName}', '{$SortOrder}');"></input>
							</xsl:when>
							<xsl:otherwise>
								<input type="checkbox" id="chk_Task_Filter_HideMyTask"
						   onclick="{$SaveFiltersFunc}LoadPortalUserTasks_3_0('divTaskFilter', {$PortalItemID}, {$SelectedUserIDFilters}, 1, 'Filter', '', '', '{$SortColName}', '{$SortOrder}');"></input>
							</xsl:otherwise>
						</xsl:choose>


						<span class="packageTitle">My Tasks</span>
					</div>

					<div class="marginBottom10" style="float:left;">
						<xsl:choose>
							<xsl:when test="translate($IsThisWeek, $smallcase, $uppercase)='TRUE'">
								<input checked="" type="checkbox" id="chk_Task_Filter_HideThisWeek"
						   onclick="{$SaveFiltersFunc}LoadPortalUserTasks_3_0('divTaskFilter', {$PortalItemID}, {$SelectedUserIDFilters}, 1, 'Filter', '', '', '{$SortColName}', '{$SortOrder}');"></input>
							</xsl:when>
							<xsl:otherwise>
								<input type="checkbox" id="chk_Task_Filter_HideThisWeek"
					   onclick="{$SaveFiltersFunc}LoadPortalUserTasks_3_0('divTaskFilter', {$PortalItemID}, {$SelectedUserIDFilters}, 1, 'Filter', '', '', '{$SortColName}', '{$SortOrder}');"></input>
							</xsl:otherwise>
						</xsl:choose>

						<span class="packageTitle">This Week</span>
					</div>

					<div class="marginBottom10" style="float:left;margin-left: 10px;">
						<xsl:choose>
							<xsl:when test="translate($IsTask, $smallcase, $uppercase)='TRUE'">
								<input checked="checked" type="checkbox" id="chk_Task_Filter_HideTasks" style="display:none"
						   onclick="{$SaveFiltersFunc}LoadPortalUserTasks_3_0('divTaskFilter', {$PortalItemID}, {$SelectedUserIDFilters}, 1, 'Filter', '', '', '{$SortColName}', '{$SortOrder}');"></input>
							</xsl:when>
							<xsl:otherwise>
								<input type="checkbox" checked="checked" id="chk_Task_Filter_HideTasks" style="display:none"
					   onclick="LoadPortalUserTasks_3_0('divTaskFilter', {$PortalItemID}, {$SelectedUserIDFilters}, 1, 'Filter', '', '', '{$SortColName}', '{$SortOrder}');"></input>
							</xsl:otherwise>
						</xsl:choose>

						<span class="packageTitle" style="display:none;">Tasks</span>
					</div>

					<div class="marginBottom10" style="float:left;margin-left: 10px;">
						<xsl:choose>
							<xsl:when test="translate($IsWorksheet, $smallcase, $uppercase)='TRUE'">
								<input checked="" type="checkbox" id="chk_Task_Filter_HideWorksheet"
						   onclick="LoadPortalUserTasks_3_0('divTaskFilter', {$PortalItemID}, {$SelectedUserIDFilters}, 1, 'Filter', '', '', '{$SortColName}', '{$SortOrder}');"></input>
							</xsl:when>
							<xsl:otherwise>
								<input type="checkbox" id="chk_Task_Filter_HideWorksheet"
					   onclick="{$SaveFiltersFunc}LoadPortalUserTasks_3_0('divTaskFilter', {$PortalItemID}, {$SelectedUserIDFilters}, 1, 'Filter', '', '', '{$SortColName}', '{$SortOrder}');"></input>
							</xsl:otherwise>
						</xsl:choose>

						<span class="packageTitle">Worksheets</span>
					</div>
				</div>
			</xsl:if>
			<div id="divTaskFilter">

				<table class="table table-striped VerMid  table-responsive" id="tblTaskFilterFullWidth">
					<tr class="ExpandRow secondrow" >
						<xsl:for-each select="$TaskColumns/Col[Visibility=1]">
							<xsl:variable name="SortType">
								<xsl:choose>
									<xsl:when test="ColName = $SortColName">
										<xsl:choose>
											<xsl:when test="$SortOrder= 'asc'">
												<xsl:text>desc</xsl:text>
											</xsl:when>
											<xsl:otherwise>
												<xsl:text>asc</xsl:text>
											</xsl:otherwise>
										</xsl:choose>
									</xsl:when>
									<xsl:otherwise>
										<xsl:text>asc</xsl:text>
									</xsl:otherwise>
								</xsl:choose>
							</xsl:variable>
							<th class="onMouseOver" onClick="Grid_3_0_Sort('{ColName}','{$SortType}',{$callBack})">
								<xsl:choose>
									<xsl:when test="ColName ='GoalName'">
										<xsl:text>Program</xsl:text>
									</xsl:when>
									<xsl:otherwise>
										<xsl:value-of select="ColDisplayName"/>
									</xsl:otherwise>
								</xsl:choose>
							</th>
						</xsl:for-each>
					</tr>
					<xsl:variable name="GetGoalBySort">
						<xsl:choose>
							<xsl:when test="$SortColName = '' or $SortColName = 'GoalName'">
								<xsl:copy-of select="$TaskRecords/UserActionDetails/GoalName[generate-id() = generate-id(key('GoalName',.))]"/>
							</xsl:when>
							<xsl:when test=" $SortColName = 'TopicName'">
								<xsl:copy-of select="$TaskRecords/UserActionDetails/TopicName[generate-id() = generate-id(key('TopicName',.))]"/>
							</xsl:when>
							<!--<xsl:when test=" $SortColName = 'ActionName'">
								<xsl:copy-of select="$TaskRecords/UserActionDetails/ActionName[generate-id() = generate-id(key('ActionName',.))]"/>
							</xsl:when>-->
							<xsl:when test=" $SortColName = 'ResponsibleName'">
								<xsl:copy-of select="$TaskRecords/UserActionDetails/ResponsibleName[generate-id() = generate-id(key('ResponsibleName',.))]"/>
							</xsl:when>
							<xsl:when test=" $SortColName = 'ActionDueDate'">
								<xsl:copy-of select="$TaskRecords/UserActionDetails/ActionDueDate[generate-id() = generate-id(key('ActionDueDate',.))]"/>
							</xsl:when>
							<xsl:when test="$SortColName = 'Priority'">
								<xsl:copy-of select="$TaskRecords/UserActionDetails/Priority[generate-id() = generate-id(key('PriorityKey',.))]"/>
							</xsl:when>
							<xsl:when test="$SortColName = 'CompletionPercentage'">
								<xsl:copy-of select="$TaskRecords/UserActionDetails/CompletionPercentage[generate-id() = generate-id(key('CompletionPercentageKey',.))]"/>
							</xsl:when>
							<xsl:otherwise>
								<xsl:text></xsl:text>
							</xsl:otherwise>
						</xsl:choose>
					</xsl:variable>
					<xsl:choose>
						<xsl:when test="$GetGoalBySort != ''">
							<xsl:for-each select="msxsl:node-set($GetGoalBySort)/child::node()">
								<xsl:variable name="GroupBy">
									<xsl:value-of select="."/>
								</xsl:variable>
								<tr>
									<td colspan="{count($TaskColumns/Col[Visibility=1])}" class="SpnHeading">
										<xsl:choose>
											<xsl:when test="$SortColName = 'Priority'">
												<span class="star-default glyphicon glyphicon-star star_{$GroupBy}">
												</span>
											</xsl:when>
											<xsl:when test="$SortColName = 'CompletionPercentage'">
												<span style="color: " class="star-default glyphicon circle_{round($GroupBy)}" >
												</span>
											</xsl:when>
											<xsl:otherwise>
												<span>
													<xsl:value-of select="$GroupBy"/>
												</span>
											</xsl:otherwise>
										</xsl:choose>
									</td>
								</tr>
								<xsl:variable name="GetGoalRecordGroupBy">
									<xsl:choose>
										<xsl:when test="$SortColName = 'GoalName'">
											<xsl:copy-of select="$TaskRecords/UserActionDetails[GoalName=$GroupBy]"/>
										</xsl:when>
										<xsl:when test="$SortColName = 'TopicName'">
											<xsl:copy-of select="$TaskRecords/UserActionDetails[TopicName=$GroupBy]"/>
										</xsl:when>
										<!--<xsl:when test="$SortColName = 'ActionName'">
											<xsl:copy-of select="$TaskRecords/UserActionDetails[ActionName=$GroupBy]"/>
										</xsl:when>-->
										<xsl:when test="$SortColName = 'ResponsibleName'">
											<xsl:copy-of select="$TaskRecords/UserActionDetails[ResponsibleName=$GroupBy]"/>
										</xsl:when>
										<xsl:when test="$SortColName = 'ActionDueDate'">
											<xsl:copy-of select="$TaskRecords/UserActionDetails[ActionDueDate=$GroupBy]"/>
										</xsl:when>
										<xsl:when test="$SortColName = 'Priority'">
											<xsl:copy-of select="$TaskRecords/UserActionDetails[Priority=$GroupBy]"/>
										</xsl:when>
										<xsl:when test="$SortColName = 'CompletionPercentage'">
											<xsl:copy-of select="$TaskRecords/UserActionDetails[CompletionPercentage=$GroupBy]"/>
										</xsl:when>
										<xsl:otherwise>
											<xsl:copy-of select="$TaskRecords/UserActionDetails[GoalName=$GroupBy]"/>
										</xsl:otherwise>
									</xsl:choose>
								</xsl:variable>
								<xsl:variable name="GoalCount">
									<xsl:value-of select="count($TaskColumns/Col[Visibility=1])"/>
								</xsl:variable>
								<xsl:for-each select="msxsl:node-set($GetGoalRecordGroupBy)/child::node()">
									<xsl:call-template name="TaskRecords">
										<xsl:with-param name="CurrentRecordRow" select="."></xsl:with-param>
										<xsl:with-param name="TaskColumns" select="$TaskColumns"></xsl:with-param>
										<xsl:with-param name="PortalItemID" select="$PortalItemID"></xsl:with-param>
										<xsl:with-param name="SelectedUserID" select="$SelectedUserID"></xsl:with-param>
										<xsl:with-param name="List" select="$List"></xsl:with-param>
										<xsl:with-param name="LoggedInUser" select="$LoggedInUser"></xsl:with-param>
										<xsl:with-param name="ResponsibleID" select="$ResponsibleID"></xsl:with-param>
										<xsl:with-param name="ResponsibleUsersListXML" select="$ResponsibleUsersListXML"></xsl:with-param>
										<xsl:with-param name="GoalPermList" select="$GoalPermList"></xsl:with-param>
										<xsl:with-param name="DivID" select="$DivID"></xsl:with-param>
										<xsl:with-param name="Mode" select="$Mode"></xsl:with-param>
									</xsl:call-template>
								</xsl:for-each>
							</xsl:for-each>
						</xsl:when>
						<xsl:otherwise>
							<xsl:for-each select="$TaskRecords/UserActionDetails">
								<xsl:call-template name="TaskRecords">
									<xsl:with-param name="CurrentRecordRow" select="."></xsl:with-param>
									<xsl:with-param name="TaskColumns" select="$TaskColumns"></xsl:with-param>
									<xsl:with-param name="PortalItemID" select="$PortalItemID"></xsl:with-param>
									<xsl:with-param name="SelectedUserID" select="$SelectedUserID"></xsl:with-param>
									<xsl:with-param name="List" select="$List"></xsl:with-param>
									<xsl:with-param name="LoggedInUser" select="$LoggedInUser"></xsl:with-param>
									<xsl:with-param name="ResponsibleID" select="$ResponsibleID"></xsl:with-param>
									<xsl:with-param name="ResponsibleUsersListXML" select="$ResponsibleUsersListXML"></xsl:with-param>
									<xsl:with-param name="GoalPermList" select="$GoalPermList"></xsl:with-param>
									<xsl:with-param name="DivID" select="$DivID"></xsl:with-param>
									<xsl:with-param name="Mode" select="$Mode"></xsl:with-param>
								</xsl:call-template>
							</xsl:for-each>
						</xsl:otherwise>
					</xsl:choose>
				</table>
				<!--Paging start here-->

				<xsl:if test="$TotalPages &gt;= $CurrentPageNumber and $PageSize !=-99 and $TotalPages !=1">
					<xsl:call-template name="PagingTemplate">
						<xsl:with-param name="CurrentPageNumber" select="$CurrentPageNumber"></xsl:with-param>
						<xsl:with-param name="PortalItemID" select="$PortalItemID"></xsl:with-param>
						<xsl:with-param name="SelectedUserID" select="$SelectedUserIDFilters"></xsl:with-param>
						<xsl:with-param name="PrevPageNo" select="$PrevPageNo"></xsl:with-param>
						<xsl:with-param name="SortColName" select="$SortColName"></xsl:with-param>
						<xsl:with-param name="SortOrder" select="$SortOrder"></xsl:with-param>
						<xsl:with-param name="TotalPages" select="$TotalPages"></xsl:with-param>
						<xsl:with-param name="NextPageNo" select="$NextPageNo"></xsl:with-param>
						<xsl:with-param name="Mode" select="$Mode"></xsl:with-param>
						<xsl:with-param name="TaskCategory" select="$TaskCategory"></xsl:with-param>
						<xsl:with-param name="GoalClassification" select="$GoalClassification"></xsl:with-param>

						<xsl:with-param name="IsCompleted" select="$IsCompleted"></xsl:with-param>
						<xsl:with-param name="DefaultLoad" select="$DefaultLoad"></xsl:with-param>
						<xsl:with-param name="IsMyWorksheet" select="$IsMyWorksheet"></xsl:with-param>
						<xsl:with-param name="IsThisWeek" select="$IsThisWeek"></xsl:with-param>
						<xsl:with-param name="IsTask" select="$IsTask"></xsl:with-param>
						<xsl:with-param name="IsWorksheet" select="$IsWorksheet"></xsl:with-param>
						<xsl:with-param name="DivID" select="$DivID"></xsl:with-param>
					</xsl:call-template>
				</xsl:if>
				<!--Paging end here-->
			</div>
		</div>
	</xsl:template>
	<xsl:template name="TaskRecords">
		<xsl:param name="CurrentRecordRow" select="'N/A'"></xsl:param>
		<xsl:param name="TaskColumns" select="'N/A'"></xsl:param>
		<xsl:param name="PortalItemID" select="'N/A'"></xsl:param>
		<xsl:param name="SelectedUserID" select="'N/A'"></xsl:param>
		<xsl:param name="List" select="'N/A'"></xsl:param>
		<xsl:param name="LoggedInUser" select="'N/A'"></xsl:param>
		<xsl:param name="ResponsibleID" select="'N/A'"></xsl:param>
		<xsl:param name="ResponsibleUsersListXML" select="'N/A'"></xsl:param>
		<xsl:param name="GoalPermList" select="'N/A'"></xsl:param>
		<xsl:param name="DivID" select="'N/A'"></xsl:param>
		<xsl:param name="Mode" select="'N/A'"></xsl:param>
		<tr  class="ExpandRow paddingNone" >
			<xsl:for-each select="$TaskColumns/Col[Visibility=1]">
				<!--<xsl:variable name="DataToggle">
					<xsl:text>dropdown</xsl:text>
				</xsl:variable>-->
				<xsl:variable name="CompletionPercentage">
					<xsl:value-of select="$CurrentRecordRow/CompletionPercentage"/>
				</xsl:variable>
				<xsl:variable name="TypeID">
					<xsl:value-of select="$CurrentRecordRow/TypeID"/>
				</xsl:variable>
				<xsl:variable name="DataToggleCP">
					<xsl:choose>
						<xsl:when test="$TypeID != 14">
							<xsl:text>dropdown</xsl:text>
						</xsl:when>
					</xsl:choose>
				</xsl:variable>
				<xsl:variable name="SuccessKey">
					<xsl:value-of select="$CurrentRecordRow/SuccessKey"/>
				</xsl:variable>
				<xsl:variable name="PortalTypeID">
					<xsl:value-of select="$CurrentRecordRow/PortalTypeID"/>
				</xsl:variable>
				<xsl:variable name="ImageURL">
					<xsl:value-of select="$CurrentRecordRow/ImageURL"/>
				</xsl:variable>
				<xsl:variable name="CurrentGoalItemID">
					<xsl:value-of select="$CurrentRecordRow/GoalItemID"/>
				</xsl:variable>
				<xsl:variable name="CurrentActionItemID">
					<xsl:value-of select="$CurrentRecordRow/ActionItemID"/>
				</xsl:variable>
				<xsl:variable name="CurrentColName">
					<xsl:value-of select="ColName"/>
				</xsl:variable>
				<xsl:variable name="CurrentColValue">
					<xsl:value-of select="$CurrentRecordRow/child::node()[name(.) = $CurrentColName]"/>
				</xsl:variable>
				<xsl:variable name="OnClickDueDate">
					<xsl:text>dp('div_item_</xsl:text>
					<xsl:value-of select="$CurrentActionItemID"></xsl:value-of>
					<xsl:text>_title_content_subTitle', 'div_item_</xsl:text>
					<xsl:value-of select="$CurrentActionItemID"></xsl:value-of>
					<xsl:text>_title_content_subTitle')</xsl:text>
				</xsl:variable>
				<xsl:variable name="OnClickLoadSlideBar">
					<xsl:text>viewItemDetailVersion3(</xsl:text>
					<xsl:value-of select="$CurrentActionItemID"></xsl:value-of>
					<xsl:text>,</xsl:text>
					<xsl:value-of select="$CurrentGoalItemID"></xsl:value-of>
					<xsl:text>, 'div_item_</xsl:text>
					<xsl:value-of select="$CurrentActionItemID"></xsl:value-of>
					<xsl:text>_detail_container', 'div_item_</xsl:text>
					<xsl:value-of select="$CurrentActionItemID"></xsl:value-of>
					<xsl:text> ', '2.0', 'view','MMDDYY');</xsl:text>
				</xsl:variable>
				<xsl:variable name="CurrentDueDateState">
					<xsl:value-of select="$CurrentRecordRow/DueDateState"/>
				</xsl:variable>
				<xsl:variable name="CircleColor">
					<xsl:choose>
						<xsl:when test="$CurrentDueDateState='Current'">
							<xsl:text>circle</xsl:text>
						</xsl:when>
						<xsl:otherwise>
							<xsl:text>circle_yellow</xsl:text>
						</xsl:otherwise>
					</xsl:choose>
				</xsl:variable>
				<xsl:choose>
					<xsl:when test="$CurrentColName ='ActionDueDate'">
						<td onclick="" class="onMouseOver">
							<div id="div_item_{$CurrentActionItemID}"  goalitemid="{$CurrentGoalItemID}">
								<div  onclick="{$OnClickDueDate}"
									  id="div_item_{$CurrentActionItemID}_title_content_subTitle"
									  name="&lt;OperationalData&gt;&lt;Version&gt;2.0&lt;/Version&gt;
											  &lt;ItemID&gt;{$CurrentActionItemID}&lt;/ItemID&gt;&lt;GoalID&gt;{$CurrentGoalItemID}&lt;/GoalID&gt;
											  &lt;Mode&gt;GoalDetailTask30&lt;/Mode&gt;
											  &lt;ItemDivPrefix&gt;div_item_{$CurrentActionItemID}&lt;/ItemDivPrefix&gt;
											  &lt;/OperationalData&gt;">
									<a id="div_item_{$CurrentActionItemID}_title_container" href="javascript:void(0);">
										<span id="div_item_{$CurrentActionItemID}_title_container">
											<xsl:choose>
												<xsl:when test="$CurrentColValue !=''">
													<xsl:value-of select="$CurrentColValue"/>
												</xsl:when>
												<xsl:otherwise>
													<xsl:text>Set Due Date</xsl:text>
												</xsl:otherwise>
											</xsl:choose>

										</span>
									</a>
								</div>
							</div>
						</td>
					</xsl:when>
					<xsl:when test="$CurrentColName='GoalName'">
						<xsl:variable name="EscapedCurrentColValue">
							<xsl:call-template name="replaceCharsInString">
								<xsl:with-param name="stringIn" select="$CurrentColValue"></xsl:with-param>
								<xsl:with-param name="charsIn">
									<xsl:text>'</xsl:text>
								</xsl:with-param>
								<xsl:with-param name="charsOut">
									<xsl:text>\'</xsl:text>
								</xsl:with-param>
							</xsl:call-template>
						</xsl:variable>
						<xsl:variable name="ProgramLoadGoalFunction">
							<xsl:choose>
								<xsl:when test="$Mode='ManagerProgram' or $Mode='ManagerProgramScroll'">
									<xsl:text>loadGoal_3_0(</xsl:text>
									<xsl:value-of select="$CurrentGoalItemID"></xsl:value-of>
									<xsl:text>,'</xsl:text>
									<xsl:value-of select="$DivID"></xsl:value-of>
									<xsl:text>','</xsl:text>
									<xsl:value-of select="$EscapedCurrentColValue"></xsl:value-of>
									<xsl:text>','</xsl:text>
									<xsl:value-of select="$ImageURL"></xsl:value-of>
									<xsl:text>','</xsl:text>
									<xsl:value-of select="$SuccessKey"></xsl:value-of>
									<xsl:text>','</xsl:text>
									<xsl:value-of select="$PortalTypeID"></xsl:value-of>
									<xsl:text>',</xsl:text>
									<xsl:value-of select="$PortalItemID"></xsl:value-of>
									<xsl:text>,'</xsl:text>
									<xsl:value-of select="$SelectedUserID"></xsl:value-of>
									<xsl:text>','SameWindow');</xsl:text>
								</xsl:when>
								<xsl:otherwise>
									<xsl:text></xsl:text>
								</xsl:otherwise>
							</xsl:choose>
						</xsl:variable>

						<td onclick="{$ProgramLoadGoalFunction}" class="onMouseOver">
							<span id="spanTask_Goal_{$CurrentActionItemID}">
								<xsl:value-of select="$CurrentColValue"/>
							</span>
						</td>
					</xsl:when>

					<xsl:when test="$CurrentColName='ResponsibleName'">
						<xsl:variable name="OnClickClass">
							<xsl:choose>
								<xsl:when test="$CurrentColName ='CompletionPercentage'">
									<xsl:text>onMouseOver</xsl:text>
								</xsl:when>
								<xsl:otherwise>
									<xsl:text></xsl:text>
								</xsl:otherwise>
							</xsl:choose>
						</xsl:variable>
						<td  class="onMouseOver">
							<xsl:variable name="ShowHideTask">
								<xsl:text>ShowHideTask('ddlTask_Responsible_</xsl:text>
								<xsl:value-of select="$CurrentActionItemID"></xsl:value-of>
								<xsl:text>','spanTask_Responsible_</xsl:text>
								<xsl:value-of select="$CurrentActionItemID"></xsl:value-of>
								<xsl:text>');</xsl:text>
							</xsl:variable>
							<span   onmouseover="this.style.textDecoration = 'underline';"
						  onmouseout="this.style.textDecoration = 'none';" class="{$OnClickClass}" id="spanTask_Responsible_{$CurrentActionItemID}"
													onclick="{$ShowHideTask}">
								<xsl:choose>
									<xsl:when test="$CurrentColValue = ''">
										<xsl:text>Set Responsible</xsl:text>
									</xsl:when>
									<xsl:when test="$LoggedInUser=$SelectedUserID">
										<xsl:text>Me</xsl:text>
									</xsl:when>
									<xsl:otherwise>
										<xsl:value-of select="$CurrentColValue"/>
									</xsl:otherwise>
								</xsl:choose>
							</span>
							<select style="display:none" class="AddNewUser_{$CurrentGoalItemID}" id="ddlTask_Responsible_{$CurrentActionItemID}" onchange="UpdateTaskResponsible_3_0('ddlTask_Responsible_{$CurrentActionItemID}', '{$CurrentActionItemID}', '{$CurrentGoalItemID}', 'spanTask_Responsible_{$CurrentActionItemID}');">
								<option value="-99">Select</option>
								<xsl:for-each select="$GoalPermList/GoalPermission[GoalItemID=$CurrentGoalItemID]">
									<xsl:variable name="ResponsibleName">
										<xsl:choose>
											<xsl:when test="$LoggedInUser=UserID">
												<xsl:text>Me</xsl:text>
											</xsl:when>
											<xsl:otherwise>
												<xsl:value-of select="DisplayName"/>
											</xsl:otherwise>
										</xsl:choose>
									</xsl:variable>
									<xsl:choose>
										<xsl:when test="$ResponsibleID = UserID">
											<option value="{UserID}" selected="">
												<xsl:value-of select="$ResponsibleName"/>
											</option>
										</xsl:when>
										<xsl:otherwise>
											<option value="{UserID}">
												<xsl:value-of select="$ResponsibleName"/>
											</option>
										</xsl:otherwise>
									</xsl:choose>
								</xsl:for-each>
								<option value="-1">More...</option>
							</select>
						</td>
					</xsl:when>
					<xsl:when test="$CurrentColName='ActionName'">
						<td onclick="{$OnClickLoadSlideBar}" class="onMouseOver">
							<span  id="span_Item_{$CurrentActionItemID}" >
								<xsl:value-of select="$CurrentColValue"/>
							</span>
						</td>
					</xsl:when>
					<xsl:when test="$CurrentColName='Priority'">
						<td  class="onMouseOver">
							<div class="col-md-12" >
								<div class="btn-group">
									<button type="button" class="multiselect dropdown-toggle btn padinone" data-toggle="dropdown" title="" aria-expanded="false" style="width: auto;">
										<span class="star-default glyphicon glyphicon-star star_{$CurrentColValue}"  id="span_{$CurrentColName}_{$CurrentActionItemID}"></span>
										<!--<b class="caret"></b>-->
									</button>
									<ul class=" dropdown-menu {$CurrentColName}" id="ddl_{$CurrentColName}_{$CurrentActionItemID}" previousValue="{$CurrentColValue}">
										<xsl:for-each select="$List/Priority/Option">

											<xsl:variable name="OnClickPriority">

												<xsl:text>UpdateItemPriority_3_0('</xsl:text>
												<xsl:value-of select="$CurrentActionItemID"></xsl:value-of>
												<xsl:text>','</xsl:text>
												<xsl:value-of select="Value"></xsl:value-of>
												<xsl:text>')</xsl:text>

											</xsl:variable>

											<xsl:choose>
												<xsl:when test="Value=$CurrentColValue">
													<li class="active" val="{Value}">
														<a href="javascript:void(0);" onclick="{$OnClickPriority}">
															<label class="radio" style="padding-left: 0px;">
																<span class="glyphicon glyphicon-star star_{Value}" ></span>
															</label>
														</a>
													</li>
												</xsl:when>
												<xsl:otherwise>
													<li class="" val="{Value}">
														<a href="javascript:void(0);" onclick="{$OnClickPriority}">
															<label class="radio" style="padding-left: 0px;">
																<span class="glyphicon glyphicon-star star_{Value}" ></span>
															</label>
														</a>
													</li>
												</xsl:otherwise>
											</xsl:choose>
										</xsl:for-each>
									</ul>
								</div>
							</div>
						</td>
					</xsl:when>
					<xsl:when test="$CurrentColName='CompletionPercentage'">
						<xsl:variable name="worksheetCPClick">
							<xsl:choose>
								<xsl:when test="$TypeID = 14">
									<xsl:text>resetSliderClass();viewItemDetailVersion3('</xsl:text>
									<xsl:value-of select="$CurrentActionItemID"/>
									<xsl:text>', '</xsl:text>
									<xsl:value-of select="$CurrentGoalItemID"/>
									<xsl:text>', 'div_item_</xsl:text>
									<xsl:value-of select="$CurrentActionItemID"/>
									<xsl:text>_detail_container', 'div_item_</xsl:text>
									<xsl:value-of select="$CurrentActionItemID"/>
									<xsl:text>','2.0', 'view');</xsl:text>
								</xsl:when>
							</xsl:choose>
						</xsl:variable>

						<td onclick="{$worksheetCPClick}" class="onMouseOver">
							<div class="col-md-12">
								<div  class="btn-group">
									<button type="button" class="multiselect dropdown-toggle btn padinone" data-toggle="{$DataToggleCP}" title="" style="width: auto;" aria-expanded="false" >
										<span style="color: " class="star-default glyphicon {$CircleColor}_{round($CurrentColValue)}" id="span_{$CurrentColName}_{$CurrentActionItemID}">
										</span>
									</button>

									<ul class="dropdown-menu {$CurrentColName}" id="ddl_Brief_{$CurrentColName}_{$CurrentActionItemID}" previousValue="{$CurrentColValue}">
										<xsl:if test="$TypeID!=14">
											<xsl:for-each select="$List/CompletionPercentage/Option">
												<xsl:variable name="OnClickCP">
													<xsl:choose>
														<xsl:when test="$TypeID != 14">
															<xsl:text>UpdateItemCompletionPercentage_3_0('</xsl:text>
															<xsl:value-of select="$CurrentActionItemID"/>
															<xsl:text>','</xsl:text>
															<xsl:value-of select="Value"/>
															<xsl:text>','</xsl:text>
															<xsl:value-of select="$CircleColor"/>
															<xsl:text>');</xsl:text>
														</xsl:when>

													</xsl:choose>
												</xsl:variable>
												<xsl:choose>
													<xsl:when test="Value=$CompletionPercentage">
														<li class="active" val="{round($CompletionPercentage)}">
															<a href="javascript:void(0);" onclick="{$OnClickCP}" >
																<label class="radio" style="padding-left: 0px;">
																	<span class="glyphicon {$CircleColor}_{round(Value)}" style="color: " ></span>
																</label>
															</a>
														</li>
													</xsl:when>
													<xsl:otherwise>
														<li class="" val="{round(Value)}">
															<a href="javascript:void(0);" onclick="{$OnClickCP}">
																<label class="radio" style="padding-left: 0px;">
																	<span class="glyphicon {$CircleColor}_{round(Value)}" style="color: " ></span>
																</label>
															</a>
														</li>
													</xsl:otherwise>
												</xsl:choose>
											</xsl:for-each>
										</xsl:if>
									</ul>
								</div>
							</div>
						</td>
					</xsl:when>
					<xsl:otherwise>
						<td onclick="{$OnClickLoadSlideBar}" class="onMouseOver">
							<span class="" id="span_{$CurrentColName}_{$CurrentActionItemID}">
								<xsl:value-of select="$CurrentColValue"/>
							</span>
						</td>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:for-each>
		</tr>
	</xsl:template>
	<xsl:template name="PagingTemplate">
		<xsl:param name="CurrentPageNumber" select="'N/A'"></xsl:param>
		<xsl:param name="PortalItemID" select="'N/A'"></xsl:param>
		<xsl:param name="SelectedUserID" select="'N/A'"></xsl:param>
		<xsl:param name="PrevPageNo" select="'N/A'"></xsl:param>
		<xsl:param name="SortColName" select="'N/A'"></xsl:param>
		<xsl:param name="SortOrder" select="'N/A'"></xsl:param>
		<xsl:param name="TotalPages" select="'N/A'"></xsl:param>
		<xsl:param name="NextPageNo" select="'N/A'"></xsl:param>
		<xsl:param name="Mode" select="'N/A'"></xsl:param>
		<xsl:param name="TaskCategory" select="'N/A'"></xsl:param>
		<xsl:param name="GoalClassification" select="'N/A'"></xsl:param>

		<xsl:param name="IsCompleted" select="'N/A'"></xsl:param>
		<xsl:param name="DefaultLoad" select="'N/A'"></xsl:param>
		<xsl:param name="IsMyWorksheet" select="'N/A'"></xsl:param>
		<xsl:param name="IsThisWeek" select="'N/A'"></xsl:param>
		<xsl:param name="IsTask" select="'N/A'"></xsl:param>
		<xsl:param name="IsWorksheet" select="'N/A'"></xsl:param>
		<xsl:param name="DivID" select="'N/A'"></xsl:param>
		<xsl:variable name="PreviousFunction">
			<xsl:choose>
				<xsl:when test="$Mode='ManagerProgram' or $Mode='ManagerProgramScroll'">
					<xsl:text>loadBasePortalUserTasks_Base_3_0('</xsl:text>
					<xsl:value-of select="$DivID"/>
					<xsl:text>',</xsl:text>
					<xsl:value-of select="$PortalItemID"></xsl:value-of>
					<xsl:text>,</xsl:text>
					<xsl:value-of select="$SelectedUserID"></xsl:value-of>
					<xsl:text>,</xsl:text>
					<xsl:value-of select="$PrevPageNo"></xsl:value-of>
					<xsl:text>,	'ManagerProgramScroll',null,null,null,'</xsl:text>
					<xsl:value-of select="$SortColName"></xsl:value-of>
					<xsl:text>','</xsl:text>
					<xsl:value-of select="$SortOrder"></xsl:value-of>
					<xsl:text>',null,null,'</xsl:text>
					<xsl:value-of select="$IsCompleted"></xsl:value-of>
					<xsl:text> ','</xsl:text>
					<xsl:value-of select="$DefaultLoad"></xsl:value-of>
					<xsl:text>','</xsl:text>
					<xsl:value-of select="$IsMyWorksheet"></xsl:value-of>
					<xsl:text>','</xsl:text>
					<xsl:value-of select="$IsThisWeek"></xsl:value-of>
					<xsl:text>','</xsl:text>
					<xsl:value-of select="$IsTask"></xsl:value-of>
					<xsl:text>','</xsl:text>
					<xsl:value-of select="$IsWorksheet"></xsl:value-of>
					<xsl:text>',</xsl:text>
					<xsl:value-of select="$SelectedUserID"></xsl:value-of>
					<xsl:text>,null,'</xsl:text>
					<xsl:value-of select="$TaskCategory"></xsl:value-of>
					<xsl:text>','</xsl:text>
					<xsl:value-of select="$GoalClassification"/>
					<xsl:text>');</xsl:text>

				</xsl:when>
				<xsl:otherwise>
					<xsl:text>LoadPortalUserTasks_3_0('divTaskFilter',</xsl:text>
					<xsl:value-of select="$PortalItemID"></xsl:value-of>
					<xsl:text>,</xsl:text>
					<xsl:value-of select="$SelectedUserID"></xsl:value-of>
					<xsl:text>,</xsl:text>
					<xsl:value-of select="$PrevPageNo"></xsl:value-of>
					<xsl:text>, 'Scroll', '', '', '</xsl:text>
					<xsl:value-of select="$SortColName"></xsl:value-of>
					<xsl:text>', '</xsl:text>
					<xsl:value-of select="$SortOrder"></xsl:value-of>
					<xsl:text>');</xsl:text>
				</xsl:otherwise>
			</xsl:choose>
		</xsl:variable>
		<xsl:variable name="NextFunction">
			<xsl:choose>
				<xsl:when test="$Mode='ManagerProgram' or $Mode='ManagerProgramScroll'">
					<xsl:text>loadBasePortalUserTasks_Base_3_0('</xsl:text>
					<xsl:value-of select="$DivID"/>
					<xsl:text>',</xsl:text>
					<xsl:value-of select="$PortalItemID"></xsl:value-of>
					<xsl:text>,</xsl:text>
					<xsl:value-of select="$SelectedUserID"></xsl:value-of>
					<xsl:text>,</xsl:text>
					<xsl:value-of select="$NextPageNo"></xsl:value-of>
					<xsl:text>,	'ManagerProgramScroll',null,null,null,'</xsl:text>
					<xsl:value-of select="$SortColName"></xsl:value-of>
					<xsl:text>','</xsl:text>
					<xsl:value-of select="$SortOrder"></xsl:value-of>
					<xsl:text>',null,null,'</xsl:text>
					<xsl:value-of select="$IsCompleted"></xsl:value-of>
					<xsl:text>','</xsl:text>
					<xsl:value-of select="$DefaultLoad"></xsl:value-of>
					<xsl:text>','</xsl:text>
					<xsl:value-of select="$IsMyWorksheet"></xsl:value-of>
					<xsl:text>','</xsl:text>
					<xsl:value-of select="$IsThisWeek"></xsl:value-of>
					<xsl:text>','</xsl:text>
					<xsl:value-of select="$IsTask"></xsl:value-of>
					<xsl:text>','</xsl:text>
					<xsl:value-of select="$IsWorksheet"></xsl:value-of>
					<xsl:text>',</xsl:text>
					<xsl:value-of select="$SelectedUserID"></xsl:value-of>
					<xsl:text>,null,'</xsl:text>
					<xsl:value-of select="$TaskCategory"></xsl:value-of>
					<xsl:text>','</xsl:text>
					<xsl:value-of select="$GoalClassification"/>
					<xsl:text>');</xsl:text>
				</xsl:when>
				<xsl:otherwise>
					<xsl:text>LoadPortalUserTasks_3_0('divTaskFilter',</xsl:text>
					<xsl:value-of select="$PortalItemID"></xsl:value-of>
					<xsl:text>,	</xsl:text>
					<xsl:value-of select="$SelectedUserID"></xsl:value-of>
					<xsl:text>,	</xsl:text>
					<xsl:value-of select="$NextPageNo"></xsl:value-of>
					<xsl:text>, 'Scroll', '', '', '</xsl:text>
					<xsl:value-of select="$SortColName"></xsl:value-of>
					<xsl:text>', '</xsl:text>
					<xsl:value-of select="$SortOrder"></xsl:value-of>
					<xsl:text>');</xsl:text>
				</xsl:otherwise>
			</xsl:choose>
		</xsl:variable>
		<div class="publicationSummary">
			<table class="tableMaster" cellpadding="2" cellspacing="0" align="center">
				<tr>
					<td class="verticallyMiddle textCenter" width="1%">
						<xsl:if test="$CurrentPageNumber &gt; 1">
							<!--<a href="javascript:void(0);" onClick="LoadPortalUserTasks_3_0('divTaskFilter', {$PortalItemID}, {$SelectedUserID}, {$PrevPageNo}, 'Scroll', '', '', '{$SortColName}', '{$SortOrder}');">
								<xsl:text>&lt;</xsl:text>
							</a>-->
							<a href="javascript:void(0);" onClick="{$PreviousFunction}">
								<xsl:text>&lt;</xsl:text>
							</a>
						</xsl:if>
					</td>
					<td class="verticallyMiddle textCenter" width="1%">
						<span>Page</span>
					</td>
					<td class="verticallyMiddle textCenter" width="1%">
						<span>
							<xsl:value-of select="$CurrentPageNumber"></xsl:value-of>
						</span>
					</td>
					<td class="verticallyMiddle textCenter" width="1%">
						<span>of</span>
					</td>
					<td class="verticallyMiddle textCenter" width="1%">
						<span>
							<xsl:value-of select="$TotalPages"/>
						</span>
					</td>

					<td class="verticallyMiddle textCenter" width="1%">
						<xsl:if test="$CurrentPageNumber &lt; $TotalPages">
							<!--<a href="javascript:void(0);" onClick="LoadPortalUserTasks_3_0('divTaskFilter', {$PortalItemID}, {$SelectedUserID}, {$NextPageNo}, 'Scroll', '', '', '{$SortColName}', '{$SortOrder}');">
								<xsl:text>&gt;</xsl:text>
							</a>-->
							<a href="javascript:void(0);" onClick="{$NextFunction}">
								<xsl:text>&gt;</xsl:text>
							</a>
						</xsl:if>
					</td>
					<td width="94%">
					</td>
				</tr>
			</table>
		</div>

	</xsl:template>
</xsl:stylesheet>
