{if $user->isLoggedIn()}
	{redirect href="index.php?pg=myhome"}
{else}
{assign var="hideLogin" value="true"}
	<div align="center" style="width:300px;">
		<div class="chunk300">
			<form name="loginForm2" method="post" action="index.php" style="margin:3px;">
			<input type="hidden" name="pg" value="{$page.name}" />
			<input type="hidden" name="return" value="{$smarty.request.return|default:$signup.returndefault:"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" class="textInput" size="12" /><br />
				Password: <input type="password" name="password" class="textInput" size="12" /><br />
				<div class="underline">&nbsp;</div>
				<input type="submit" name="submit" value="Submit" style="position:absolute; top:-300px; left:-300px;" />
				<a href="javascript:document.loginForm2.submit();">Submit</a> | <a href="javascript:doForgotPassword('usernameBox2', 'loginForm2');">Forgot Password?</a>
			</form>
			<script language="javascript">
				document.forms.loginForm2.username.focus();
			</script>
		</div>
	</div>
	<div align="right" style="clear:left;">
		<a href="?pg=signup/begin">Sign Up Now!</a>
	</div>
{/if}