{include file="layouts/forceLoggedIn.tpl"}
{assign var="pgLayout" value="layouts/withLeftNav.tpl"}
<h1>{$page.title}</h1>

<table>
<tr><td valign="top">
	<img src="blank.gif" width="1" height="1" alt="" class="iconHikers" /> 
	<p>It is important to have harmony in your life.  Social, intellectual, physical, emotional enrichment can contibute to greater health and satisfaction.  Use the links below to learn more about important lifestyle activies.</p>
	<br />
	{include_php file="shared_handle:company/lifestyleSurveyList"}
	<blockquote>
	<table>
	<tr><td colspan="2">
		<h3>Available Surveys:</h3></td>
	    <td valign="middle"></td></tr>
	{foreach from=$surveys item=item name="loopSurveys"}<tr><td nowrap>
	<tr><td valign="top" nowrap="nowrap">
		{if $item.dateAvailable gt 0}
			<img class="icoSurvey" src="blank.gif" width="1" height="1" alt="" border="0" /></td>
		   <td valign="top"><b><u>{$item.surveyName}</u>:</b> {if $item.frequency eq "Once"}Taken{elseif (($item.dateAvailable - $smarty.now) < 43000)}<small>Available At:</small> {$item.dateAvailable|date_format2:"g:i A"}{else}<small>Available On:</small> {$item.dateAvailable|date_format2:"m/d/y"}{/if}<br />
			{$item.feedbackTitle|default:"No feedback available."}<br />
			<a href="?pg=my_feedback&surveyId={$item.id}">Click here to learn more<b><i>!</i></b></a><br />
			<br /></td>
		   <td valign="middle" align="right"><em>{$item.pointsEarned}</em></td></tr>
		{else}
			<a href="javascript://" onclick="openSurvey({$item.id});"><img class="icoSurvey" src="blank.gif" width="1" height="1" alt="" border="0" /></a></td>
		   <td valign="top" nowrap="nowrap"><b><u>{$item.surveyName}</u>:</b> <a href="javascript://" onclick="openSurvey({$item.id});">Available Now</a><br />
			{$item.feedbackTitle|default:"No feedback available."}<br />
			<a href="?pg=my_feedback&surveyId={$item.id}">Click here to learn more<b><i>!</i></b></a><br />
			<br /></td>
		   <td valign="middle" align="right"><em>{$item.pointsEarned}</em></td></tr>
		{/if}
	{foreachelse}
	<tr><td valign="top" colspan="3">
		None found.</td></tr>
	{/foreach}
	</table>
	</blockquote>
</td><td valign="top" align="right">
	<img src="{$skinFolder}images/headache.jpg" align="right" alt="" class="img1" /><br />
</td></tr>
</table>