{include file="header.tpl"}

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

<div class="mainContent">
<h1>{$smarty.const.CALCULATE_HEADER}</h1>

<p>
{$smarty.const.LOAN_CALCULATE_PRICE} {$smarty.const.CURRENCY_SYMBOL}{$price|number_format:2:".":","}<br /> 
{$smarty.const.LOAN_CALCULATE_DOWN} {$smarty.const.CURRENCY_SYMBOL}{$down_payment|number_format:2:".":","}<br /> 
{$smarty.const.LOAN_CALCULATE_PRINCIPAL} {$smarty.const.CURRENCY_SYMBOL}{$total_principal|number_format:2:".":","}<br /> 
{$smarty.const.LOAN_CALCULATE_INTEREST} {$smarty.const.CURRENCY_SYMBOL}{$total_interest|number_format:2:".":","}, {$smarty.const.LOAN_CALCULATE_RATE} {$annual_interest_rate}%<br /> 
{$smarty.const.LOAN_CALCULATE_TOTAL} {$smarty.const.CURRENCY_SYMBOL}{$total_loan_amount|number_format:2:".":","}<br /> 

{if $Weekly}{$smarty.const.CURRENCY_PAY_WEEK} {$smarty.const.CURRENCY_SYMBOL}{$period_payment|number_format:2:".":","}{/if}
{if $Bi_weekly}{$smarty.const.CURRENCY_PAY_BI_WEEK} {$smarty.const.CURRENCY_SYMBOL}{$period_payment|number_format:2:".":","}{/if}
{if $Monthly}{$smarty.const.CURRENCY_PAY_MONTH} {$smarty.const.CURRENCY_SYMBOL}{$period_payment|number_format:2:".":","}{/if}
</p>

<fieldset>
	<legend>{$smarty.const.CALCULATE_LEGEND}</legend>
		<form action="paycalc.php" method="post">
			<p>{$smarty.const.CALCULATE_PRICE_ENTER_HELP}</p>
			<p><label for="loan_amount">{$smarty.const.LOAN_AMOUNT}</label>
			<input id="loan_amount" name="loan_amount" type="text" size="15" maxlength="10" value="{$formprice}" />
			</p>

			<p><label for="amount_down">{$smarty.const.AMOUNT_DOWN}</label>
			<input id="amount_down" name="amount_down" type="text" size="15" maxlength="10" value="{$formamount}" />
			</p>

			<p><label for="loan_length">{$smarty.const.LOAN_LENGTH}</label>
			<input id="loan_length" name="loan_length" type="text" size="15" maxlength="10" value="{$formlength}" />
			 Years
			</p>			
			
			<p><label for="interest_rate">{$smarty.const.INTEREST}</label>
			<input id="interest_rate" name="interest_rate" type="text" size="6" maxlength="6" value="{$forminterest}" />
			 %
			</p>
			
			<p><label for="term">{$smarty.const.TERM}</label>
			<select id="term" name="term" size="1">
				<option value="Weekly"{if $Weekly} selected="selected"{/if}>{$smarty.const.CURRENCY_PAY_WEEK}</option>
				<option value="Bi_weekly"{if $Bi_weekly} selected="selected"{/if}>{$smarty.const.CURRENCY_PAY_BI_WEEK}</option>
				<option value="Monthly"{if $Monthly} selected="selected"{/if}>{$smarty.const.CURRENCY_PAY_MONTH}</option>
			</select>
			</p>
			
			<p><input name="submit" type="submit" value="{$smarty.const.LOAN_CALC}" />
			</p>
			<p class="center_align">{$smarty.const.LOAN_DISCLAIMER}
			</p>
		</form>
</fieldset>

</div>

{include file="footer.tpl"}