{* TEMPORARY FIX *}
{assign var="targetPage" value="my_home"}
{if $user->isLoggedIn()}
	{store_messages}
	{redirect href="index.php?pg=`$targetPage`"}
{else}
{assign var="hideLogin" value="true"}
<table align="center" width="305" cellpadding="0" cellspacing="0">
<tr><td align="center">
	<h2>{$smarty.session.company.companyName}</h2>
</td></tr>
<tr><td>
	<div align="center" class="chunk300">
		{if $smarty.session.company.preferences.hide_login eq "yes"}
			<p>Direct Log-In has been disabled, you must log in from the company site.  If you have any questions please contact our support department.</p>
		{else}
		<form name="loginForm2" method="post" action="index.php" style="margin:3px;">
		<input type="hidden" name="pg" value="{$targetPage}" />
		<input type="hidden" name="return" value="{$smarty.request.return|default:$signup.return|default:"home"}" />
		<input type="hidden" name="no_expire" value="true" />
		<input type="hidden" name="forgotPassword" value="" />
	
		<h2 class="withBG">Log In:</h2>
			Username: <input id="usernameBox2" type="text" name="username" value="{$smarty.request.username}" class="textInput" size="12" /><br />
			Password: <input type="password" name="password" class="textInput" size="12" /><br />
			<div class="underline">&nbsp;</div>
			<a href="javascript:document.forms['loginForm2'].submit();">Submit</a> | <a href="javascript:doForgotPassword('usernameBox2', 'loginForm2');">Forgot Password?</a>
			<input type="submit" name="loginSubmit" value="Submit" style="position:absolute; top:-300px; left:-300px;" />
		</form>
		<script language="javascript">
			document.forms.loginForm2.username.focus();
		</script>
		{/if}
	</div>
</td></tr>
<tr><td align="right">
	<br />
	{if $smarty.session.company.companyName}
		<small>Not registered yet?</small> <a href="?pg=signup/begin">Sign Up Now!</a> &nbsp;
	{else}
		<!-- Place holder for sign up info content. -->
	{/if}
</td></tr>
</table>
{/if}