{template 'member','header'}
<script language="javascript">
<?php
sajax_show_javascript();
?>
function doSub(){
	var c = document.getElementById("message");
	var cardid = document.getElementById("cardid").value;
	var cardpass = document.getElementById("cardpass").value;
	var chkcode = document.getElementById("chkcode").value;
	document.getElementById("door").style.display="block";
	c.innerHTML = "正在校验输入信息，请稍候...";
	x_doSub(cardid,cardpass,chkcode,doSub_cb);

function doSub_cb(z) {
  if(z=="true")
  {
	alert("恭喜您,充值成功");
	window.location.reload();
	document.getElementById("door").style.display="none";
	}
	else if(z=="errcode")
	{
	alert("验证码输入错误");
	document.getElementById("checkcode").src="{HS_PATH}checkcode.php?id='+Math.random()*5";
	}
	else	
	{
	document.getElementById("message").innerHTML = z;
	}
}
}
//-->
</script>

<DIV class=main>
<DIV class=main>
{template 'member','left_pay'}
<DIV class="ad_rbarB boxC">
<DIV class=columnC><SPAN class="l_tit f_l">帐号充值</SPAN></DIV>
<DIV class=mainboxD>
{if $MOD['amo']}
<DIV class="tipsboxB boxE">
<H5>充值公告</H5>
<DIV class=cont>{$MOD['amo']}</DIV>
</DIV>
{/if}
<div class="tipsboxC" id=door style="display: none"><span class="font06" id="message"></span></div>
<TABLE class=regform cellSpacing=0 cellPadding=0 width="100%" border=0>
	<TBODY id=paying>
		<TR>
			<TD colspan="3" style="font-size:14px;font-weight:bold;color:#555" align="center">亲爱的  
			<font color=red>{$_username}</font> 您的当前余额为： <font color=green>{$_money}</font> 元</TD>
		</TR>
		<TR>
			<TH align="right">充值卡卡号： </TH>
			<TD colSpan=2>
			<INPUT class=inputA id=cardid style="ime-mode: disabled"> </TD>
		</TR>
		<TR>
			<TH align="right">充值卡密码： </TH>
			<TD colSpan=2>
			<INPUT class=inputA id=cardpass style="ime-mode: disabled"> </TD>
		</TR>
		<TR>
			<TH align="right">验证码： </TH>
			<TD width="76%">
			<INPUT class=inputB id=chkcode style="ime-mode: disabled">
			<img src="{HS_PATH}checkcode.php" id="checkcode" onclick="this.src='{HS_PATH}checkcode.php?id='+Math.random()*5;" style="cursor:pointer;" alt="看不清楚?请点击刷新" align="absmiddle" height=30 width=80>
			</TD>
			<TD id=tdCodeValide width="1%"></TD>
		</TR>
		<TR>
			<TH width="24%">&nbsp; </TH>
			<TD colSpan=2>
			<input type="submit" onClick="doSub()" class="hsbtn" value="充值">
			</TD>
		</TR>
	</TBODY>
</TABLE>
</DIV></DIV>
	  </DIV></DIV></DIV>
{template 'member','footer'}