{include file="header.tpl"}

<h3>Support Form</h3>

{if $frm.say == 'send'}

<div class="ok">Message has been successfully sent. We will back to you in next 24 hours. Thank you.</div>

{else}


{if $errors}
<ul class="error">
{section name=e loop=$errors}
{if $errors[e].name == 'turing'}<li> Invalid turing image provided.</li>{/if}
{/section}
</ul>
{/if}

<script type="text/javascript">
{literal}
function checkform() {
  if (document.mainform.name.value == '') {
    alert("Please type your full name!");
    document.mainform.name.focus();
    return false;
  }
  if (document.mainform.email.value == '') {
    alert("Please enter your e-mail address!");
    document.mainform.email.focus();
    return false;
  }
  if (document.mainform.message.value == '') {
    alert("Please type your message!");
    document.mainform.message.focus();
    return false;
  }
  return true;
}
{/literal}
</script>

<form method=post name=mainform onsubmit="return checkform()" action="">
<input type=hidden name=a value=support>
<input type=hidden name=action value=send>

<table class="form">
<tr>
 <th>Your Name:</th>
 <td><input type="text" name="name" value="{$frm.name|escape:htmlall}"></td>
</tr>
<tr>
 <th>Your Email:</th>
 <td><input type="text" name="email" value="{$frm.email|escape:htmlall}"></td>
</tr>
<tr>
 <th>Message:</th>
 <td><textarea name=message cols=45 rows=4>{$frm.message|escape:htmlall}</textarea></td>
</tr>
{if $settings.use_turing}
<tr>
  <th><img src="{"?a=turing&`$sesname`=`$sesid`&r=`$rand`"|encurl}" alt="turing code"></th>
  <td><input type=text name="turing" maxlength=6 size=6></td>
</tr>
{/if}
<tr>
 <th></th>
 <td><input type=submit value="Send"></td>
</tr></table>
</form>

{/if}

{include file="footer.tpl"}