function cmnt_print(){if(CmsgList.length==0&&!pl.temporarYcont.content&&pl.temporarYcont.content==""){$("#videoPL").html(0);$("#pl_count").html(0);$("#pinglunList").html('<div class="noData">没有找到相关的评论！</div> ');$("#pinglun_pages").hide();$("#hotPl").parent("li").hide();$("#hotPl").parent("li").prev().hide();$("#newPl").parent("li").hide();return}else{$("#pinglun_pages").show();$("#hotPl").parent("li").show();$("#hotPl").parent("li").prev().show();$("#newPl").parent("li").show()}$("#pl_count").html(Count.c_total);$("#videoPL").html(Count.c_total);pl.getNewPL(CmsgList)}String.prototype.del18=function(){return this.replace(/0xfe0816/g,"")};function cmnt_pages_print(q,l){var n=10;if(l>=100){n=Math.floor(n/2)}var r=Math.floor(n/2);var m=l-r;if(l>q-r){m-=(r-q+l)}if(m<1){m=1}var i=l+r;if(l<=r){i+=(r-l+1)}if(i>q){i=q}var t=new Array();if(l>1){t.push({page:l-1,desc:"上一页"})}if(m>1){t.push({page:1,desc:"1"});t.push({page:0,desc:"..."})}for(var s=m;s<=i;s++){if(s==l){t.push({page:-1,desc:parse_str(s)})}else{t.push({page:s,desc:parse_str(s)})}}if(i<q){t.push({page:0,desc:"..."})}if(i<q){t.push({page:q,desc:parse_str(q)})}if(l<q){t.push({page:l+1,desc:"下一页"})}var p="";if(q>1){for(var o=0;o<t.length;o++){var s=t[o];if(s.desc=="上一页"){p+='<li class="co_pgprev"><a href="javascript: return false;" onClick="cmnt_show('+s.page+');return false;">'+s.desc+"</a></li>"}else{if(s.desc=="下一页"){p+='<li class="co_pgnext"><a href="javascript: return false;" onClick="cmnt_show('+s.page+');return false;">'+s.desc+"</a></li>"}else{if(s.desc=="..."){p+='<li class="co_pgelip">'+s.desc+"</li>"}else{if(s.page<0){p+='<li class="co_pgon">'+s.desc+"</li>"}else{p+='<li><a href="javascript: return false;" onClick="cmnt_show('+s.page+');return false;">'+s.desc+"</a></li>"}}}}}}p=p;return p}var pl={channel:video.channel,newsid:video.newsid,userId:video.userId,page:"1",pagesize:"20",userName:video.userName,temporarYcont:{},harmoning:"您的评论正在审核中，请耐心等待...",setUser:function(c){pl.userId=c.uid;pl.userName=c.nick;if(pl.userId){$("#PLLoginBoxSend").hide();$("#PLLoginBoxSend #userIdSend").val("会员名/手机/UC号");$("#PLLoginBoxSend #userPsdSend").val("");$("#pinglunList .option form .left").hide();$("#PLunloginBoxSend").hide();$("#contentSend").val("");$("#plSubmitBtn").parent().after('<div class="left2">'+pl.userName+'&nbsp;&nbsp;&nbsp;<a href="http://you.video.sina.com.cn/app/login/logout.php?reurl='+encodeURIComponent(window.location)+'">退出</a></div>')}try{setUser(c)}catch(d){}},resetPage:function(){cmnt_page=1},plRESubmit:function(b){$("#reform_r_33731297 input[name='channel']").val($("#"+b+" input[name='channel']").val());$("#reform_r_33731297 input[name='jump']").val($("#"+b+" input[name='jump']").val());$("#reform_r_33731297 input[name='newsid']").val($("#"+b+" input[name='newsid']").val());$("#reform_r_33731297 input[name='charset']").val($("#"+b+" input[name='charset']").val());$("#reform_r_33731297 input[name='rid']").val($("#"+b+" input[name='rid']").val());$("#reform_r_33731297 input[name='anonymous']").val($("#"+b+" input[name='anonymous']").val());$("#reform_r_33731297 textarea[name='content']").val($("#"+b+" textarea[name='content']").val());$("#reform_r_33731297 input[name='pass']").val($("#"+b+" input[name='pass']").val());$("#reform_r_33731297 input[name='user']").val($("#"+b+" input[name='user']").val());return document.getElementById("reform_r_33731297")},init:function(i,h,g){var f='<input type="hidden" value="" name="channel"><input type="hidden" value="" name="jump"><input type="hidden" value="" name="newsid"><input type="hidden" value="utf-8" name="charset"><input type="hidden" value="" name="rid"><input type="hidden" name="anonymous" id="anonymous33731297"><textarea class="textarea" name="content" id="plContent_33731297"></textarea><input type="text" value="" class="input" name="user" id="$userId"><input type="password" class="input" name="pass" id="$userPsd">';var j=document.createElement("form");j.id="reform_r_33731297";j.name="reform_r_33731297";j.style.display="none";$(document.body).append($(j));$(j).append(f);pl.channel=i;pl.newsid=h;pl.userId=g;if(pl.userId){$("#PLunloginBoxSend").hide();$("#PLLoginBoxSend").hide();$("#contentSend").val("");$("#PLLoginBoxSend #userIdSend").val("会员名/手机/UC号");$("#PLLoginBoxSend #userPsdSend").val("");$("#plSubmitBtn").parent().after('<div class="left2">'+pl.userName+'&nbsp;&nbsp;&nbsp;<a href="http://you.video.sina.com.cn/app/login/logout.php?reurl='+encodeURIComponent(window.location)+'">退出</a></div>')}else{if(pl.channel=="vblog"){$("#PLLoginBoxSend").hide();$("#PLLoginBoxSend #userIdSend").val("会员名/手机/UC号");$("#PLLoginBoxSend #userPsdSend").val("");$("#PLUnusername").show();$("#PLunloginBoxSend").show()}else{if(pl.channel!="vblog"){$("#PLLoginBoxSend").show();$("#contentSend").val("请登录后发表评论");$("#PLunloginBoxSend").hide();$("#PLUnusername").hide()}}}$("#userIdSend").click(function(){if($("#userIdSend").val()=="会员名/手机/UC号"){$("#userIdSend").val("")}}).blur(function(){if($("#userIdSend").val().delS()==""){$("#userIdSend").val("会员名/手机/UC号")}});$("#hotPl").click(function(){var a=/bold/g;a.lastIndex=0;if(!a.test(this.className)){$(this).addClass("bold");$("#newPl").removeClass("bold");cmnt_page=1;try{if(!HotList||typeof(HotList)=="undefined"||HotList.length==0){$("#pl_count").html(0);$("#videoPL").html(0);pl.getNewPL([])}else{$("#pl_count").html(HotList.length);$("#videoPL").html(HotList.length);pl.cretaePage(1);pl.getNewPL(HotList)}}catch(b){pl.getNewPL([])}}return false});$("#newPl").click(function(){var a=/bold/g;a.lastIndex=0;if(!a.test(this.className)){$("#pl_count").html(typeof(Count.c_total)=="undefined"?0:Count.c_total);$("#videoPL").html(Count.c_total);$(this).addClass("bold");$("#hotPl").removeClass("bold");cmnt_page=1;pl.getNewPL((CmsgList||[]))}return false});$("#plSubmitBtn").click(function(){if(pl.channel=="vblog"){pl.vblogSubmit(this);return false}else{pl.newsSubmit(this)}});$("#PLloginedSend").click(function(){$("#PLLoginBoxSend").show();$("#PLunloginBoxSend").hide();$("#contentSend").val("");$("#PLunloginedSend").attr("checked",false)});$("#PLunloginedSend").click(function(){$("#PLLoginBoxSend").hide();$("#PLLoginBoxSend #userIdSend").val("会员名/手机/UC号");$("#PLLoginBoxSend #userPsdSend").val("");$("#PLunloginBoxSend").show();$("#PLloginedSend").attr("checked",false)});$("#PL_CouBox").click(function(){var b=video.channel=="vblog"?"http://comment.v.blog.sina.com.cn/":"http://comment4.news.sina.com.cn/";window.open(b+"comment/skin/video.html?channel="+video.channel+"&newsid="+video.newsid)});$("#PLConBox").click(function(){window.scrollTo(0,$("#PLCommTit").position().top)});$("#PLToConBox").click(function(){$("#contentSend").focus()})},setInit:function(d,c){pl.channel=d;pl.newsid=c;if(pl.userId){$("#PLunloginBoxSend").hide();$("#PLLoginBoxSend").hide();$("#PLLoginBoxSend #userIdSend").val("会员名/手机/UC号");$("#PLLoginBoxSend #userPsdSend").val("");$("#contentSend").val("")}else{if(pl.channel=="vblog"){$("#PLLoginBoxSend").hide();$("#PLLoginBoxSend #userIdSend").val("会员名/手机/UC号");$("#PLLoginBoxSend #userPsdSend").val("");$("#PLUnusername").show();$("#PLunloginBoxSend").show()}else{if(pl.channel!="vblog"){$("#PLLoginBoxSend").show();$("#PLunloginBoxSend").hide();$("#PLUnusername").hide();$("#contentSend").val("请登录后发表评论")}}}},newsSubmit:function(){if($("#contentSend").val().delS()==""){createLay(false,"请输入评论内容");return}if(!pl.userId&&($("#userIdSend").val().delS()==""||$("#userIdSend").val().delS()=="会员名/手机/UC号"||$("#userPsdSend").val().delS()=="")){createLay(false,"请输入用户名/密码");return}$("input[name='newsid']").val(pl.newsid);$("input[name='channel']").val(pl.channel);if(pl.channel!="vblog"){try{$setHost("")}catch(b){}}pl.temporarYcont.id=pl.userId||null;pl.temporarYcont.name=pl.userName||$("#userId").val()||"新浪网友";pl.temporarYcont.content=pl.harmoning+"<br/>"+$("#contentSend").val();cmnt_show(1);cmnt_submit(document.getElementById("sendPl"))},vblogSubmit:function(){if($("#contentSend").val().delS()==""){createLay(false,"请输入评论内容");return}try{$setHost("http://comment.v.blog.sina.com.cn")}catch(f){}if(!pl.userId&&$("#PLloginedSend").attr("checked")==true){var d=$("#userIdSend").val();var e=$("#userPsdSend").val();if(!d||!e){createLay(false,"请输入用户名/密码");return}login.send(d,e,function(a){$("#PLLoginBoxSend").hide();$("#contentSend").val("");$("#PLLoginBoxSend #userIdSend").val("会员名/手机/UC号");$("#PLLoginBoxSend #userPsdSend").val("");pl.setUser(a);pl.vblogSubmitCallback();return false},function(a){return false});return false}pl.vblogSubmitCallback();return false},vblogSubmitCallback:function(){pl.temporarYcont.id=pl.userId||null;pl.temporarYcont.name=pl.userName||$("#userId").val()||"新浪网友";pl.temporarYcont.content=$("#sendPl textarea").val();cmnt_show(1);var __url=window.location.href;__url=__url.split("/");__url.pop();__url=__url.join("/")+"/"+video.vid+"-"+video.uid+".html";$iajax.send({url:"http://control.video.sina.com.cn/api/sendCommPlat.php?domain=1",metch:"post",data:{channel:pl.channel,cmsg_rid:0,commColumn:"",commContentData:encodeURIComponent($("#contentSend").val()),commTitle:encodeURIComponent($("#videoTitle").html()),newsId:pl.newsid,nick:pl.userName||$("#userId").val()||"新浪网友",url:__url,whisper:0},callback:function(txt){if(txt==""){return}txt=eval("("+txt+")");if(txt.code=="A00006"){$("#contentSend").val("")}},errorCallback:function(){}})},sendCallback:function(form){if(!form){return}var cookie=eval("("+login.parseCookie(login.getCookie("SUP"))+")");if(!pl.userId&&cookie&&cookie.nick){pl.setUser(cookie)}},getNewPL:function(n){var i=[];if(n.length==0&&!pl.temporarYcont.content){$("#videoPL").html(0);$("#pl_count").html(0);$("#pinglunList").html('<div class="noData">没有找到相关的评论！</div> ');$("#pinglun_pages").hide();return}if(pl.temporarYcont.content&&pl.temporarYcont.content!=""){$("#newPl").addClass("bold");$("#hotPl").removeClass("bold");Count.c_strip++;var j='<li class="co_linedot"><div class="pic"><img src="'+(pl.temporarYcont.id?"http://portrait"+(pl.temporarYcont.id%8+1)+".sinaimg.cn/"+pl.temporarYcont.id.delS()+"/blog/50":"http://portrait1.sinaimg.cn/default_50.gif")+'" alt="评论" width="50" height="50" /></div><div class="commListCon"><div class="name co_txtA">'+(pl.temporarYcont.name)+'：</div><div class="time">'+(new Date().pattern("yyyy-M-d H:m:s"))+'</div><div class="clear"></div><div class="txt">'+FiltrationHTML(pl.temporarYcont.content);if(pl.temporarYcont.recontent){j+='<div class="replyTxt"><p class="replyname">'+pl.temporarYcont.rename+"的评论：</p>"+pl.temporarYcont.recontent+"</div>"}j+='</div></div><div class="clear"></div></li>';pl.temporarYcont.id=null;pl.temporarYcont.name=null;pl.temporarYcont.content=null;pl.temporarYcont.recontent=null;pl.temporarYcont.rename=null;i.push(j)}var h=(n.length>cmnt_pagesize)?cmnt_pagesize:n.length;for(var m=0;m<h;m++){if(pl.channel=="vblog"){var j=pl.getVblogHTML(n,m)}else{var j=pl.getNewsHTML(n,m)}i.push(j)}$("#pinglunList").html(i.join(""));if(parseInt(Count.c_show)>60){$("#hotPl").parent().show();$("#hotPl").parent().prev("li").show()}else{$("#hotPl").parent().hide();$("#hotPl").parent().prev("li").hide()}var l=/bold/g;l.lastIndex=0;if(l.test($("#hotPl").attr("className"))){var k=Math.ceil(n.length/pl.pagesize)}else{var k=Count.c_pages;$("#pinglun_pages").html(cmnt_pages_print(k,cmnt_page))}pl.listCallback();return false},getVblogHTML:function(f,h){if(f[h].m_user.delS()!=""){var e=f[h].m_user.split(":")}else{var e=["",""]}var g='<li class="co_linedot"><div class="pic"><img src="'+(e[1].delS()!=""?"http://portrait"+(e[1].delS()%8+1)+".sinaimg.cn/"+e[1].delS()+"/blog/50":"http://portrait1.sinaimg.cn/default_50.gif")+'" alt="评论" width="50" height="50" /></div><div class="commListCon"><div class="name co_txtA">'+(f[h].m_config!=""?f[h].m_config.replace("0xfe081600xfe0816 ",""):"新浪网友");if(f[h].m_area.delS()!=""){g+="("+f[h].m_area.delS()+")"}g+=':</div><div class="time">'+f[h].m_datetime+'</div><div class="clear"></div><div class="txt">'+f[h].m_content.del18();if(f[h].m_rid&&f[h].m_rid.toString().delS()!=""){g+='<div class="replyTxt"><p class="replyname">';if(f[h].s_config&&f[h].s_config.delS().replace("0xfe081600xfe0816","")!=""){g+=f[h].s_config.delS().replace("0xfe081600xfe0816","")}else{g+="新浪网友"}g+="的评论：</p>"+f[h].s_content.delS().replace("0xfe0816","")+"</div>"}g+='</div><div class="option"><div class="btnBox"><a href="javascript:void(0)" class="btn up_data" id="'+f[h].m_id+'" rel="'+f[h].m_id+'">支持';if(f[h].Rating){g+="("+(f[h].Rating[1]||0)+")"}g+='</a><a href="javascript:void(0);" class="btn re_data" id="'+f[h].m_id+'" rel="'+f[h].m_id+'">回复';if(f[h].Rating){g+="("+(f[h].Rating[0]||0)+")"}g+='</a></div></div></div><div class="clear"></div></li>';return g},getNewsHTML:function(f,h){if(f[h].m_user.delS()!=""){var e=f[h].m_config.split("&")}else{var e=["","",""]}var g='<li class="co_linedot"><div class="pic"><img src="'+(f[h].m_uid?"http://portrait"+(f[h].m_uid.toString().delS()%8+1)+".sinaimg.cn/"+f[h].m_uid.toString().delS()+"/blog/50":"http://portrait1.sinaimg.cn/default_50.gif")+'" alt="评论" width="50" height="50" /></div><div class="commListCon"><div class="name co_txtA">'+(f[h].m_user.delS()!=""?f[h].m_user:"新浪网友");if(f[h].m_area.delS()!=""){g+="("+f[h].m_area.delS()+")"}g+=':</div><div class="time">'+f[h].m_datetime+'</div><div class="clear"></div><div class="txt">'+f[h].m_content.del18();if(f[h].m_rid&&f[h].m_rid.toString().delS()!=""){g+='<div class="replyTxt"><p class="replyname">'+f[h].s_user+"的评论：</p>"+f[h].s_content.replace("0xfe0816","").delS();+"</div>"}g+="</div>";if(f[h].m_id!=0){g+='<div class="option"><div class="btnBox"><a href="javascript:void(0)" class="btn up_data" id="'+f[h].m_id+'" rel="'+f[h].m_id+'">支持';if(f[h].Rating){g+="("+(f[h].Rating[1]||0)+")"}g+='</a><a href="javascript:void(0)" class="btn re_data" id="'+f[h].m_id+'" rel="'+f[h].m_id+'">回复';if(f[h].Rating){g+="("+(f[h].Rating[0]||0)+")"}g+="</a></div></div>"}g+='</div><div class="clear"></div></li>';return g},error:function(){createLay(false,"留言失败!")},listCallback:function(){if(pl.channel=="vblog"){$("#pinglunList li a.up_data").click(function(){if($(this).attr("name")==1){return}var o=this;var __url=window.location.href;__url=__url.split("/");__url.pop();__url=__url.join("/")+"/"+video.vid+"-"+video.uid+".html";$iajax.send({url:"http://control.video.sina.com.cn/api/sendCommPlat.php?domain=1",metch:"post",data:{channel:pl.channel,cmsg_rid:o.id,commColumn:"",vote:1,commContentData:"11",commTitle:encodeURIComponent($("#videoTitle").html()),newsId:pl.newsid,nick:encodeURIComponent(pl.userName||"新浪网友"),url:__url,whisper:0},callback:function(txt){txt=eval("("+txt+")");if(txt.code=="A00006"){pl.upCallback(txt,o)}return false},errorCallback:function(){}});return false})}else{$("#pinglunList li a.up_data").click(function(){if($(this).attr("name")==1){return}var o=this;pl.upCallback("",o);var __url=window.location.href;__url=__url.split("/");__url.pop();__url=__url.join("/")+"/"+video.vid+"-"+video.uid+".html";$iajax.send({url:"http://comment4.news.sina.com.cn/cgi-bin/comment/post.cgi",metch:"post",data:{channel:pl.channel,rid:o.id,charset:"utf-8",commColumn:"",vote:1,anonymous:1,content:"11",newsid:pl.newsid,format:"js",nick:encodeURIComponent(pl.userName||"新浪网友"),url:__url,whisper:0},callback:function(txt){pl.upCallback(txt,o)},errorCallback:function(){}});return false})}$("#pinglunList li a.re_data").click(function(){var o=this;if($("#rePLBox_"+this.id).get()!=""){return}$(this).addClass("current");var str='<div class="replayBox" id="rePLBox_'+this.id+'"><form name="reform_'+o.id+'" id="reform_'+o.id+'" name="reform_'+o.id+'"><input type=hidden name="channel" value="'+pl.channel+'"><input type=hidden name="jump" value=""><input type=hidden name="newsid" value="'+pl.newsid+'"><input type=hidden name="charset" value="utf-8" ><input type=hidden name="rid" value="'+o.id+'" ><input type=hidden id="anonymous'+o.id+'" name=anonymous><textarea id="plContent_'+o.id+'" name="content" class="textarea"></textarea>';if(pl.channel!="vblog"){str+='<div class="left" id="PLLoginBox_'+o.id+'">登录名：<input id="userId'+o.id+'" name="user" type="text" class="input"  value="'+(pl.userName||"会员名/手机/UC号")+'" />密码：<input id="userPsd'+o.id+'" name="pass" type="password" class="input" /><a href="http://login.sina.com.cn/signup/signupmail.php?entry='+video.channel+"&r="+encodeURIComponent(window.location)+'" target="_blank">快速注册</a>&nbsp;&nbsp;<a href="https://login.sina.com.cn/getpass.html" target="_blank">忘记密码</a></div>'}else{str+='<div class="left" style="display:none" id="PLLoginBox_'+o.id+'">登录名：<input id="userId'+o.id+'" type="text" class="input" name="user"  value="会员名/手机/UC号" />密码：<input id="userPsd'+o.id+'" type="password" class="input" name="pass" /><input type="checkbox" id="PLunlogined'+o.id+'" />匿名<a href="http://login.sina.com.cn/signup/signupmail.php?entry='+video.channel+"&r="+encodeURIComponent(window.location)+'" target="_blank">快速注册</a>&nbsp;&nbsp;<a href="https://login.sina.com.cn/getpass.html" target="_blank">忘记密码</a></div><div class="left" id="PLunloginBox_'+o.id+'"> 匿名：<input id="userId_'+o.id+'" type="text" class="input" value="新浪网友" /><input type="checkbox" id="PLlogined'+o.id+'"  />登录后评论</div>'}str+='<div class="right"><a href="javascript: void(0);" class="smailup"><img src="http://simg0.sinajs.cn/video/images/common/smailup.gif" /></a> <a href="javascript:void(0)" class="smailup"><img src="http://simg0.sinajs.cn/video/images/common/smailup2.gif" /></a></div><div class="clear"></div></form></div>';$(this).parent().after(str);if(pl.userId){$("#PLLoginBox_"+o.id).hide();$("#PLunloginBox_"+o.id).hide()}$("#userId"+o.id).click(function(){if($("#userId"+o.id).val()=="会员名/手机/UC号"){$("#userId"+o.id).val("")}}).blur(function(){if($("#userId"+o.id).val().delS()==""){$("#userId"+o.id).val("会员名/手机/UC号")}});if(pl.channel=="vblog"&&!pl.userId){$("#PLlogined"+o.id).click(function(){$("#PLLoginBox_"+o.id).show();$("#PLunloginBox_"+o.id).hide();$("#PLunlogined"+o.id).attr("checked",false);return false});$("#PLunlogined"+o.id).click(function(){$("#PLLoginBox_"+o.id).hide();$("#PLunloginBox_"+o.id).show();$("#PLlogined"+o.id).attr("checked",false);return false})}$("#rePLBox_"+this.id+" a.smailup").eq(1).click(function(){$(o).removeClass("current");$("#rePLBox_"+o.id).remove();return false});if(pl.channel=="vblog"){$("#rePLBox_"+o.id+" a.smailup").eq(0).click(function(){if($("#plContent_"+o.id).val().delS()==""){createLay(false,"请输入回复内容");return}if(!pl.userId&&$("#PLunloginBox_"+o.id).css("display")=="none"){var userid=$("#userId"+o.id).val();var userPwd=$("#userPsd"+o.id).val();if(userid==""||userPwd==""){createLay(false,"请输入用户名/密码!");return false}login.send(userid,userPwd,function(json){$("#PLLoginBoxSend").hide();try{setUser(json)}catch(error){}pl.setUser(json);pl.reVblogSubmit(o)},function(json){});return false}pl.reVblogSubmit(o);return false})}else{$("#rePLBox_"+o.id+" a.smailup").eq(0).click(function(){if($("#plContent_"+o.id).val().delS()==""){createLay(false,"请输入回复内容");return}if(!pl.userId&&($("#userId"+o.id).val().delS()==""||$("#userPsd"+o.id).val().delS()=="")){createLay(false,"请输入用户名/密码");return}var PostForm=document.getElementById("reform_"+o.id);if(!pl.userId){login.send($("#userId"+o.id).val().delS(),$("#userPsd"+o.id).val().delS(),function(result){if(result.retcode==0||result.retcode=="0"){pl.setUser(result);pl.temporarYcont.id=pl.userId||null;pl.temporarYcont.name=pl.userName||$("#userId_"+o.id).val()||"新浪网友";pl.temporarYcont.content=pl.harmoning+"<br/>"+$("#contentSend").val();pl.temporarYcont.rename=$("#rePLBox_"+o.id).parent().parent().parent().find("div.name").html();pl.temporarYcont.recontent=$("#rePLBox_"+o.id).parent().parent().parent().find("div.txt").text().replace($("#rePLBox_"+o.id).parent().parent().parent().find("div.txt").find("div.replyTxt,div.option").text(),"").toString();var sdivform=pl.plRESubmit("reform_"+o.id);cmnt_submit(sdivform);cmnt_show(1)}else{$(PostForm).show();PostForm.user.focus()}},function(){})}else{$("#reform_"+o.id+" #anonymous").val(1);pl.temporarYcont.id=pl.userId||null;pl.temporarYcont.name=pl.userName||$("#userId_"+o.id).val()||"新浪网友";pl.temporarYcont.content=pl.harmoning+"<br/>"+$("#contentSend").val();pl.temporarYcont.rename=$("#rePLBox_"+o.id).parent().parent().parent().find("div.name").html();pl.temporarYcont.recontent=$("#rePLBox_"+o.id).parent().parent().parent().find("div.txt").text().replace($("#rePLBox_"+o.id).parent().parent().parent().find("div.txt").find("div.replyTxt,div.option").text(),"").toString();var sdivform=pl.plRESubmit("reform_"+o.id);cmnt_show(1);cmnt_submit(sdivform)}$("#plContent_"+o.id).val("");return false})}return false})},reVblogSubmit:function(o){pl.temporarYcont.id=pl.userId||null;pl.temporarYcont.name=pl.userName||$("#userId_"+o.id).val()||"新浪网友";pl.temporarYcont.content=$("#rePLBox_"+o.id+" textarea").val();pl.temporarYcont.rename=$("#rePLBox_"+o.id).parent().parent().find("div.name").html();pl.temporarYcont.recontent=$("#rePLBox_"+o.id).parent().parent().find("div.txt").text().replace($("#rePLBox_"+o.id).parent().parent().find("div.txt").find("div.replyTxt").text(),"");cmnt_show(1);var __url=window.location.href;__url=__url.split("/");__url.pop();__url=__url.join("/")+"/"+video.vid+"-"+video.uid+".html";$iajax.send({url:"http://control.video.sina.com.cn/api/sendCommPlat.php?domain=1",metch:"post",data:{channel:pl.channel,cmsg_rid:o.id,commColumn:"",commContentData:encodeURIComponent($("#plContent_"+o.id).val()),commTitle:encodeURIComponent($("#videoTitle").html()),newsId:pl.newsid,nick:encodeURIComponent(pl.userName||$("#userId_"+o.id).val()||"新浪网友"),url:__url,whisper:0},callback:function(txt){if(txt==""){return}txt=eval("("+txt+")");if(txt.code=="A00006"){$("#rePLBox_"+o.id+" textarea").val("")}else{$("#rePLBox_"+o.id+" textarea").val("")}},errorCallback:function(){$("#rePLBox_"+o.id+" textarea").val("")}});return false},upCallback:function(d,c){$(c).replaceWith("<span>已支持</span>")},cretaePage:function(g){var f=[];var h=Math.ceil(HotList.length/pl.pagesize);for(var e=1;e<=h;e++){if(g==e){f.push('<li class="co_pgon">'+e+"</li>")}else{f.push('<li><a onclick="cmnt_show('+e+');return false;" href="javascript:void(0)">'+e+"</a></li>")}}$("#pinglun_pages").html(f.join("")).show()}};var cmnt_postsucc=function(b){pl.sendCallback(b)};var Count=new Object();Count.c_total=0;Count.c_show=0;Count.c_strip=0;Count.c_nice=0;Count.c_count=0;Count.c_pages=0;var Rating=new Object();var CmsgList=new Array();var TopList=new Array();var NiceList=new Array();var PageSize=20;var ActualPage=1;var PostJump="";var PostForm=null;var MB_UNCHK="mbunchk";var cmnt_pagesize=20;function cmnt_rebuild(){if(typeof(News)!="undefined"){return}if(typeof(cmnt_notfound)!="undefined"){cmnt_notfound()}var f=V4_HOST;if(typeof(cmnt_host)!="undefined"&&cmnt_host!=""){f=cmnt_host}var d=f+XML_CGI+TYPE_CMSG_JS+"&channel="+uri_encode(cmnt_channel)+"&newsid="+uri_encode(cmnt_newsid)+"&group="+cmnt_group+"&page=1";var e=function(){load_js(d)};window.setTimeout(e,6000)}function cmnt_notfound(){$("#videoPL").html(0);$("#pl_count").html(0);$("#pinglunList").html('<div class="noData">没有找到相关的评论！</div> ');$("#pinglun_pages").hide();$("#hotPl").parent("li").hide();$("#hotPl").parent("li").prev().hide();$("#newPl").parent("li").hide()}function cmnt_reload(f,h,i){if(f==""||h==""){return}if(typeof(cmnt_pagesize)!="undefined"&&(cmnt_pagesize==5||cmnt_pagesize==10||cmnt_pagesize==20)){PageSize=cmnt_pagesize}if(typeof(cmnt_page)!="undefined"){ActualPage=Math.ceil(cmnt_page/(MSGS_PERPAGE/PageSize))}var g="";if(typeof(cmnt_host)!="undefined"&&cmnt_host!=""){g=cmnt_host}var j=cmsglist_embed(f,h,i,ActualPage,g);load_js(j,cmnt_rebuild)}function cmnt_callback(){if(typeof(cmnt_page)=="undefined"&&typeof(cmnt_print)=="undefined"){return}Count.c_pages=Math.floor((Count.c_strip+PageSize-1)/PageSize);if(typeof(cmnt_page)!="undefined"){var d=0;var f=(PageSize*(cmnt_page-1))%MSGS_PERPAGE;var e=Count.c_strip%MSGS_PERPAGE;if(ActualPage>1&&e>0){d=MSGS_PERPAGE-e}if(cmnt_page>1){d+=f}if(d>0&&CmsgList.length>d){CmsgList.reverse();CmsgList.length-=d;CmsgList.reverse()}if(cmnt_page>1&&CmsgList.length>PageSize){CmsgList.length=PageSize}}if(typeof(cmnt_print)!="undefined"){cmnt_print()}}function show_vote(b){if(b==undefined||b==null){return}for(vote in b){document.writeln("<input type=radio name=vote value="+b[vote]+">"+vote+"&nbsp;")}}function cmnt_pages(){var b="当前页码"+cmnt_page;if(Count.c_pages<=1){return}if(cmnt_page>1){b+=("&nbsp;<a href=# onclick='javascript:cmnt_show("+parseInt(cmnt_page-1)+");return false;'>上一页</a>")}if(cmnt_page<Count.c_pages){b+=("&nbsp;<a href=# onclick='javascript:cmnt_show("+parseInt(cmnt_page+1)+");return false;'>下一页</a>")}return b}function cmnt_show(c){if(c<1){c=1}var d=/bold/g;d.lastIndex=0;if(d.test($("#hotPl").attr("className"))){$("#pl_count").html(HotList.length);$("#videoPL").html(HotList.length);pl.cretaePage(c);pl.getNewPL(HotList.slice((c-1)*pl.pagesize,c*pl.pagesize));return}if(c>Count.c_pages){c=Count.c_pages}cmnt_page=c;cmnt_reload(cmnt_channel,cmnt_newsid,cmnt_group)}function cmnt_ssouser(){if(typeof(sinaSSOManager)=="object"){var b=sinaSSOManager.getSinaCookie();if(b&&parse_str(b.user)!=""){return b.user}}return""}function cmnt_ssouid(){if(typeof(sinaSSOManager)=="object"){var b=sinaSSOManager.getSinaCookie();if(b&&parse_str(b.uid)!=""){return b.uid}}return""}function cmnt_ssonickname(){if(typeof(sinaSSOManager)=="object"){var b=sinaSSOManager.getSinaCookie();if(b&&parse_str(b.nick)!=""){return b.nick}}return""}function cmnt_checksso(){var b=cmnt_ssonickname();if(b!=""&&typeof(cmnt_showsso)=="function"){cmnt_showsso(b);return true}else{if(b==""&&typeof(cmnt_hidesso)=="function"){cmnt_hidesso()}}return false}function cmnt_postjump(){if(PostJump=="_blank"){_o(view_url(cmnt_channel,cmnt_newsid,cmnt_group))}else{if(PostJump=="_self"){_j(view_url(cmnt_channel,cmnt_newsid,cmnt_group))}else{cmnt_postsucc(PostForm);PostForm=null}}}var showCommStatus={clear:true,showTimeLimit:2,_divObj:null,_timeObj:null,absPosition:function(k,o,p){var l=k.offsetLeft;var m=k.offsetTop-(p?k.offsetParent.scrollTop:0);var j=k;var e="";try{while(j!=document.body&&j!=document.documentElement&&j!=o&&j!=null){e+=j.tagName+" , ";j=j.offsetParent;l+=j.offsetLeft;m+=j.offsetTop-(p?j.offsetParent.scrollTop:0)}}catch(n){}return{left:l,top:m}},show:function(e,k,i){if(!k){k=pl.harmoning}if(!i){i="16px/19px"}var h=this;try{var j=this.absPosition(e,document.body);if(this._divObj==null){this._divObj=document.createElement("div");this._divObj.style.position="absolute";this._divObj.style.font=i+" 微软雅黑,黑体";this._divObj.style.color="#999";document.body.appendChild(this._divObj)}this._divObj.innerHTML=k;this._divObj.style.display="block";this._divObj.style.top=Math.ceil(j.top+(e.offsetHeight-this._divObj.offsetHeight)*0.45)+"px";this._divObj.style.left=Math.ceil(j.left+(e.offsetWidth-this._divObj.offsetWidth)*0.5)+"px";if(this.clear){e.value=""}clearTimeout(this._timeObj);if(this.showTimeLimit){this._timeObj=setTimeout(function(){h.hide()},this.showTimeLimit*1000)}}catch(l){}},hide:function(){try{this._divObj.style.display="none"}catch(b){}}};function cmnt_submit(f){var d=new Object();d.m_channel=parse_str(f.channel.value);d.m_newsid=parse_str(f.newsid.value);d.m_content=parse_str(f.content.value);d.m_user=parse_str(f.user.value);d.m_pass=parse_str(f.pass.value);if(typeof(f.rid)=="object"){d.m_rid=parse_int(f.rid.value)}if(typeof(f.vote)=="object"){d.m_vote=parse_int(f.vote.value)}if(typeof(f.config)=="object"){d.m_config=parse_str(f.config.value)}if(typeof(f.charset)=="object"){d.charset=parse_str(f.charset.value)}if(typeof(f.to_mb)=="object"&&f.to_mb.checked){d.to_mb=parse_str(f.to_mb.value)}d.format="js";PostForm=f;PostJump=f.jump.value;if(cmnt_ssouser()==""){if((typeof(PostForm.anonymous)=="object"&&(PostForm.anonymous.value||PostForm.anonymous.checked))||!isneedlogin(d.m_channel)){if(cmnt_post(d)){PostForm.content.value=""}else{PostForm.content.value=""}}else{if(d.m_user==""||d.m_user=="会员名/手机/UC号"||d.m_pass==""){createLay(false,"请输入用户名/密码");return}if(typeof(sinaSSOManager)=="object"&&typeof(sinaSSOManager.login)=="function"){var e=30;if(typeof(PostForm.savestate)=="object"&&PostForm.savestate.checked){e="30"}sinaSSOManager.login(function(a){if(a.retcode==0||a.retcode=="0"){d.m_user=cmnt_ssonickname();if(cmnt_post(d)){PostForm.content.value=""}else{PostForm.content.value=""}}else{PostForm.user.focus();PostForm.user.select();createLay(false,"您输入的用户名/密码有误")}},d.m_user,d.m_pass,e)}}}else{if(typeof(sinaSSOManager)=="object"&&typeof(sinaSSOManager.autoLogin)=="function"){sinaSSOManager.autoLogin(function(a){if(pl.userId||cmnt_checksso()==true){d.m_user=cmnt_ssonickname();if(cmnt_post(d)){PostForm.content.value=""}else{PostForm.content.value=""}}})}}}function post_error(){}function cmnt_mbprompt(){cmnt_MB.showprompt()}var cmnt_MB={_divObj:null,absPosition:showCommStatus.absPosition,showprompt:function(){try{if(this._divObj==null){var i='.mb_prompt_cmnt {width:498px; border:1px #e9e9e9 solid; background:#fff; position:absolute;font-size:12px;lineHeight:1.67;}					.mb_prompt_cmnt h2{margin:0px;padding:0px;}					.mb_prompt_cmnt h2.title{height:29px; border-bottom:1px #e9e9e9 solid; background:#eee; font-family:"microsoft yahei","微软雅黑","simsun","宋体"; font-weight:normal; font-size:14px; line-height:29px;}					.mb_prompt_cmnt h2.title .txt{float:left; padding:0 0 0 10px;}					.mb_prompt_cmnt h2.title .close{float:right; font-family: Verdana, Geneva, sans-serif; padding:0 10px 0 0;}					.mb_prompt_cmnt h2.title .close a{text-decoration:none;}					.mb_prompt_cmnt h2.title .close a:hover{text-decoration:underline;}					.mb_prompt_cmnt .popupCon{padding:1em;}					.mb_prompt_cmnt .popupBtn{padding:0 1em 1em; text-align:center;}					.mb_prompt_cmnt h2.title{border-color:#c4d8f2; background:url(http://www.sinaimg.cn/dy/pl/deco/style_01/bg_01.png) no-repeat 0 -550px; cursor:move}					.mb_prompt_cmnt .popupBtn input{width:90px; height:25px; background:url(http://www.sinaimg.cn/dy/pl/deco/style_01/bg_01.png) no-repeat 0 -450px; border:none; color:#fff; line-height:25px; cursor:pointer;}					.mb_prompt_cmnt a:link{color:#226395;}					.mb_prompt_cmnt a:visited{color:#226395;}';var e=document.createElement("style");e.type="text/css";document.getElementsByTagName("head")[0].appendChild(e);if(e.styleSheet){e.styleSheet.cssText=i}else{e.textContent=i}this._divObj=document.createElement("div");this._divObj.className="mb_prompt_cmnt";document.body.appendChild(this._divObj)}var h="<h2 class='title clearfix'><span class='txt'>评论成功，是否开通微博？</span>";h+="<span class='close'><a href='#' onclick=\"javascript:this.parentNode.parentNode.parentNode.style.display='none';return false;\">x</a></span>";h+="</h2><div class='popupCon clearfix'>";h+="<p style='text-align:center;'>您还没有开通新浪微博，点“确认”进入开通微博页面，暂不开通请点“取消”。<br />";h+="评论同时发往微博，可以向更多人分享您的评论，还能汇集您的所有精彩点评。</p>";h+="</div><div class='popupBtn clearfix' id='mb_confirm'>";h+="<a href='http://t.sina.com.cn' target='blank' onclick=\"javascript:this.parentNode.parentNode.style.display='none';\" />确 认</a>&nbsp;&nbsp;&nbsp;&nbsp;";h+="<a href='#'  onclick=\"javascript:this.parentNode.parentNode.style.display='none';cmnt_MB.mb_check_state();return false;\" />取 消</a>";h+="</div>";this._divObj.innerHTML=h;this._divObj.style.display="block";var l=document.documentElement.scrollTop;if(l==0){l=document.body.scrollTop}var k=typeof(PostForm)=="object"?this.absPosition(PostForm).top:(l+250);this._divObj.style.top=k+"px";this._divObj.style.left=((screen.width-950)/2+71)+"px"}catch(j){}},mb_check_state:function(){var d=new Date();if(get_cookie(MB_UNCHK)==cmnt_ssouid()){d.setTime(d.getTime()-10*60*1000);set_cookie(MB_UNCHK,"",d.toGMTString(),"/","sina.com.cn")}else{d.setTime(d.getTime()+3*24*3600*1000);set_cookie(MB_UNCHK,cmnt_ssouid(),d.toGMTString(),"/","sina.com.cn")}var f=tag_objs("input","to_mb");for(var e=0;e<f.length;e++){if(get_cookie("mbunchk")==cmnt_ssouid()){f[e].checked=false}else{f[e].checked=true}}},init:function(){this._divObj=null;var c=tag_objs("input","to_mb");for(var d=0;d<c.length;d++){c[d].onclick=this.mb_check_state;if(get_cookie("mbunchk")==cmnt_ssouid()){c[d].checked=false}else{c[d].checked=true}}}};cmnt_preview=function(){return CmsgList};cmnt_MB.prototype=showCommStatus;cmnt_checksso();