{include file="header.tpl"}

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

<div class="mainContent">

<h1>{$smarty.const.CONTACT_US_HEADER}</h1>

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

<p>{$smarty.const.CONTACT_TOP}</p>

<fieldset>
	<legend>{$smarty.const.CONTACT_LEGEND}</legend>
		<form action="contact.php" method="post" id="contact"> 
			<h2>{$smarty.const.CONTACT_DETAILS}</h2>
			<p {if $from_user_error}class="error"{/if}><label for="from_name">{$smarty.const.NAME}</label>
			<input id="from_name" name="from_name" type="text" size="40" maxlength="50" value="{$formfromname}" />
			</p>
			<p><label for="company">{$smarty.const.COMPANY_NAME}</label>
			<input id="company" name="company" type="text" size="40" maxlength="50" value="{$formcompany}" />
			</p>
			<p><label for="phone">{$smarty.const.PHONE}</label>
			<input id="phone" name="phone" type="text" size="30" maxlength="15" value="{$formphone}" />
			</p>
			<p {if $from_mail_error}class="error"{/if}><label for="from_email">{$smarty.const.EMAIL}</label>
			<input id="from_email" name="from_email" type="text" size="40" maxlength="60" value="{$formfromemail}" />
			</p>

			<h2>{$smarty.const.CONTACT_INFO}</h2>
			<p {if $subject_error}class="error"{/if}><label for="subject">{$smarty.const.SUBJECT}</label>
			<input id="subject" name="subject" type="text" size="30" maxlength="60" value="{$formsubject}" />
			</p>
			<p {if $msg_error}class="error"{/if}><label for="msg">{$smarty.const.MESSAGE}</label>
			<textarea id="msg" name="msg" cols="35" rows="4">{$formmsg}</textarea>
			</p>

			<p><label for="code">{$smarty.const.CODE}</label>
			<img id="code" src="Captcha.php" />
			</p>
			<p {if $cap_error}class="error"{/if}><label for="captcha">{$smarty.const.CAPTCHA}</label>
			<input id="captcha" name="captcha" type="text" />
			</p>
			
			<p><input name="submit" type="submit" value="{$smarty.const.SUBMIT}" />
			{$smarty.const.REQUIRED}
			{if $seller}
			<input id="seller" name="seller" type="hidden" value="{$seller}" />
			<input id="listing" name="listing" type="hidden" value="{$record}" />
			{/if}
			</p>
			<!-- <p><input name="member" type="checkbox" value="1" />{$smarty.const.CONTACT_MEMBER}</p> -->
			<p><input name="news" type="checkbox" checked="checked" value="1" />{$smarty.const.CONTACT_NEWSLETTER}</p>
		</form>
</fieldset>
                 	   
</div>

{include file="footer.tpl"}