{template header}
<table cellspacing="0" cellpadding="0" border="0" width="{TABLEWIDTH}" align="center" style="table-layout: fixed"> 
<tr><td class="nav" width="90%" align="left" nowrap>&nbsp;<a href="index.php">$bbname</a> $navigation &raquo; {lang post_newthread}</td>
<td align="right" width="10%">&nbsp;<a href="#bottom"><img src="{IMGDIR}/arrow_dw.gif" border="0" align="absmiddle"></a></td>        
</tr></table><br>

<script language="JavaScript">
var postminchars = parseInt('$minpostsize');
var postmaxchars = parseInt('$maxpostsize');
var disablepostctrl = parseInt('$disablepostctrl');
var typerequired = parseInt('$forum[threadtypes][required]');
function checklength(theform) {
	if (postmaxchars != 0) { message = "{lang board_allowed}: "+postminchars+" {lang to} "+postmaxchars+" {lang bytes}"; }
	else { message = ""; }
	alert("\n{lang post_curlength}: "+theform.message.value.length+" {lang bytes}\n\n"+message);
}
function validate(theform) {
	if (theform.typeid && theform.typeid.options[theform.typeid.selectedIndex].value == 0 && typerequired) {
		alert("{lang post_type_isnull}");
		return false;
	} else if (theform.subject.value == "" || theform.message.value == "") {
		alert("{lang post_subject_or_message_isnull}");
		return false;
	} else if (theform.subject.value.length > 80) {
		alert("{lang post_subject_toolang}");
		return false;
	}
	if (!disablepostctrl && ((postminchars != 0 && theform.message.value.length < postminchars) || (postmaxchars != 0 && theform.message.value.length > postmaxchars))) {
		alert("{lang post_message_length_invalid}\n\n{lang post_curlength}: "+theform.message.value.length+" {lang bytes}\n{lang board_allowed}: "+postminchars+" {lang to} "+postmaxchars+" {lang bytes}");
		return false;
	}			
	theform.topicsubmit.disabled = true;
	return true;
}
</script>

<!--{if isset($previewpost)}-->
	{template post_preview}
<!--{/if}-->

<form method="post" name="input" action="post.php?action=newthread&fid=$fid&extra=$extra&topicsubmit=yes" $enctype onSubmit="return validate(this)">
<input type="hidden" name="formhash" value="{FORMHASH}">
<input type="hidden" name="isblog" value="$isblog">

<table cellspacing="{INNERBORDERWIDTH}" cellpadding="{TABLESPACE}" width="{TABLEWIDTH}" align="center" class="tableborder">
<tr>
<td colspan="2" class="header"><a href="member.php?action=credits&view=forum_post&fid=$fid" target="_blank"><img src="{IMGDIR}/credits.gif" alt="{lang credits_policy_view}" align="right" border="0"></a>{lang post_newthread}</td>
</tr>

<!--{if $discuz_uid}-->
	<tr><td class="altbg1">{lang username}:</td>
	<td class="altbg2">$discuz_userss <span class="smalltxt">[<a href="$link_logout">{lang member_logout}</a>]</span></td>
	</tr>
<!--{/if}-->

<!--{if $allowsetreadperm}-->
	<tr>
	<td class="altbg1">{lang readperm_thread}:</td>
	<td class="altbg2"><input type="text" name="readperm" size="6" value="$readperm"> <span class="smalltxt">({lang post_readperm_comment})</span></td>
	</tr>
<!--{/if}-->

<!--{if $maxprice}-->
	<tr>
	<td class="altbg1">{lang price}({$extcredits[$creditstrans][title]}):</td>
	<td class="altbg2"><input type="text" name="price" size="6" value="$price"> <span class="smalltxt">{$extcredits[$creditstrans][unit]} ({lang post_price_comment}<!--{if $maxincperthread}-->{lang post_price_income_comment}<!--{/if}--><!--{if $maxchargespan}-->{lang post_price_charge_comment}<!--{/if}-->)</span></td>
	</tr>
<!--{/if}-->

<tr>
<td class="altbg1" width="20%">{lang subject}:</td>
<td class="altbg2">$typeselect <input type="text" name="subject" size="45" value="$subject" tabindex="3"></td>
</tr>

<!--{if empty($trade)}-->
	<tr>
	<td class="altbg1">{lang icon}:</td><td class="altbg2"><input type="radio" name="iconid" value="0" checked> {lang none} $icons</td>
	</tr>
<!--{/if}-->

{template post_bbinsert}

<!--{if isset($poll) && $allowpostpoll}-->
	<input type="hidden" name="poll" value="yes">
	<tr>
	<td class="altbg1" valign="top">{lang post_poll_options}:<br>
	<span class="smalltxt">{lang post_poll_comment} $maxpolloptions<br><br>
	<input type="checkbox" name="multiplepoll" value="1" <!--{if isset($multiplepoll)}-->checked<!--{/if}-->> {lang post_poll_allowmultiple}
	</span></td><td class="altbg2">
	<textarea rows="4" name="polloptions" style="width: 80%; word-break: break-all" tabindex="5">$polloptions</textarea></td>
	</tr>
<!--{elseif isset($trade) && $allowposttrade}-->
	<input type="hidden" name="trade" value="yes">
	<tr>
	<td class="altbg1">{lang post_trade_seller}:</td>
	<td class="altbg2"><input type="text" name="seller" size="30" value="$seller"></td>
	</tr>
	<tr>
	<td class="altbg1">{lang post_trade_name}:</td>
	<td class="altbg2"><input type="text" name="item_name" size="30" value="$item_name"></td>
	</tr>
	<tr>
	<td class="altbg1">{lang post_trade_price}:</td>
	<td class="altbg2"><input type="text" name="item_price" size="30" value="$item_price"></td>
	</tr>
	<tr>
	<td class="altbg1">{lang post_trade_quality}:</td>
	<td class="altbg2"><input type="text" name="item_quality" size="30" value="$item_quality"> {lang optional}</td>
	</tr>
	<tr>
	<td class="altbg1">{lang post_trade_locus}:</td>
	<td class="altbg2"><input type="text" name="item_locus" size="30" value="$item_locus"> {lang optional}</td>
	</tr>
	<tr>
	<td class="altbg1" valign="top">{lang post_trade_transport}:</td>
	<td class="altbg2">
	<input type="radio" name="transport" value="s" $checktp[s] onclick="this.form.postage_mail.disabled=true; this.form.postage_express.disabled=true"> {lang post_trade_transport_seller}<br>
	<input type="radio" name="transport" value="b" $checktp[b] onclick="this.form.postage_mail.disabled=false; this.form.postage_express.disabled=false"> {lang post_trade_transport_buyer}<br>
	{lang post_trade_transport_comment}<br>
	{lang post_trade_transport_mail} <input type="text" name="postage_mail" size="3" value="$postage_mail" $postagedisabled> {lang post_trade_transport_mail_unit}<br>
	{lang post_trade_transport_express} <input type="text" name="postage_express" size="3" value="$postage_express" $postagedisabled> {lang post_trade_transport_express_unit}
	</td>
	</tr>
<!--{/if}-->

<tr>
<td class="altbg1" valign="top">
{template post_sminsert}
</td>

<td align="left" class="altbg2"><span class="smalltxt">
<textarea rows="18" name="message" style="width: 80%; word-break: break-all" tabindex="4" onSelect="javascript: storeCaret(this);" onClick="javascript: storeCaret(this);" onKeyUp="javascript: storeCaret(this);" onKeyDown="ctlent(event);">$message</textarea>
<br><br>
<input type="checkbox" name="parseurloff" value="1" $urloffcheck> {lang disable} {lang post_parseurl}<br>
<input type="checkbox" name="smileyoff" value="1" $smileyoffcheck> {lang disable} <a href="faq.php?page=messages#6" target="_blank">{lang post_smilies}</a><br>
<input type="checkbox" name="bbcodeoff" value="1" $codeoffcheck> {lang disable} <a href="faq.php?page=misc#1" target="_blank">{lang post_discuzcode}</a><br>
<!--{if $allowhtml}--><input type="checkbox" name="htmlon" value="1" $htmloncheck> {lang enable} {lang post_html}<br><!--{/if}-->
<input type="checkbox" name="usesig" value="1" $usesigcheck> {lang post_show_sig}<br>
<input type="checkbox" name="emailnotify" value="1" $notifycheck> {lang post_email_notify}
<!--{if $forum['ismoderator'] && ($allowdirectpost || !$forum['modnewposts'])}-->
	<br><input type="checkbox" name="sticktopic" value="1" $stickcheck> {lang post_stick_thread}
	<br><input type="checkbox" name="addtodigest" value="1" $digestcheck> {lang post_digest_thread}
<!--{/if}-->
<!--{if $allowuseblog && $forum['allowblog']}--><br><input type="checkbox" name="addtoblog" value="1" $blogcheck> {lang post_blog_thread}<!--{/if}--></span>
</td></tr></table>

<!--{if $allowpostattach && !$seccodecheck}-->
	{template post_attachments}
<!--{/if}-->

<br><center><input type="submit" name="topicsubmit" value="{lang post_newthread}" tabindex="5">
<input type="submit" name="previewpost" value="{lang post_previewpost}" tabindex="6"></center>
</form>
{template footer}