var userstocklist=new Array()
function show_trade_info()
{
	if (parseInt(tradelimit)>0){tradelimit=parseInt(tradelimit);}else{tradelimit='无限制';}
	if (tradesecret==1){tradesecreta='checked';tradesecretb='';}else{tradesecreta='';tradesecretb='checked';}
	if (ranksecret==1){ranksecreta='checked';ranksecretb='';}else{ranksecreta='';ranksecretb='checked';}
	document.write ('<table class=a2 width='+assignwidth+' cellspacing=1 cellpadding=3 align=center border=0>');
	document.write ('<tr><td align=center height=25 class=a1>-=> 第 '+stockcode+' 号 股 票 <font color=#FF0000>'+stockname+'</font> <=-</td></tr>');
	document.write ('<form name="form1" method="post" action="?action=trade">');
	document.write ('<tr><td class=a3 valign=center align=center>');
	document.write ('<input type="hidden" name="sid" value="'+stocksid+'">');
	document.write ('<br>股票今日可交易数量[<font color=red>'+Compute(stocknum,2)+'</font>]股，当前单价[<font color=red>'+Formatnumber(''+Compute(nowprice,2)+'')+'</font>]元</font>');
	document.write ('<br><br><font color="#3366CC">您的股票帐户里现有资金[<font color="#9900CC">'+Formatnumber(''+Compute(usercash,2)+'')+'</font>]元</font><br><br>购买数量：');
	document.write ('<input name="BuyNum" size="20" value="'+buymax+'">&nbsp;<input type="submit" name="Put" value="购买">&nbsp;<input type=button value="计算支出" name=Button onclick=CountPrice('+Compute(usercash,2)+',1,0)>');
	document.write ('<br><br><font color="#990000"><span id="cost">每次最多可以交易[<font color=red>'+tradelimit+'</font>]股，并扣除[<font color=red>'+Formatnumber(''+Compute(poundage,2)+'')+'%</font>]的手续费您最多可以购买[<font color=red>'+buymax+'</font>]股</span></font>');
	document.write ('<br><br>卖出数量：');
	document.write ('<input name="SaleNum" size="20" value="'+Compute(permittradesum,0)+'">&nbsp;<input type="submit" name="Put" value="出售">&nbsp;<input type=button value="计算所得" name=Button onclick=CountPrice('+Compute(usercash,2)+',0,'+Compute(permittradesum,0)+')>');
	document.write ('<br><br><font color="#990000">您已经拥有这只股票[<font color="#006633">'+Compute(sushare,0)+'</font>]股</font>');
	document.write ('<br><br><a title="交易成功后即时信息中是否显示您的名字">显示用户名：<font color="#990000"><input type=radio name="Privacy" value=1 '+tradesecreta+'>是&nbsp;<input type=radio name="Privacy" value=0 '+tradesecretb+'>否</a></font>');
	document.write ('&nbsp;&nbsp;<a title="交易成功后是否取得经营权（如果可能）">获得经营权：<font color="#990000"><input type=radio name="ManageMent" value=1 '+ranksecreta+'>是&nbsp;<input type=radio name="ManageMent" value=0 '+ranksecretb+'>否</a></font>');
	document.write ('<br><br><font color="#3366CC">证监会提醒：股市风险莫测，谨慎入市！</font>');
	document.write ('<br><br></td></tr>');
	document.write ('</form>');
	document.write ('</table>');
}
var myuserinfo;
function show_userfh_info()
{
	document.write ('<table class=a2 width='+assignwidth+' cellspacing=1 cellpadding=3 align=center border=0>');
	document.write ('<tr><td align=center height=25 class=a1>-=> 第 '+stockcode+' 号 股 票 '+stockname+' 分 红 选 项 <=-</td></tr>');
	document.write ('<form name="form1" method="post" action="?action=UserHl">');
	document.write ('<tr><td class=a3 valign="top" align="center">');
	document.write ('<table border="0" width="100%">');
	document.write ('<tr><td align="center" colspan="2"><br>欢迎您[<font color="#FF0000">'+username+'</font>]使用分红系统。分红选项中使用的费用将在您的股市帐号中扣除！<br><br></td></tr>');
	document.write ('<tr><td width="50%" align="right"><font color=red>现金派息：</font><font color="#006633">每十股分红金额：</font></td>');
	document.write ('<td width="50%" align="left"><input name="honglinum" size="20" value="">&nbsp;<input type=button value="计算所需费用" name=Button onclick=hlnum('+totalnum+','+Compute(usercash,2)+','+Compute(closingprice,2)+')><input type="hidden" name="sid" value="'+stocksid+'"></td></tr>');
	document.write ('<tr><td align="right"><font color=red>送股：</font><font color="#006633">每十股送股比例：</font></td>');
	document.write ('<td align="left"><input name="songguNum" size="20" value="">&nbsp;<input type=button value="计算所需费用" name=Button onclick=sgnum('+totalnum+','+Compute(usercash,2)+','+Compute(closingprice,2)+')></td></tr>');
	document.write ('<tr><td align="right"><font color=red>公告消息：</font><font color="#006633">　　　公告主题：</font></td>');
	document.write ('<td align="left"><select name=color> ');
	document.write ('<option style="background-color:black;color: black" value="black" selected>black</option>');
	document.write ('<option style="background-color:blue;color: blue" value="blue">blue</option>');
	document.write ('<option style="background-color:red;color: red" value="red">red</option>');
	document.write ('<option style="background-color:olive;color: olive" value="olive">olive</option>');
	document.write ('<option style="background-color:teal;color: teal" value="teal">teal</option>');
	document.write ('<option style="background-color:maroon;color: maroon" value="maroon">maroon</option>');
	document.write ('<option style="background-color:navy;color: navy" value="navy">navy</option>');
	document.write ('<option style="background-color:gray;color: gray" value="gray">gray</option>');
	document.write ('<option style="background-color:lime;color: lime" value="lime">lime</option>');
	document.write ('<option style="background-color:Fuchsia;color: Fuchsia" value="Fuchsia">Fuchsia</option>');
	document.write ('<option style="background-color:yellow;color: yellow" value="yellow">yellow</option>');
	document.write ('<option style="background-color:green;color: green" value="green">green</option>');
	document.write ('<option style="background-color:Purple;color: Purple" value="Purple">Purple</option>');
	document.write ('</select><input name="title" type="text" size="37" value="公告主题限制[100]Byte以内！">');
	document.write ('</td></tr>');
	document.write ('<tr><td align="right" valign="top"><font color="#006633">公告内容：</font></td>');
	document.write ('<td align="left"><textarea cols="51" name="content" rows="3">公告内容限制[500]Byte以内！</textarea></td></tr>');
	document.write ('<tr><td align="center" colspan="2"><br><span id="maxnum"></span>除您之外还有['+Compute(usernum,0)+']位用户持有这只股票，总共持有['+Compute(totalnum,0)+']股。您帐户中资金['+Formatnumber(''+Compute(usercash,2)+'')+']元。<br><br></td></tr>');
	document.write ('</table>');
	document.write ('</td></tr>');
	document.write ('<tr align="center"><td colspan=1 class=a4><input type="submit" value="确定" name="b1">&nbsp;&nbsp;<input type="reset" value="重填" name="b2"></td></tr>');
	document.write ('</form>');
	document.write ('</table>');
	document.write ('<table class=a2 width='+assignwidth+' cellspacing=1 cellpadding=3 align=center border=0><br>');
	document.write ('<tr align=center height=25 class=a1><td>代码</td><td>股东</td><td>持股数量</td><td>持股比例</td><td>当前价格</td><td>持股价格</td><td>持股现值</td><td>持股成本</td><td>总盈亏</td><td>盈亏率</td></tr>');
	if (useron)
	{
		for (i=0;i<userstocklist.length;i++)
		{
			userstocklist[i]=userstocklist[i].split(",")
			var userstockvalue=nowprice*userstocklist[i][5];
			var userstockcost=Compute(userstocklist[i][7],2)*userstocklist[i][5];
			document.write ('<tr align=right><td class=a3 align=center><Font color="olive">'+userstocklist[i][2]+'</Font></td>');
			document.write ('<td class=a3 align=center><a href="Exsm_Plus_Dispu.asp?Uid='+userstocklist[i][1]+'">'+userstocklist[i][0]+'</a></td>');
			document.write ('<td class=a3>'+Compute(userstocklist[i][5],0)+'</td>');
			document.write ('<td class=a3>'+Formatnumber(''+Compute(userstocklist[i][5]*100/totalnum,2)+'')+'%</td>');
			document.write ('<td class=a3>￥'+Formatnumber(''+Compute(nowprice,2)+'')+'</td>');
			document.write ('<td class=a3>￥'+Formatnumber(''+Compute(userstocklist[i][7],2)+'')+'</td>');
			document.write ('<td class=a3>￥'+Formatnumber(''+Compute(userstockvalue,2)+'')+'</td>');
			document.write ('<td class=a3>￥'+Formatnumber(''+Compute(userstockcost,2)+'')+'</td>');
			document.write ('<td class=a3>￥'+Formatnumber(''+Compute(userstockvalue-userstockcost,2)+'')+'</td>');
			document.write ('<td class=a3>'+Formatnumber(''+Compute((userstockvalue-userstockcost)*100/userstockcost,2)+'')+'%</td></tr>');
		}
		document.write ('</table>');
		document.write ('<table width='+assignwidth+' cellspacing=0 cellpadding=1 align=center border=0>');
		document.write ('<tr><td align=left>&nbsp;&nbsp;页次：'+page+' / '+pagecount+'页 每页'+pagesize+'个 共'+recordcount+'个</td>');
		document.write ('<td Align=Right>分页：'+DispPageNum(page,pagecount,'action=UserFh&sid='+stocksid+'&page=','','""')+'</td></tr>');
		document.write ('</table>');
	}
	myuserinfo=myuserinfo.split(",")
	document.write ('<table class=a2 width='+assignwidth+' cellspacing=1 cellpadding=3 align=center border=0><br>');
	document.write ('<tr><td colspan=7 align=center height=25 class=a1>-=> 您 个 人 信 息 <=-</td></tr>');
	document.write ('<tr align="center"><td class=a4><b>资金</b></td><td class=a4><b>总资产</b></td><td class=a4><b>持股种类</b></td><td class=a4><b>今日买入</b></td><td class=a4><b>今日卖出</b></td><td class=a4><b>总买入</b></td><td class=a4><b>总卖出</b></td></tr>');
	document.write ('<tr align=right>');
	document.write ('<td class=a3>'+Formatnumber(''+Compute(myuserinfo[0],2)+'')+'</td>');
	document.write ('<td class=a3>'+Formatnumber(''+Compute(myuserinfo[1],2)+'')+'</td>');
	document.write ('<td class=a3>'+Compute(myuserinfo[2],0)+'</td>');
	document.write ('<td class=a3>'+myuserinfo[3]+'</td>');
	document.write ('<td class=a3>'+myuserinfo[4]+'</td>');
	document.write ('<td class=a3>'+myuserinfo[5]+'</td>');
	document.write ('<td class=a3>'+myuserinfo[6]+'</td></tr>');
	document.write ('<tr align="center"><td colspan=7 class=a4><a href="Exsm_Plus_GuPiao.asp"><< 返回股市大厅</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="javascript:history.go(-1)"><< 返回上一页</a></td></tr>');
	document.write ('</table>');
}