{assign var="hideWidgets" value=0}
{assign var="pgLayout" value="file:./layouts/comp_layout2.tpl"}
{if $competition.userId eq $user->id or $acm->isDomainAdmin()}
	{assign var="isManager" value="true"}
	{include_php file="shared_handle:competition.manageTeams"}
	{include_php file="shared_handle:competition.managePlayers"}
{/if}

{include_php file="shared_handle:competition.load"}
{include_php file="shared_handle:competition.verifyInitialPot"}
<div id="jackpot">${$competition.potAmount|number_format:2}</div>
<h1 class="underline">{$competition.title|default:"Competition Title"}</h1>

{* ******************************** COMPETITION END *********************************** *}
{if $competition.endDate lt $smarty.now}   {* COMPETITION IS OVER *}
	{if $competition.results.winners|@count eq 1}
		{* There was one winner, either by scoringMethod or tieBreakerMethod *}

		{math assign="daysOfCompetition" equation="(x - y) / z" x=$competition.endDate y=$competition.startDate z="86400"}
		{math assign="marginOfVictory" equation="x - y" x=$competition.results.winningStat y=$competition.results.secondPlaceStat}

		{foreach from=$competition.results.winners item="winnerData" key="winnerName"}
			
			<h2><br /><b>{$winnerName}</b> wins{if $competition.potAmount} <b>${$competition.potAmount|number_format:2}</b>{/if}!</h2>
			<br />
			{if not $competition.results.isTie}   {* Not a Tie *}
				After a difficult <b>{$daysOfCompetition|number_format:0}</b> days of weight loss rumble, <b>{$winnerName}</b> is the Winner! Based on <b>{$competition.results.winningMethod}</b>, <b>{$winnerName}</b> wins after losing <b>{$competition.results.winningStat|number_format:2} {if $competition.results.winningMethod eq "Weight Lost"}pounds{else}% body weight{/if}</b>.
			{else}                                {* A Tie! *}
				{assign var="weightLost" value="Weight Lost"}
				{assign var="percentLost" value="Percentage Weight Lost"}
				After a difficult <b>{$daysOfCompetition|number_format:0}</b> days of weight loss rumble, there was a tie in the judging method, <b>{$competition.scoringMethod}</b>. To break this tie, the selected tie breaking method, <b>{$competition.tieBreakerMethod}</b>, was used to determine <b>{$winnerName}</b> as the winner. <b>{$winnerName}</b> lost <b>{$winnerData.$weightLost|number_format:0} pounds</b>, which was <b>{$winnerData.$percentLost|number_format:4}%</b> body weight.
			{/if}
			<br />
			<br />
			<b>{$winnerName}</b> won with a <b>{$marginOfVictory|number_format:4}</b> margin over {foreach from=$competition.results.losers item="loser" key="loserName"}<b>{$loserName}</b>{php}break;{/php}{/foreach}.
			
			<h2><br />Congratulations to you all!</h2>
			<br />
			<hr />
		{/foreach}

	{elseif $competition.results.winners|@count gt 1}
		{* There were multiple winners, even after tieBreakerMethod (should RARELY happen) *}
	
		<h2>There was a tie in this competition. The winners, by <b>{$competition.results.winningMethod}</b> having lost <b>{$competition.results.winningStat}</b>, are:<br /></h2>
		<ul>
		{foreach from=$competition.results.winners item="winnerData" key="winnerName"}
			<li>{$winnerName}</li>
		{/foreach}
		</ul>
		
	{else}
		{* For some reason, there were no winners *}

		<h2><br />Sorry, we were unable to determine the winner of this competition! This may have been caused by an error.<br /><br /></h2>
	{/if}
	This competition has ended and is no longer active.<br />
{/if}
{* ************************************************************************************ *}

<div id="prizeDesc">{$competition.potDescription}<br />
{if $competition.potAmount}<small>(${$competition.individualPotAmount} from {$competition.potMethod})</small>{/if}</div>

{if $competition.startDate lt $smarty.now}
	Time remaining: <b>{$competition.timeLeft}</b><br />
{else}
	This competition has not yet started!<br />
{/if}

Start{if $competition.startDate lt $smarty.now}ed{else}s{/if}: <b>{$competition.startDate|date_format2:"n/j/Y"}</b> &nbsp; 
End{if $competition.endDate lt $smarty.now}ed{else}s{/if}: <b>{$competition.endDate|date_format2:"n/j/Y"}</b></br>
<div style="font-size:5px;clear:left;">&nbsp;</div>
{assign var="scoringMethod" value=$competition.scoringMethod}
{assign var="tieBreakerMethod" value=$competition.tieBreakerMethod}
{assign var="weeklyWinnersMethod1" value=$competition.weeklyWinnersMethod1}
{assign var="weeklyWinnersMethod2" value=$competition.weeklyWinnersMethod2}

{* ******************** WEEKLY WINNERS ********************* *}
{if $competition.weeklyWinners and $acm->isDomainAdmin()}
	{if $weeklyWinnersMethod1}             {* DON'T FORGET TO REMOVE THE ACM CHECK WHEN READY!!! *}
		<h2 class="withBG">
			<div class="topRight hideShow">
			<a href="javascript:toggle('weeklyWinners', '', 'showHide');"><img id="weeklyWinners_img" src="./img/blank.gif" class="showHide_on" alt="show/hide" border="0" /></a></div>
			Last Weeks Winners<i>!</i> <small style="color:#000; font-size:11px;">(<i><b>{$competition.weeklyWinners.startDate|date_format2:"D n/j"}</b> through <b>{$competition.weeklyWinners.endDate|date_format2:"D n/j"}</b></i>)</small></h2> 
		<div id="weeklyWinners">
		<table width="100%" cellpadding="3" cellspacing="0"><tr>
		<td valign="top" width="50%">
		<div class="cellHeadLarge" style="width:auto;float:none;">{$weeklyWinnersMethod1}</div>
		<img src="{$skinFolder}images/winner_1.gif" style="float:left;" />
		{strip}
		{foreach name="method1" from=$competition.weeklyWinners.$weeklyWinnersMethod1 item="username"}
			{assign var="userValue" value=$competition.weeklyWinners.users.$username.$weeklyWinnersMethod1}
			{if $smarty.foreach.method1.iteration gt 3 OR $userValue lte 0}<i>!</i>{php}break;{/php}
			{elseif $smarty.foreach.method1.iteration eq 1}
				<b>{$username|default:"[ ?? ]"|ucfirst}</b> led the way last week by 
				{if $weeklyWinnersMethod1 eq 'Weight Lost'}losing <b>{$userValue}</b> pounds{elseif $weeklyWinnersMethod1 eq 'Percentage Weight Lost'}losing <b>{$userValue}% of thier body weight{elseif $weeklyWinnersMethod1 eq 'Minutes Exercise'}exercising <b>{$userValue}</b> minutes{elseif $weelyWinnersMethod1 eq 'Distance Exercised'}exercising <b>{$userValue}</b> miles{elseif $weeklyWinnersMethod1 eq 'Weight Gained'}gaining <b>{$userValue}</b> pounds{else}<b>default</b>{/if}
			{else}
				{if $smarty.foreach.method1.iteration eq 2}, followed by <b>{$username|default:"[ ?? ]"|ucfirst}</b> with 
				{else}, and then <b>{$username|default:"[ ?? ]"|ucfirst}</b> with 
				{/if}
				{if $weeklyWinnersMethod1 eq 'Weight Lost'}<b>{$userValue}</b> pounds{elseif $weeklyWinnersMethod1 eq 'Percentage Weight Lost'}<b>{$userValue}%{elseif $weeklyWinnersMethod1 eq 'Minutes Exercise'}<b>{$userValue}</b> minutes{elseif $weelyWinnersMethod1 eq 'Distance Exercised'}<b>{$userValue}</b> miles{elseif $weeklyWinnersMethod1 eq 'Weight Gained'}<b>{$userValue}</b> pounds{/if}
			{/if}
		{/foreach}
		{/strip}
		</td>
	{/if}
	{if $weeklyWinnersMethod2} 
		<td valign="top" width="50%">
		<div class="cellHeadLarge" style="width:auto;float:none;">{$weeklyWinnersMethod2}</div>
		<img src="{$skinFolder}images/winner_2.gif" style="float:left;" />
		{strip}
		{foreach name="method2" from=$competition.weeklyWinners.$weeklyWinnersMethod2 item="username"}
			{assign var="userValue" value=$competition.weeklyWinners.users.$username.$weeklyWinnersMethod2}
			{if $smarty.foreach.method2.iteration gt 3 OR $userValue lte 0}<i>!</i>{php}break;{/php}
			{elseif $smarty.foreach.method2.iteration eq 1}
				<b>{$username|default:"[ ?? ]"|ucfirst}</b> won by 
				{if $weeklyWinnersMethod2 eq 'Weight Lost'}losing <b>{$userValue}</b> pounds{elseif $weeklyWinnersMethod2 eq 'Percentage Weight Lost'}losing <b>{$userValue}% of thier body weight{elseif $weeklyWinnersMethod2 eq 'Minutes Exercise'}exercising <b>{$userValue}</b> minutes{elseif $weelyWinnersMethod2 eq 'Distance Exercised'}exercising <b>{$userValue}</b> miles{elseif $weeklyWinnersMethod2 eq 'Weight Gained'}gaining <b>{$userValue}</b> pounds{/if}
			{else}
				{if $smarty.foreach.method2.iteration eq 2}, followed by <b>{$username|default:"[ ?? ]"|ucfirst}</b> with 
				{else}, and then <b>{$username|default:"[ ?? ]"|ucfirst}</b> with 
				{/if}
				{if $weeklyWinnersMethod2 eq 'Weight Lost'}<b>{$userValue}</b> pounds{elseif $weeklyWinnersMethod2 eq 'Percentage Weight Lost'}<b>{$userValue}%{elseif $weeklyWinnersMethod2 eq 'Minutes Exercise'}<b>{$userValue}</b> minutes{elseif $weelyWinnersMethod2 eq 'Distance Exercised'}<b>{$userValue}</b> miles{elseif $weeklyWinnersMethod2 eq 'Weight Gained'}<b>{$userValue}</b> pounds{/if}
			{/if}
		{/foreach}
		{/strip}
		</td>
	{/if}
	{if $weeklyWinnersMethod1}
	</tr></table></div>{/if}
{/if}
{* ********************************************************* *}

{if $acm->isDomainAdmin() and $smarty.request.debug}
	{display var=$competition}
{/if} 

{* ******************************** COMPARISON GRAPHS ***************************************** *}

<h2 class="withBG"><a name="graph"></a>
	<div class="topRight hideShow">
		<a href="javascript:toggle('graphs', '', 'showHide');"><img id="graphs_img" src="./img/blank.gif" class="showHide_on" alt="show/hide" border="0" /></a></div> 
	Comparison Graphs &nbsp; <small><i>No graph? <a href="http://www.macromedia.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" target="_blank">click here</a> to download the free Flash Player plug-in.</i></small></h2>
<div id="graphs" style="display:block;">
	<table border="0" cellpadding="0" width="100%">
	{if $competition.scoringMethod eq "Distance Exercised"}
		{assign var="graphURL" value="?pg=flashgraph-frame&compId=`$competition.id`&type=distanceExercised&fillPrevious=0&precision=1&totalChange=0&format=wide"}
	{elseif $competition.scoringMethod eq "Minutes Exercise"}
		{assign var="graphURL" value="?pg=flashgraph-frame&compId=`$competition.id`&type=minutesExercise&fillPrevious=0&precision=1&totalChange=0&format=wide"}
	{else}  {* weight lost, percent lost, weight gained, etc... *}
		{assign var="graphURL" value="?pg=flashgraph-frame&compId=`$competition.id`&type=weight&fillPrevious=1&precision=0&totalChange=1&format=wide"}
	{/if}
	<tr>
		<td><div style="border:#999 1px solid;background-color:#FFF;padding:5px;"><iframe name="graphwindow" src="{$graphURL}" frameborder="0" width="625" height="220" scrollbars="no"></iframe></div></td>
	</tr>
	<tr>
		<td valign="top" align="center" width="100%">
		<small><a href="?pg=flashgraph-frame&compId={$competition.id}&type=weight&fillPrevious=1&precision=0&totalChange=1&format=wide" target="graphwindow">Change in Weight</a> |
		<a href="?pg=flashgraph-frame&compId={$competition.id}&type=weight&fillPrevious=1&precision=0&format=wide" target="graphwindow">Weight</a> |
		<a href="?pg=flashgraph-frame&compId={$competition.id}&type=fat&fillPrevious=0&precision=1&format=wide" target="graphwindow">Fat Intake</a> |
		<a href="?pg=flashgraph-frame&compId={$competition.id}&type=calories&fillPrevious=0&precision=1&format=wide" target="graphwindow">Calorie Intake</a> |
		<a href="?pg=flashgraph-frame&compId={$competition.id}&type=carbs&fillPrevious=0&precision=1&format=wide" target="graphwindow">Carb Intake</a> |
		<a href="?pg=flashgraph-frame&compId={$competition.id}&type=minutesExercise&fillPrevious=0&precision=1&format=wide" target="graphwindow">Exercise Minutes</a> |
		<a href="?pg=flashgraph-frame&compId={$competition.id}&type=distanceExercised&fillPrevious=0&precision=1&format=wide" target="graphwindow">Distance Exercised</a>
		</small></td>
	</tr>
	{* <tr>
		<td colspan="2">
			<h3 class="withBG">Compare With Stars!</h3>
			<div>To graphically and numerically compare to different "stars", click a 
				category and select one or more stars (hold down the CTRL or SHIFT 
				key to select/deselect multiple) then click the "Compare Now!" 
				button below. When you do, the graph above will be updated to include
				the selected "stars" and you will see a comparison window appear below
				to show how you compare.</div>

			<!-- This DIV is initially Empty. Will contain IFRAME of comparison view. -->
			<div id="compareFrameDiv" style="width:375px; display:none;"><iframe name="compareFrame" src="?pg=compare-frame" frameborder="0" width="375" height="180" scrollbars="no"></iframe></div>

			<table xwidth="99%" cellspacing="1" cellpadding="1">
			<tr>
			<td xwidth="45%" align="center">
				<div class="chunk" style="width:150px;">
					<a href="javascript://" onclick="toggle('players');" class="button">Players</a>
					<div id="players" style="display:block;">
						<select size="6" id="comparePlayers" name="compare[players]" style="width:100%">
						{if $competition.style eq 'Group-vs-Group'}
							{foreach from=$competition.teams item="teams" key="teamName"}
								{foreach from=$teams.users item="users" key="userName"}
									{if $users.hideInitialWeight neq "Yes" OR $users.id eq $user->id}<option value="{$users.id}">{$userName}</option>{/if}
								{/foreach}
							{/foreach}
						{else}
							{foreach from=$competition.users item="users" key="username" name="dateUpdated"}
								{if $users.hideInitialWeight neq "Yes" OR $users.id eq $user->id}<option value="{$users.id}">{$username}</option>{/if}
							{/foreach}
						{/if}
						</select>
					</div>
				</div>
			</td>
			<td xwidth="10%" style="border-left:1px solid #CCC; border-right:1px solid #CCC;" valign="middle" align="center"><b>Versus</b></td>
			<td xwidth="45%" align="center">
				<div class="chunk" style="width:150px;">
					<a href="javascript://" onclick="toggle('animals');" class="button">Animals</a>
					<div id="animals" style="display:none;">
						<select size="6" id="compareAnimals" multiple="multiple" name="compare[animals]" style="width:100%;">
						{foreach from=$stars.animals item="row"}
							<option value="{$row.id}">{$row.name}</option>
						{/foreach}
						</select>
					</div>
				</div>
				<div class="chunk" style="width:150px;">
					<a href="javascript://" onclick="toggle('athletes');" class="button">Athletes</a>
					<div id="athletes" style="display:none;">
						<select size="6" id="compareAthletes" multiple="multiple" name="compare[athletes]" style="width:100%;">
						{foreach from=$stars.athletes item="row"}
							<option value="{$row.id}">{$row.name}</option>
						{/foreach}
						</select>
					</div>
				</div>
				<div class="chunk" style="width:150px;">
					<a href="javascript://" onclick="toggle('movies');" class="button">Movie Stars</a>
					<div id="movies" style="display:none;">
						<select size="6" id="compareMovies" multiple="multiple" name="compare[movies]" style="width:100%;">
						{foreach from=$stars.movies item="row"}
							<option value="{$row.id}">{$row.name}</option>
						{/foreach}
						</select>
					</div>
				</div>
				<div class="chunk" style="width:150px;">
					<a href="javascript://" onclick="toggle('politics');" class="button">Politicians</a>
					<div id="politics" style="display:none;">
						<select size="6" id="comparePolitics" multiple="multiple" name="compare[politics]" style="width:100%;">
						{foreach from=$stars.politics item="row"}
							<option value="{$row.id}">{$row.name}</option>
						{/foreach}
						</select>
					</div>
				</div>
			</td>
			</tr>
			<tr>
			<td colspan="3" align="center">
				<br /><a href="#graph" class="button" onclick="goCompareGraph();"> &nbsp; &gt; Compare Now! &lt; &nbsp; </a><br />
			</td>
			</table>
		</td>
	</tr> *}
	</table>
<br />
</div>

{*   comparisons currently disabled
{include_php file="shared_handle:getStarStats"}

<script language="javascript">{literal}

function goCompareGraph() {
	var elementIds = Array('compareAnimals', 'compareAthletes', 'compareMovies', 'comparePolitics');
	var obj = '';
	var ids = '';

	for (var a = 0; a < elementIds.length; a++) {
		obj = document.getElementById(elementIds[a]);

		for (var x = 0; x < obj.options.length; x++) {
			if (obj.options[x].selected)
				ids += obj.options[x].value + ',';
		}
	}

	if (ids) {
		ids = ids.replace(/\,$/, '');
		var url = '?pg=flashgraph-frame&compId={/literal}{$competition.id}{literal}&type=weight&fillPrevious=1&precision=0&stars=' + ids;
		graphwindow.location.replace(url);

		// Now update the content of the compare frame.
		obj = document.getElementById('compareFrameDiv');
		obj.style.display = 'block';
		
		obj = document.getElementById('comparePlayers');
		var userIds = '';

		for (var x = 0; x < obj.options.length; x++)
			if (obj.options[x].selected)
				userIds += obj.options[x].value;

		compareFrame.location.replace('?pg=compare-frame&stars=' + ids + '&userId=' + userIds);
	} else {
		alert ('Click on one of the categories to the left and select as many "stars" as you would like.\n\nTo select multiple "stars", hold down the SHIFT or CTRL key while clicking on their names.\n\nWhen finished, click this link again to see the comparison.');
	}
}

{/literal}</script>
*}  {* End commented out comparison stuff *}

{* ******************************** GROUP TEAMS/PLAYERS SUMMARY W/MOVING ***************************************** *}
{if $competition.style eq 'Group-vs-Group'}
<h2 class="withBG">
	<div class="topRight hideShow">
		<a href="javascript:toggle('teams', '', 'showHide');"><img id="teams_img" src="./img/blank.gif" class="showHide_on" alt="show/hide" border="0" /></a></div> 
	The Teams &nbsp; <small><i>Assignments and statistics</i></small></h2>
<div id="teams" style="display:block;">
<table cellpadding="0" cellspacing="0" width="100%" border="0"><tr><td>
	{if $isManager}
		<form name="changeTeam" action="index.php" method="POST" style="margin:0px;">
			<input type="hidden" name="pg" value="{$page.name}">
			<input type="hidden" name="cid" value="{$competition.id}">
			<input type="hidden" name="no_expire" value="true">
	{/if}
		{assign var="minEx" value="Minutes Exercise"}
		{assign var="distEx" value="Distance Exercised"}
		{assign var="pctLst" value="Percentage Weight Lost"}
		{assign var="wtLst" value="Percentage Weight Lost"}
		{foreach from=$competition.teams item="teams" key="teamName"}
			{counter name="counterI" start="0" print=0}
			<div id="playersList{counter}" style="float:left;width:280px;overflow:hidden;word-wrap:nowrap; margin:0px 5px 5px 0px;">
			<h4>{if $teams.name eq "Waiting to Join"}Not assigned to a team{else}{$teams.name|default:"&nbsp;"}{/if}</h4>
		{if $scoringMethod|regex_match:"/exercise/i"}
			<span class="cellHeadLarge">Name</span>
			<span class="cellHeadSmall">Min.</span>
			<span class="cellHeadSmall">Dist.</span>
			<span class="cellHeadSmall">Update</span><br />
			{foreach from=$teams.users item="users" key="userName"}
				<span class="cellLarge" style="text-align:left;"><small>{if $isManager}<input type="checkbox" name="changeTeam[players][{$userName}]" style="width:14px;height:14px;margin:0px 2px;" />{/if}{$userName}</small></span>
				<span class="cellSmall"><small>{$users.$minEx|default:"-"|replace:".00":""}</small></span>
				<span class="cellSmall"><small>{$users.$distEx|default:"-"|replace:".00":""}</small></span>
				<span class="cellSmall"><small>{$users.dateOfEntry|date_format2:"n/j/y"|default:"-"}</small></span>
			{foreachelse}
				{* No players assigned to this team. *}
			{/foreach}
		{else}
			{* display var=$users *}
			<span class="cellHeadLarge">Name</span>
			<span class="cellHeadTiny">Wt.</span>
			<span class="cellHeadTiny">{if $scoringMethod eq "Percentage Weight Lost"}%
						{elseif $scoringMethod eq "Weight Lost"}Lost
						{elseif $scoringMethod eq "Weight Gained"}Gain
						{else}Lbs{/if}</span>
			<span class="cellHeadTiny">{if $scoringMethod eq "Percentage Weight Lost"}Lost{else}%{/if}</span>
			<span class="cellHeadSmall">Update</span><br />
			{foreach from=$teams.users item="users" key="userName"}
				<span class="cellLarge" style="text-align:left;"><small>{if $isManager}<input type="checkbox" name="changeTeam[players][{$userName}]" style="width:14px;height:14px;margin:0px 2px;" />{/if}{$userName}</small></span>
				<span class="cellTiny"><small>{if $users.hideInitialWeight neq "Yes"}{if $users.CurrentWeight eq ''}-{else}{$users.CurrentWeight}{/if}{else}Hidden{/if}</small></span>
				<span class="cellTiny"><small>{if $scoringMethod eq "Percentage Weight Lost"}{$users.$scoringMethod|number_format:"2"|replace:".00":""}{else}{$users.$scoringMethod|default:"-"|replace:".00":""}{/if}</small></span>
				<span class="cellTiny"><small>{if $scoringMethod eq "Percentage Weight Lost"}{$users.$wtLost|default:"-"|replace:".00":""}{else}{if $users.hideInitialWeight neq "Yes"}{$users.$pctLst|number_format:"2"|replace:".00":""}{else}-{/if}{/if}</small></span>
				<span class="cellSmall"><small>{$users.dateOfEntry|date_format2:"n/j/y"|default:"-"}</small></span>
			{foreachelse}
				{* No players assigned to this team. *}
			{/foreach}
		{/if}
			</div>
		{/foreach}
	{if $isManager}
		<br />
		<select name="changeTeam[team]">
			<option value="">Move selected players to...</option>
			{foreach from=$competition.teams item="newTeams" key="newTeamName"}
				{*if $newTeams.name ne $teams.name and $newTeams.name ne "Waiting to Join"*}
				{if $newTeams.name ne "Waiting to Join"}
					<option value="{$newTeams.name}">{$newTeams.name}</option>
				{/if}
			{/foreach}
		</select><br />
		<input type="submit" class="button" value="Submit Changes">
		</form>
	{/if}
</td></tr></table>
</div>
{/if}

{* ********************** LEADERS ******************************* *}
{* <div class="chunk300">
<h2 class="withBG">Leaders</h2>
<div id="leadersList" class="contentColumn">
	<span class="cellHeadLarge">{if $competition.style eq 'Group-vs-Group'}# of members{else}Competitor{/if}</span
	><span class="cellHeadSmall">{if $scoringMethod eq "Percentage Weight Lost"}% Lost{elseif $scoringMethod eq "Weight Lost"}lbsLost{elseif $scoringMethod eq "Weight Gained"}lbsGain{elseif $scoringMethod eq "Minutes Exercise"}Min.{elseif $scoringMethod eq "Distance Exercised"}Dist.{/if}</span
	><br />
{if $competition.style eq 'Group-vs-Group'}
	{foreach from=$competition.teams item="compUser" key="username"}
	<span class="cell"><small>{$compUser.userCount}</small></span><br />
	{/foreach}
{else}
	{foreach from=$competition.users item="compUser" key="username" name="leaders"}
	{*$smarty.foreach.leaders.iteration* }<span class="cellLarge"><small>{$username}</small></span>
	<span class="cellSmall"><small>{if $scoringMethod eq "Percentage Weight Lost"}{$compUser.$scoringMethod|number_format:"2"} %{else}{$compUser.$scoringMethod}{/if}</small></span><br />
	{/foreach}
{/if}
</div> *}