{include file="header.tpl"}

<div id="sidebar">
{include file="sidebar.tpl"}
</div>

<div class="mainContent">
<h1>{$smarty.const.REGISTER}</h1>
	<p>{$smarty.const.REGISTER_NEW}</p>

{if $success}
	<p class="green"><strong>{$success}</strong></p>
{elseif $error_message}
	<p class="red"><strong>{$error_message}</strong></p>
{/if}

<fieldset>
	<legend>{$smarty.const.NEW_REGISTER_LEGEND}</legend>
		<form action="register.php" method="post">
			<h2>{$smarty.const.REGISTER_DETAILS}</h2>
			<p {if $user_error}class="error"{/if}><label for="user">{$smarty.const.USERNAME}</label>
			<input id="user" name="user" type="text" size="30" maxlength="30" value="{$formuser}" />
			</p>
			<p {if $pass_error}class="error"{/if}><label for="pass">{$smarty.const.PASSWORD}</label>
			<input id="pass" name="pass" type="password" size="30" maxlength="30" value="" />
			</p>
			<p {if $mail_error}class="error"{/if}><label for="email">{$smarty.const.EMAIL}</label>
			<input id="email" name="email" type="text" size="35" maxlength="50" value="{$formemail}" />
			</p>

			<h2>{$smarty.const.PERSONAL_LEGEND}</h2>
			<p><label for="first_name">{$smarty.const.FIRST_NAME}</label>
			<input id="first_name" name="first_name" type="text" size="30" maxlength="30" value="{$first_name}" />
			</p>
			<p><label for="last_name">{$smarty.const.LAST_NAME}</label>
			<input id="last_name" name="last_name" type="text" size="30" maxlength="30" value="{$last_name}" />
			</p>
			<p><label for="phone">{$smarty.const.PHONE}</label>
			<input id="phone" name="phone" type="text" size="30" maxlength="30" value="{$phone}" />
			</p>
			<p><label for="alt_phone">{$smarty.const.ALT_PHONE}</label>
			<input id="alt_phone" name="alt_phone" type="text" size="30" maxlength="30" value="{$alt_phone}" />
			</p>
			<p><label for="fax">{$smarty.const.FAX}</label>
			<input id="fax" name="fax" type="text" size="30" maxlength="30" value="{$fax}" />
			</p>

			<p><input name="submit" type="submit" value="{$smarty.const.SUBMIT}" />
			<a href="login.php">{$smarty.const.BACK_TO_LOGIN}</a><br />
			<input type="checkbox"  value="agree" name="agree" {if $formagree}checked="checked"{/if} />
			{$smarty.const.TOS_AGREE}
			</p>

			<p>{$smarty.const.REQUIRED}
			</p>
	</form>
</fieldset>

</div>

{include file="footer.tpl"}