document.write("
");
document.write("");
try{
new Ajax.Updater('divCommonComment', '/commentFront.do?method=loadComment&objid=news_5234&width=550px&cate=&turnPage=', {asynchronous:true,evalScripts:true});
}catch(e){
$("#divCommonComment").load("/commentFront.do?method=loadComment&objid=news_5234&width=550px&cate=&turnPage=");
}
function commentTurnOn(obj,poll,num){
obj.className = "square off";
var tag = document.getElementById("poll_"+poll);
obj.className="square on";
for(var i=1;i<=5;i++){
var o = document.getElementById("pimg_"+poll+"_"+i);
if(i<=num || tag.value>=i){if(o.className!="square on")o.className="square on";}
else{if(o.className!="square off")o.className="square off";}
}
}
function commentTurnOff(obj,poll,num){
var tag = document.getElementById("poll_"+poll).value*1;
num = num*1;
//if(tagtag){if(o.className!="square off")o.className="square off";}
}
}
function commentConfirmPoll(obj,poll,num){
obj.className = "square on";
var tag = document.getElementById("poll_"+poll);
tag.value = num;
for(var i=1;i<=5;i++){
var o = document.getElementById("pimg_"+poll+"_"+i);
if(i<=num){if(o.className!="square on")o.className="square on";}
else{if(o.className!="square off")o.className="square off";}
}
}
function delCommonComment(tips,id) {
if(confirm(tips)) {
document.getElementById("divMsgComment").style.display = 'block';
var url = "/admin/commentAdmin.do?method=commentDels&from=front&commentIds="+id;
try{new Ajax.Updater('divMsgComment', url, {asynchronous:true,evalScripts:true});}
catch(e){$("#divMsgComment").load(url);}
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+']';
}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.getElementById("FCKeditor1").value = "[quote]原贴由"+name+"于"+time+"发表
"+tmp+"[/quote]\r";document.all.FCKeditor1.focus();
}catch(e){ }
}
function cc(){
try{
var e = event.srcElement;
var r =e.createTextRange();
r.moveStart('character',e.value.length);
r.collapse(true);
r.select();
}catch(e){}
}
function hotelCNCommentPage(objid,width,cCate,tTurnPage,currentPage){
try{
new Ajax.Updater('divCommonComment', '/commentFront.do?method=loadComment&objid='+objid+'&width='+width+'&cate='+cCate+'&turnPage='+tTurnPage+'¤tPage='+currentPage, {asynchronous:true,evalScripts:true});
}catch(e){
$("#divCommonComment").load("/commentFront.do?method=loadComment&objid="+objid+"&width="+width+"&cate="+cCate+"&turnPage="+tTurnPage+"¤tPage="+currentPage);
}
}