{assign var="pgLayout" value="file:layouts/blank.tpl"}
{include_php file="shared_handle:estats/userEntry"}

{capture name="headExtra"}
<script language="javascript">{literal}
function xWindow(name, w, h, x, y, loc, men, res, scr, sta, too)
{
  var f = '';
  if (w && h) {
    if (document.layers) f = 'screenX=' + x + ',screenY=' + y;
    else f = 'left=' + x + ',top=' + y;
    f += ',width=' + w + ',height=' + h + ',';
  }
  f += ('location='+loc+',menubar='+men+',resizable='+res
    +',scrollbars='+scr+',status='+sta+',toolbar='+too);
  this.features = f;
  this.name = name;
  this.load = function(sUrl) {
    if (this.wnd && !this.wnd.closed) this.wnd.location.href = sUrl;
    else this.wnd = window.open(sUrl, this.name, this.features);
    this.wnd.focus();
    return false;
  }
}
winUpdater = new xWindow('nutritionWin', 750, 500, 10, 10, 'yes', 'no', 'yes', 'yes', 'yes', 'no');
{/literal}</script>
{/capture}

{if $userInfo.id}

<div style="position:absolute; width:100px; height:100px; left:100px; right:100px; background-color:#FFFF99; font-size:14pt;" onmouseover="this.style.display='none';">
	Update your stats here!
</div>	

<form name="updateForm" method="post" action="index.php" style="margin:0px;">
<input type="hidden" name="pg" value="{$page.name}">
<input type="hidden" name="no_expire" value="true">
<input type="hidden" name="start" value="{$smarty.request.start}">
<input type="hidden" name="userId" value="{$smarty.request.userId}">

<h2 class="withBG">
	<div class="topRight hideShow">
		<a href="javascript:toggle('statsUpdateTable', '', 'showHide');updateParentHeight();"><img id="statsUpdateTable_img" src="blank.gif" class="showHide_on" alt="show/hide" border="0" /></a>
	</div>
	Update Stats{if $userInfo.id neq $user->id} For: {$userInfo.firstName} {$userInfo.lastName} ({$userInfo.username}){/if}
</h2>
<table id="statsUpdateTable" cellpadding="2" cellspacing="2" style="display:block;">
<tr>
	<td colspan="4" align="left"><div>{if $lastWeek}<a class="button" href="?pg={$page.name}&start={$lastWeek}&userId={$userInfo.id}">&lt; Previous Week</a>{/if}</div></td>
	<td colspan="4" align="right"><div>{if $nextWeek}<a class="button" href="?pg={$page.name}&start={$nextWeek}&userId={$userInfo.id}">Next Week &gt;</a>{/if}</div></td>
</tr>
<tr>
	<td class=""><div>&nbsp;</div></td>
