document.write(""); document.write("
loading...
"); new Ajax.Updater('divCommonComment', '/commentFront.do?method=loadComment&width=700&inputwidth=500&objid=post_236857&action=', {asynchronous:true,evalScripts:true}); function delCommonComment(tips,id) { if(confirm(tips)) { document.getElementById("divMsgComment").style.display = 'block'; new Ajax.Updater('divMsgComment', '/deleteNewsComment.do?commentId='+id, {asynchronous:true,evalScripts:true}); return true; } return false; } function addComment(name){ try{ if(document.getElementById(name).value.Trim() == ''){ alert('评论内容不能为空!'); return false; } if(!checkLength(document.getElementById(name).value.Trim(),300)) { alert('评论字数过多!'); render(document.getElementById(name),300); return false; } return true; }catch(e){return false;} } function addEmotion(id){ try{ //document.all.FCKeditor1.value = document.all.FCKeditor1.value + '[:'+id+']'; var sv = document.getElementById("commentContent"); sv.innerHTML = sv.innerHTML + ""; }catch(e){ } } function addEmotion2(id){ try{ //document.all.FCKeditor1.value = document.all.FCKeditor1.value + '[:'+id+']'; var sv = document.getElementById("commentContent"); sv.innerHTML = sv.innerHTML + ""; }catch(e){ } } function addQuote(id,name,time){ try{ var tmp = document.getElementById("commentBody_"+id).innerHTML; /* if(tmp.indexOf("")!=-1){ var s = tmp.indexOf("")+10; var e = tmp.length; window.status="s="+s+"; e="+e+">>>"+tmp; tmp = tmp.substring(s,e); } */ // document.all.FCKeditor1.value = "[quote]引用:
原贴由"+name+"于"+time+"发表
"+tmp+"[/quote]\r";document.all.FCKeditor1.focus(); document.getElementById("commentContent").innerHTML = "
引用:原贴由"+name+"于"+time+"发表
"+tmp+"


";document.getElementById("commentContent").focus(); }catch(e){ } } function addReply(id,floor){ var tmp = document.getElementById("commentBody_"+id).innerHTML; document.getElementById("commentContent").innerHTML = "
回复 "+floor+"楼:"+tmp+"


"; document.getElementById("commentContent").focus(); } function cc(){   var e = event.srcElement;   var r =e.createTextRange();   r.moveStart('character',e.value.length);   r.collapse(true);   r.select(); } function anonCheck(obj){ var tn = ""; var un = document.getElementById("username"); if(obj.checked){ un.value="匿名驴"; un.readOnly=true; }else{ un.value = tn; un.readOnly=false; } } function anonCheck(form, obj){ var tn = ""; var un = document.getElementById(form).username; if(obj.checked){ un.value="匿名驴"; un.readOnly=true; }else{ un.value = tn; un.readOnly=false; } } function addFriend(id){ var url = "/addFriend.do?memberid="+id+"&callType=ajax"; new Ajax.Updater('', url, {asynchronous:true,evalScripts:true,onComplete:addFriended}); } function addFriended(originalRequest){ var cValue = originalRequest.responseText; if(cValue=="true"){ alert("好友添加成功"); }else{ alert("好友添加失败"); } } function isValidLCommentForm(){ var sv = document.getElementById("commentContent").innerHTML; var v = document.getElementById("FCKeditor1"); v.value = sv; if(v.value==""){ alert("评论内容不能为空");return false; } /* var ci = document.getElementById("j_captcha_response"); if(ci.value.Trim()==""){alert("请输入校验码");return false;} */ return true; }