
var bill_showing_uid=0;var bill_showing_bid=0;var bill_uinfo={};function bill_showComment(bid,uid,vuid)
{var url="/interface/user.php";var pars="uid="+uid;var myAjax=new Ajax.Request(url,{method:"post",parameters:pars,onComplete:function(req){bill_AjaxShow(req,bid,uid,vuid);}});}
function bill_AjaxShow(req,bid,uid,vuid)
{eval("r="+req.responseText);bill_uinfo[uid]=r;bill_showComment2(bid,uid,vuid);}
function bill_showComment2(bid,uid,vuid)
{if(bill_uinfo[uid].commentright==-2&&uid!=vuid)
{alert(bill_uinfo[uid].real_name+"关闭评论功能");return;}
if(bill_uinfo[uid].commentright==-1&&uid!=vuid)
{alert("仅"+bill_uinfo[uid].real_name+"的好友才能评论");return;}
if(bill_showing_bid!=0&&bill_showing_bid!=bid)
{bill_hiddenComment(bill_showing_uid,bill_showing_bid);}
var html='<div class="gw" style="padding-left:30px;padding-bottom:0px;">'+'  <div class="gw1"  style="width:550px;border-bottom:none;">'+'    <div><div class="l f13"><strong>我要评论</strong></div><div class="flw5">&nbsp;</div>'+'      <div class="l">'+'        <div class="fb_d2"><div id="content_div" name="content_div"></div></div>'+'        <div class="l p010 mt5"  style="padding-left:309px;*padding-left:295px;"><input type=checkbox name=comment_hiddenmsg id=comment_hiddenmsg>悄悄话</div>'+'        <div class="rbs1"><input type="button" id="btn_qd" value="发表" title="快捷方式 Ctrl+Enter" class="rb1-12" onmouseover="this.className=\'rb2-12\';" onmouseout="this.className=\'rb1-12\';" onclick="bill_addCommentSubmit(this, \'addcommentprompt\');" /></div>'+'        <div class="flw5">&nbsp;</div><div id="addcommentprompt" style="display:none;" class="c6 p010 mt15">提交中...</div>'+'      </div>'+''+'      <div class="r"><a onclick="javascript:bill_hiddenComment('+uid+','+bid+');" style="cursor:pointer;" title="隐藏评论"><img src="http://img1.kaixin001.com.cn/i/record/shut.gif" alt="隐藏评论"></a></div>'+'      <div class="c" style="height:1px;"></div><div style="margin-left:60px;width:480px;border-bottom:1px solid #D8DFEA;">&nbsp;</div>'+'    </div>'+'  </div>'+'</div>'+'<div id="comment" style="width:475px;margin-left:100px;">'+' <br/>'+'</div>';var el=$("comment_"+uid+"_"+bid);el.innerHTML=html;el.style.display="block";bill_showing_uid=uid;bill_showing_bid=bid;eval('e_onkeyup = function (evnt){evt = evnt || window.event;if (evt){var keyCode = evt.charCode || evt.keyCode; if (keyCode ==13){if (evt.ctrlKey){ bill_addCommentSubmit($("bt_qd"),"addcommentprompt");}}}}');comment_editor=new webEditor("comment_editor",$("content_div"),410,65);comment_editor.init("");initComment(vuid,uid,"1054",bid);g_comment_show_type="multiple";getCommentList();}
function bill_addCommentSubmit(thisobj,type)
{var el=$("word_"+bill_showing_uid+"_"+bill_showing_bid);var str=el.innerHTML.trim();str=str.replace(/<\/?[^>]+>/gi,"");if(str.length>20)
{str=str.substr(0,20)+"...";}
g_commenttitle=str;addCommentSubmit(thisobj,type);}
function bill_hiddenComment(uid,bid)
{var el=$("comment_"+uid+"_"+bid);el.innerHTML="";el.style.display="none";}