{template header}
<!--{if empty($infloat)}-->
	{subtemplate header_nofloat}
<!--{/if}-->

<div class="float">
<div class="floatbox">
	<h3 class="float_ctrl">
		<em id="return_$handlekey">{lang pay}</em>
		<span>
			<!--{if !empty($infloat)}--><a href="javascript:;" class="float_close" onclick="floatwin('close_$handlekey')" title="{lang close}">{lang close}</a><!--{/if}-->
		</span>
	</h3>
	<form id="payform" method="post" action="misc.php?action=pay&paysubmit=yes&infloat=yes" onsubmit="ajaxpost('payform', 'return_$handlekey', 'return_$handlekey', 'onerror');return false;">
	<input type="hidden" name="formhash" value="{FORMHASH}" />
	<!--{if !empty($infloat)}--><input type="hidden" name="handlekey" value="$handlekey" /><!--{/if}-->
	<table class="list" cellspacing="0" cellpadding="0">
		<tr>
			<th>{lang author}:</th>
			<td><a href="space.php?uid=$thread[authorid]" target="_blank">$thread[author]</a></td>
		</tr>
		<tr>
			<th valign="top">{lang price}({$extcredits[$creditstransextra[1]][title]}):</th>
			<td>$thread[price] {$extcredits[$creditstransextra[1]][unit]}</td>
		</tr>
		<tr>
			<th valign="top">{lang pay_author_income}({$extcredits[$creditstransextra[1]][title]}):</th>
			<td>$thread[netprice] {$extcredits[$creditstransextra[1]][unit]}</td>
		</tr>
		<tr>
			<th valign="top">{lang pay_balance}({$extcredits[$creditstransextra[1]][title]}):</th>
			<td>$balance {$extcredits[$creditstransextra[1]][unit]}</td>
		</tr>
		<tr class="btns">
			<th>&nbsp;</th>
			<td>
				<input type="hidden" name="tid" value="$tid" />
				<button class="submit" type="submit" name="paysubmit" value="true">{lang submit}</button>
			</td>
		</tr>
	</table>
	</form>
</div>
</div>

<!--{if !empty($infloat)}-->
<script type="text/javascript" reload="1">
function submithandle_$handlekey(locationhref) {
	ajaxget('viewthread.php?tid=$tid&viewpid=$pid', 'post_$pid');
	floatwinreset = 1;
	floatwin('close_$handlekey');
}
</script>
<!--{/if}-->

<!--{if empty($infloat)}-->
	{subtemplate footer_nofloat}
<!--{/if}-->
{template footer}