'
);
document.getElementById("bpopup").style.display = "block";
document.body.style.overflow = "hidden";
document.body.style.height = "100%";
document.documentElement.style.overflow = "hidden";
document.documentElement.style.height = "100%";
}
}
}
//document.getElementById("popupc").onclick = function(){
// document.getElementById('bpopup').style.display = "none";
//document.body.removeAttribute("style");
//document.documentElement.removeAttribute("style");
//}
';
contentHtml += '
'+tranTime(array[len-1].dateline)+' ';
contentHtml += '
'+array[len-1].author+' ';
contentHtml += '
['+array[len-1].locale+'] ';
contentHtml += '
';
//只有1条评论
if(count == 1){
contentHtml += '
';
contentHtml += '
'+tranMessage(array[0].message)+'
';
contentHtml += '
';
contentHtml += getUserContent(loginFlag,array[0]);
contentHtml += '
';
//评论条数1-divide
}else if(count > 1 && count <=divide ){
contentHtml += '
'+replaceHtml+'
';
contentHtml += '
'+tranMessage(array[len-1].message)+'
';
contentHtml += '
';
contentHtml += getUserContent(loginFlag,array[len-1]);
contentHtml += '
';
for(var i=len-2;i>=0;i--){
var html = '';
if(i==0){
html += '
';
html += '
'+tranMessage(array[i].message)+'
';
html += '
';
html += getUserContent(loginFlag,array[i]);
html += '
';
contentHtml = contentHtml.replace(replaceHtml,html);
}else{
html += '
'+replaceHtml+'
';
html += '
';
html += '
'+tranMessage(array[i].message)+'
';
html += '
';
html += getUserContent(loginFlag,array[i]);
html += '
';
contentHtml = contentHtml.replace(replaceHtml,html);
}
}
contentHtml += '
';
//评论条数大于divide
}else{
contentHtml += '
'+replaceHtml+'
';
contentHtml += '
';
contentHtml += '
'+tranMessage(array[len-1].message)+'
';
contentHtml += '
';
contentHtml += getUserContent(loginFlag,array[len-1]);
contentHtml += '
';
for(var i=len-2;i>=0;i--){
var html = '';
if(i==len-2&&i!=1){
html += '
'+replaceHtml+'
';
html += '
';
html += '
'+tranMessage(array[i].message)+'
';
html += '
';
html += getUserContent(loginFlag,array[i]);
html += '
';
contentHtml = contentHtml.replace(replaceHtml,html);
}else if(i==1){
html += '
';
html += '
' + replaceHtml + '
';
html += '
';
html += '
'+tranMessage(array[i].message)+'
';
html += '
';
html += getUserContent(loginFlag,array[i]);
html += '
';
html += '
';
html += '
';
contentHtml = contentHtml.replace(replaceHtml,html);
}else if(i==0){
html += '
';
html += '
'+tranMessage(array[i].message)+'
';
html += '
';
html += getUserContent(loginFlag,array[i]);
html += '
';
contentHtml = contentHtml.replace(replaceHtml,html);
}
}
contentHtml += '
';
}
return contentHtml;
}
//分页获取数据
function getData(page){
if(pageNum!=0&&(page<1||page>pageNum)){
return;
}
var url = "https://common.newcomment.cntv.cn/comment/gettree";
url += "/app/"+app +"/itemid/"+itemid+"/itemtype/"+itemtype+"/page/"+page+"/prepage/"+prepage;
$.ajax({
type: "get",
url: url,
dataType: "jsonp",
jsonp: "jsonp_callback",
jsonpCallback:"liuyan",
cache:true,
success: function (data) {
var code = data.code;
if(code=='20001'){
alert("请求的参数不全!");
return;
}else if(code=='20011'){
alert("应用不存在");
return;
}else if(code=='0'){
var data = data.data;
var total = data.total;
var divide = data.divide;
pageNum = Math.ceil(total/prepage);
var content = data.content;
var contentHtml = "";
var totalHtml = "";
for(var i=0;i
0)
{
contentHtml += (i==0)?'':'
';
contentHtml += getDataHtml(array,len,count,divide);
contentHtml += '
';
}
}
contentHtml += '
';
contentHtml += getPageHtml(page,pageNum);
$("#comment").html(contentHtml);
if(total==0){$("#commentCount").html("");}
else{
totalHtml = '
'+total+' 条评论'
$("#commentCount").html(totalHtml);
};
initUrl();
initMethod();
//展开全部
$(".discuss_comment .dcitem .content .showall a").click(function(){
var tid = $(this).attr('id');
var tidUrl = "https://newcomment.cntv.cn/comment/gettree";
tidUrl += "/app/"+app +"/itemid/"+itemid+"/itemtype/"+itemtype+"/?tid="+tid;
$.ajax({
type: "get",
url: tidUrl,
dataType: "jsonp",
jsonp: "jsonp_callback",
jsonpCallback:"liuyan"+tid,
cache:true,
success: function (data) {
var array = data.data.content;
var len = array.length;
var or2Html='';
or2Html += '
'+replaceHtml+'
';
or2Html += '
';
or2Html += '
'+tranMessage(array[array.length-2].message)+'
';
or2Html += '
';
or2Html += getUserContent(loginFlag,array[array.length-2]);
or2Html += '
';
for(var i=len-3;i>=0;i--){
var html = '';
if(i==0){
html += '
';
html += '
'+tranMessage(array[i].message)+'
';
html += '
';
html += getUserContent(loginFlag,array[i]);
html += '
';
or2Html = or2Html.replace(replaceHtml,html);
}else{
html += '
'+replaceHtml+'
';
html += '
';
html += '
'+tranMessage(array[i].message)+'
';
html += '
';
html += getUserContent(loginFlag,array[i]);
html += '
';
or2Html = or2Html.replace(replaceHtml,html);
}
}
$("#"+tid).parent().parent().parent().parent().find("#or2").html(or2Html);
$("#"+tid).parent().parent().parent().parent().find("#or1").eq(0).hide();
$("#"+tid).parent().parent().parent().parent().find("#or2").eq(0).show();
initUrl();
initMethod();
}
});
initUrl();
initMethod();
});
}else{
alert("获取评论失败!");
return;
}
}
});
}
//组装页码
function getPageHtml(curPage,totalPage){
var pageHtml = '';
if(totalPage==null||totalPage==0){
return pageHtml;
}
if(curPage<=0||curPage>totalPage){
return null;
}
var nextPage = parseInt(curPage) + 1;
pageHtml += '
';
pageHtml += '
< ';
if(totalPage<=maxPageNum){
for(var i=1;i<=totalPage;i++){
if(i==curPage){
pageHtml += '
'+i+' ';
}else{
pageHtml += '
'+i+' ';
}
}
}else{
var beginNum = 1;
if(curPage%maxPageNum==1||curPage%maxPageNum==2){
beginNum = (curPage - maxPageNum)<1?1:curPage;
}else if(curPage%maxPageNum>2&&((curPage%maxPageNum)<(maxPageNum-2))){
beginNum = curPage;
}else{
beginNum = (curPage + maxPageNum )> totalPage?(totalPage - maxPageNum + 1):curPage;
}
if((beginNum+maxPageNum-1)>totalPage ){
beginNum = totalPage - maxPageNum + 1;
}
for(var i=beginNum;i<=(beginNum+maxPageNum-1);i++){
if(i==curPage){
pageHtml += '
'+i+' ';
}else{
pageHtml += '
'+i+' ';
}
}
}
pageHtml += '
> ';
pageHtml += '
'
return pageHtml;
}
var timestamp = Date.parse(new Date())/1000;
//是否登录
function getUserContent(flag,obj){
var html = "";
html += '
';
//未登录
}else{
//
html += '
合作帐号: 登录 ';
html += '
| ';
html += '
';
html += '
';
html += '
合作帐号登录 ';
html += '
';
//html += ' ';
html += '×
';
}
return html;
}
//时间转换
function tranTime(t){
var time = new Date(t*1000);
return time.Format("yyyy-MM-dd hh:mm:ss");
}
//获取cookie
function getCookie(name) {
var arr, reg = new RegExp("(^| )" + name + "=([^;]*)(;|$)");
if (arr = document.cookie.match(reg)) return unescape(arr[2]);
else return null
}
//方法初始化
function initMethod(){
$(".discuss_log .logbox .postbox textarea").each(function(i) {
$(this).focus(function() {
$(".discuss_log .logbox").eq(i).css({"border-color":"#1e63b0"});
});
$(this).blur(function() {
$(".discuss_log .logbox").eq(i).css({"border-color":"#e7e7e7"});
});
});
$(".discuss_comment .dcitem .content .cont .replybox .postbox textarea").each(function(i) {
$(this).focus(function() {
$(".discuss_comment .dcitem .content .cont .replybox").eq(i).css({"border-color":"#1e63b0"});
});
$(this).blur(function() {
$(".discuss_comment .dcitem .content .cont .replybox").eq(i).css({"border-color":"#e7e7e7"});
});
});
$(".discuss_log .logbox .userbox .emotion").click(function(){
window.setTimeout(function(){
$(this).find(".embox").toggleClass("emboxshow");
},800);
});
$(".discuss_comment .dcitem .content .cont .replybox .userbox .emotion").click(function(){
$(this).find(".embox").toggleClass("emboxshow");
});
$(".discuss_log .logbox .userbox .logbtn .button a").click(function(){
$(".discuss_log .logpop").show();
});
$(".discuss_comment .logpop .close").click(function(){
//$(".discuss_log .logpop").hide();
$(this).parent().hide();
});
//登录
$(".discuss_comment .dcitem .content .cont .replybox .userbox .logbtn .button a").click(function(){
$(this).parent().parent().parent().parent().parent().children('.logpop').show();
//$(".discuss_comment .dcitem .content .cont .logpop").show();
});
$(".discuss_comment .dcitem .content .cont .logpop .close").click(function(){
$(this).parent().parent().parent().parent().parent().children('.logpop').hide();
//$(".discuss_comment .dcitem .content .cont .logpop").hide();
});
$(".discuss_comment .dcitem .content .cont .func a.zan").eq(0).click(function(){
$(".discuss_comment .dcitem .content .cont .func a.zan").eq(0).addClass("zanplus");
var t=setTimeout(function(){$(".discuss_comment .dcitem .content .cont .func a.zan").eq(0).attr("class","zaned")},2000);
});
$(".discuss_comment .dcitem .content .cont .func a.cai").eq(0).click(function(){
$(".discuss_comment .dcitem .content .cont .func a.cai").eq(0).addClass("caiplus");
var t=setTimeout(function(){$(".discuss_comment .dcitem .content .cont .func a.cai").eq(0).attr("class","caied")},2000);
});
//回复
$(".discuss_comment a.reply").click(function(){
var css = $(this).parent().parent().parent().find('div').eq(2).attr('class');
if(css.indexOf('replyboxshow')==-1){
$(this).parent().parent().parent().find('div').eq(2).addClass("replyboxshow");
}else{
$(this).parent().parent().parent().find('div').eq(2).removeClass("replyboxshow");
}
});
//登录方法
$(".discuss_comment .dl").click(function(){
var username = $(this).parent().parent().parent().find("#name").eq(0).val();
var password = $(this).parent().parent().parent().find("#password").eq(0).val();
var re = /[^\u4e00-\u9fa5]/;
var flg = re.test(username);
if (username == "" || username == "邮箱/手机号") {
alert("账号不能为空");
return;
} else if (password == "") {
alert("密码不能为空!");
return;
} else if (flg == false) {
alert("帐号或密码错误");
return;
}
var url = 'https://reg.cctv.com/login/login.action?callback=?&username='+encodeURI(username)+'&password='+encodeURI(password)+'&service=client_transaction&from='+ nowUrl+'&referer=' + encodeURI(nowDomain);
$.getJSON(url,function(data){
var msg = data.errMsg;
if(msg!='成功'){
alert(msg);
}
if(msg=='成功'){
window.location.reload();
}
});
});
//文本框校验
$(".discuss_comment textarea").keyup(function(){
var commentContent = $(this).val();
var commentLength = commentContent.length;
if(commentLength>0&&commentLength<=300){
$(this).parent().parent().find("#comment_jiaoyan").eq(0).attr('class','wtips');
$(this).parent().parent().find("#comment_jiaoyan").eq(0).html('还可输入
' + (limit - commentLength ) + ' 字' );
}else if(commentLength>300){
$(this).parent().parent().find("#comment_jiaoyan").eq(0).attr('class','tips');
$(this).parent().parent().find("#comment_jiaoyan").eq(0).html('请将评论内容限制在300字以内');
}else if(commentLength==0){
$(this).parent().parent().find("#comment_jiaoyan").eq(0).attr('class','tips');
$(this).parent().parent().find("#comment_jiaoyan").eq(0).html('请填写评论内容');
}
});
//插入表情
$(".discuss_comment .embox img").unbind("click").click(function(){
var content = $(this).attr('alt');
$(this).parent().parent().parent().parent().find('textarea').eq(0).val($(this).parent().parent().parent().parent().find('textarea').eq(0).val()+content);
});
//复制
$(".discuss_comment .copy").click(function(){
$(".discuss_tips").show();
$(".discuss_tips .cont p").eq(1).hide();
$(".discuss_tips .cont p").eq(0).show();
$(".discuss_tips .button").eq(1).hide();
$(".discuss_tips .button").eq(0).show();
});
$(".discuss_tips .button a").eq(0).click(function(){
if(copy2Clipboard(pageUrl)!=false){
$(".discuss_tips .cont p").eq(0).hide();
$(".discuss_tips .cont p").eq(1).show();
$(".discuss_tips .button").eq(0).hide();
$(".discuss_tips .button").eq(1).show();
}
});
$(".discuss_tips .button a").eq(1).click(function(){
$(".discuss_tips").hide();
});
$(".discuss_tips .button a").eq(2).click(function(){
$(".discuss_tips").hide();
});
}
//合作、注册、忘记密码链接初始化
function initUrl(){
//合作账号初始化
$("[id^=comment_qq]").attr('href',"https://reg.cctv.com/openapi/v2/user/oauth/qq?timestamp="+timestamp+"&appid=dgtGyfXwN9Gcr7ow&methodl=login&backurl="+encodeURIComponent(encodeURIComponent(nowUrl)));
//$("[id^=comment_rr]").attr('href','http://oauth.passport.cctv.com/OAuthRenRenClient/OAuthRenRenClientServlet.do?method=login&cntv_callback='+nowUrl);
//$("[id^=comment_kx]").attr('href','http://oauth.passport.cctv.com/OAuthKaixinClient/connect/index.jsp?cntv_callback='+nowUrl);
//注册
$("[id^=comment_regist]").attr('href','https://reg.cctv.com/regist/regist.jsp?from='+nowUrl+'&backurl='+nowUrl);
//忘记密码
$("[id^=comment_forget]").attr('href','https://reg.cctv.com/forgetPassword/findPassword.jsp');
}
//替换图片
function tranMessage(message){
for(var i=1;i<=30;i++){
if(message.indexOf('[em:' + i + ':]')!=-1){
var tmp = '[em:' + i + ':]';
var reg=new RegExp("\\"+tmp,"g");
message = message.replace(reg, "
");
}
}
return message;
}
$(function(){
getData(parseInt(page));
$("#copy_content").html(decodeURI(title) + '
'+pageUrl+' ');
function tipsposition(){
var ww=$(window).width(),
hh=$(window).height(),
st=$(window).scrollTop(),
tw=$(".discuss_tips").width(),
th=$(".discuss_tips").height(),
tl=(ww-tw)/2,
tt=st+(hh-th)/2;
$(".discuss_tips").css({left:tl,top:tt});
}
window.onload=window.onscroll=window.onresize=tipsposition;
});
var passwordkey = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o",
"p","q","r","s","t","u","v","w","x","y","z","A","B","C","D",
"E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S",
"T","U","V","W","X","Y","Z","0","1","2","3","4","5","6","7","8","9"
];
function passkey(length){
var Str = "";
for(var i = 0 ; i
0&&commentLength<=300){
$("#comment_jiaoyan").attr('class','wtips');
$("#comment_jiaoyan").html('还可输入' + (commentLimit - commentLength ) + ' 字' );
}else if(commentLength>300){
$("#comment_jiaoyan").attr('class','tips');
$("#comment_jiaoyan").html('请将评论内容限制在300字以内');
}else if(commentLength==0){
$("#comment_jiaoyan").attr('class','tips');
$("#comment_jiaoyan").html('请填写评论内容');
}
}
//发表留言
function commentSubmitMessage(){
var message = $("#comment_content").val();
if(message==null||message=="" || message =="根据法律法规要求,请您绑定手机号完成后台实名认证后发表评论。感谢您的理解和支持!"){//兼容ieplaceholder
alert("留言不能为空!");
return;
}
if(message.length>300){
alert("留言字数太长!");
return;
}
var url = "https://newcomment.cctv.com/comment/post";
url += "/app/"+app +"/itemid/"+itemid+"/itemtype/"+itemtype;
url += "?message="+encodeURI(message)+"&authorid="+authorid+"&author="+encodeURI(author)+"&jsonp_callback=?";
$.getJSON(url,function(data){
var code = data.code;
if(code=="20927"){
var jUrl = "//reg.cctv.com/authenicateAction/mobile/bind.html?service="+window.location.href;
var jUrl1 = jUrl.split("=")[1];
window.location.href= "//reg.cctv.com/authenicateAction/mobile/bind.html?formFlag=3&userSeqId="+userSeqId+"&service="+jUrl1;
}else if(code=='0')
{
alert("留言成功");
}
else{
alert(data.msg);
}
});
$("#comment_content").val('')
}
//发表回复评论
function fabiaohuifuliuyan(obj){
var tid = $(obj).attr('tid');
var replyid = $(obj).attr('pid');
var message = $(obj).parent().parent().parent().find('textarea').eq(0).val();
if(message==null||message==""){//兼容ieplaceholder
alert("留言不能为空!");
return;
}
if(message.length>300){
alert("留言字数过长!");
return;
}
var url = "https://newcomment.cctv.com/comment/post";
url += "/app/"+app +"/itemid/"+itemid+"/itemtype/"+itemtype;
url += "?tid="+tid+"&replyid="+replyid+"&message="+encodeURI(message)+"&authorid="+authorid+"&author="+encodeURI(author)+"&jsonp_callback=?";
$.getJSON(url,function(data){
var code = data.code;
if(code=="20927"){
var jUrl = "//reg.cctv.com/authenicateAction/mobile/bind.html?service="+window.location.href;
var jUrl1 = jUrl.split("=")[1];
window.location.href= "//reg.cctv.com/authenicateAction/mobile/bind.html?formFlag=3&userSeqId="+userSeqId+"&service="+jUrl1;
}else if(code=='0')
{
alert("留言成功");
}
else{
alert(data.msg);
}
})
$(obj).parent().parent().parent().find('textarea').eq(0).val("");
}
//实名认证
function realName(){
var verifycode=getCookie("verifycode")
var userSeqId=getCookie("userSeqId")
if (verifycode == null){
return;
}else{
$.ajax({
type: "post",
url: "//reg.cctv.com/openapi/v2/user/isAuth",
dataType: "json",
data:{
"timestamp":timestamp, //当前时间戳
"appid":"dgtGyfXwN9Gcr7ow" //管理员分配给业务线应用的唯一标识
},
xhrFields: {
withCredentials: true
},
crossDomain: true, //添加跨域参数是为了将登录标识(token)带过去验证
success:function(data){
if (data.data == 0){//不是
alert("根据法律法规要求,请您绑定手机号完成后台实名认证后发表评论。感谢您的理解和支持!");
var jUrl = "//reg.cctv.com/authentication?service="+window.location.href;
var jUrl1 = jUrl.split("=")[1];
window.location.href= "//reg.cctv.com/authentication?formFlag=3&userSeqId="+userSeqId+"&service="+jUrl1;
//window.open("//reg.cctv.com/authentication?service="+window.location.href);
}else{
isshiming=true;
commentSubmitMessage();
return;
}
},
error: function (data) {
alert("ajax失败:"+data.errtype)
}
});
}
}
function huifurealName(obj){
var verifycode=getCookie("verifycode")
var userSeqId=getCookie("userSeqId")
if (verifycode == null){
return;
}else{
$.ajax({
type: "post",
url: "//reg.cctv.com/openapi/v2/user/isAuth",
dataType: "json",
data:{
"timestamp":timestamp, //当前时间戳
"appid":"dgtGyfXwN9Gcr7ow" //管理员分配给业务线应用的唯一标识
},
xhrFields: {
withCredentials: true
},
crossDomain: true, //添加跨域参数是为了将登录标识(token)带过去验证
success:function(data){
if (data.data == 0){//不是
alert("根据法律法规要求,请您绑定手机号完成后台实名认证后发表评论。感谢您的理解和支持!");
var jUrl = "//reg.cctv.com/authentication?service="+window.location.href;
var jUrl1 = jUrl.split("=")[1];
window.location.href= "//reg.cctv.com/authentication?formFlag=3&userSeqId="+userSeqId+"&service="+jUrl1;
//window.open("//reg.cctv.com/authentication?service="+window.location.href);
}else{
isshiming=true;
fabiaohuifuliuyan(obj);
return;
}
},
error: function (data) {
alert("ajax失败:"+data.errtype)
}
});
}
}
function realName1(){
var verifycode=getCookie("verifycode")
var userSeqId=getCookie("userSeqId")
if (verifycode == null){
return;
}else{
$.ajax({
type: "post",
url: "//reg.cctv.com/openapi/v2/user/isAuth",
dataType: "json",
data:{
"timestamp":timestamp, //当前时间戳
"appid":"dgtGyfXwN9Gcr7ow" //管理员分配给业务线应用的唯一标识
},
xhrFields: {
withCredentials: true
},
crossDomain: true, //添加跨域参数是为了将登录标识(token)带过去验证
success:function(data){
if (data.data == 0){//不是
alert("根据法律法规要求,请您绑定手机号完成后台实名认证后发表评论。感谢您的理解和支持!");
var jUrl = "//reg.cctv.com/authentication?service="+window.location.href;
var jUrl1 = jUrl.split("=")[1];
window.location.href= "//reg.cctv.com/authentication?formFlag=3&userSeqId="+userSeqId+"&service="+jUrl1;
//window.open("//reg.cctv.com/authentication?service="+window.location.href);
}else{
isshiming=true;
return;
}
},
error: function (data) {
alert("ajax失败:"+data.errtype)
}
});
}
}
//点击判断实名制
$("#comment_content").click(function(){
if(!isshiming){
realName1();
}
})
//兼容ie的placeholder效果
function placeholder(target){
$(target).attr("placeholder","")
$(target).attr("datavalue","根据法律法规要求,请您绑定手机号完成后台实名认证后发表评论。感谢您的理解和支持!")
$(target).val($(target).attr("datavalue")).addClass("inp");
$(target).css("color","#757575")
$(target).focus(function() {
if($(this).val() == $(this).attr("datavalue")) {
$(this).val("").removeClass("inp");
$(target).css("color","#000")
}
})
$(target).blur(function(){
if($(this).val() == "" || $(this).val() == $(this).attr("datavalue")) {
$(this).val($(target).attr("datavalue")).addClass("inp");
$(target).css("color","#757575")
}
})
}
$(function(){
//页面初始化
commentInit();
//调用兼容ie的placeholder
placeholder("#comment_content")
//合作账号初始化
$("[id^=comment_qq]").attr('href',"https://reg.cctv.com/openapi/v2/user/oauth/qq?timestamp="+timestamp+"&appid=dgtGyfXwN9Gcr7ow&methodl=login&backurl="+encodeURIComponent(encodeURIComponent(nowUrl)));
//$("[id^=comment_rr]").attr('href','http://oauth.passport.cctv.com/OAuthRenRenClient/OAuthRenRenClientServlet.do?method=login&cntv_callback='+encodeURI(pageUrl));
//$("[id^=comment_kx]").attr('href','http://oauth.passport.cctv.com/OAuthKaixinClient/connect/index.jsp?cntv_callback='+encodeURI(pageUrl));
//注册
$("[id^=comment_regist]").attr('href','https://reg.cctv.com/regist/regist.jsp?from='+encodeURI(pageUrl)+'&backurl='+encodeURI(pageUrl));
$(".emotion").click(function(){
var commentIframe = $("#comment_iframe",parent.document.body);
var height = commentIframe.attr('height');
if(height=='239'){
commentIframe.attr('height','300');
}else if(height=='0'){
commentIframe.attr('height','239');
}else{
commentIframe.attr('height','239');
}
});
$("#comment_embox img").click(function(){
if ($("#comment_content").val() == "根据法律法规要求,请您绑定手机号完成后台实名认证后发表评论。感谢您的理解和支持!")
{ $("#comment_content").val("");}
var img = $(this).attr('alt');
$("#comment_content").val($("#comment_content").val()+img);
var commentIframe = $("#comment_iframe",parent.document.body);
commentIframe.attr('height','0');
});
});