
var b_showingid=0;var b_commentright={};function b_showComment(id,uid,vuid)
{var url="/interface/user.php";var pars="uid="+uid;var myAjax=new Ajax.Request(url,{method:"post",parameters:pars,onComplete:function(req){b_AjaxShow(req,id,uid,vuid);}});}
function b_AjaxShow(req,id,uid,vuid)
{eval("r="+req.responseText);b_commentright[uid]=r;b_showComment2(id,uid,vuid);}
function b_showComment2(id,uid,vuid)
{if(b_commentright[uid].commentright==-2&&uid!=vuid)
{alert(b_commentright[uid].real_name+"关闭评论功能");return;}
if(b_commentright[uid].commentright==-1&&uid!=vuid)
{alert("仅"+b_commentright[uid].real_name+"的好友才能评论");return;}
if(b_showingid!=0&&b_showingid!=id)
{b_hiddenComment(b_showingid);}
var html="";html+='';html+='<div class="gw" style="padding-left:30px;padding-bottom:0px;">';html+=' <div class="gw1"  style="width:570px;border-bottom:none;">';html+='  <div><div class="l f13"><strong>我要评论</strong></div><div class="flw20">&nbsp;</div><div class="l">';html+='   <div class="fb_d2"><div id="content_div" name="content_div"></div></div>';html+='   <div class="l p010 mt5" style="padding-left:317px;*padding-left:303px;"><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="b_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:b_hiddenComment('+id+');" style="cursor:pointer;" title="隐藏评论"><img src="http://img1.kaixin001.com.cn/i/record/shut.gif" alt="隐藏评论"></a></div>';html+='   <div class="c" style="height:1px;"></div><div style="margin-left:60px;width:480px;border-bottom:1px solid #D8DFEA;">&nbsp;</div>';html+='  </div>';html+=' </div>';html+='</div>';html+='<div id="comment" style="width:475px;margin-left:100px;">';html+=' <br/>';html+='</div>';$("comment_"+id).innerHTML=html;$("comment_"+id).style.display="block";b_showingid=id;eval('e_onkeyup = function (evnt){evt = evnt || window.event;if (evt){var keyCode = evt.charCode || evt.keyCode; if (keyCode ==13){if (evt.ctrlKey){ b_addCommentSubmit($("bt_qd"),"addcommentprompt");}}}}');comment_editor=new webEditor("comment_editor",$("content_div"),418,65);comment_editor.init("");initComment(vuid,uid,"1008",id);g_comment_show_type="multiple";getCommentList();window.location.hash='record_'+id;}
function b_addCommentSubmit(thisobj,type)
{var str=$("word_"+b_showingid).innerHTML.trim();if(str.length>20)
{str=str.substr(0,20)+"...";}
g_commenttitle=str;addCommentSubmit(thisobj,type);}
function b_hiddenComment(id)
{$("comment_"+id).innerHTML="";$("comment_"+id).style.display="none";}
function b_setTitle(str)
{if(str.length>10)
{str=str.substr(0,10)+"...";}
g_commenttitle=str;}