{include file="header.tpl"}

<h3>{t}Support Form{/t}</h3>

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

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

{else}


{if $errors}
<ul class="error">
{section name=e loop=$errors}
{if $errors[e].name == 'turing'}<li> {t}Invalid turing image provided{/t}</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>{t}Your Name:{/t}</th>
 <td><input type="text" name="name" value="{$frm.name|escape:htmlall}"></td>
</tr>
<tr>
 <th>{t}Your E-mail:{/t}</th>
 <td><input type="text" name="email" value="{$frm.email|escape:htmlall}"></td>
</tr>
<tr>
 <th>{t}Message:{/t}</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="{t}Submit{/t}"></td>
</tr></table>
</form>

{/if}

{include file="footer.tpl"}