function ETravelCMS_Comment_Action(sdo,id){
if(sdo==1){
$('#ETravelCMS_Comment_Good'+id).load('/system/comment.asp?do=dafencomment&g=1&id='+id);
}else{
$('#ETravelCMS_Comment_Shit'+id).load('/system/comment.asp?do=dafencomment&g=0&id='+id);
}
}
function ETravelCMS_Comment_PageChange(page){$('#ETravelCMS_Comment_List').load('/system/comment.asp?do=list&cid=14421&ctype=Module&page='+page+'&T='+Math.random());}
function ETravelCMS_Comment_Re_Post(id){
if($.trim($('#ETravelCMS_Comment_RePost_Name').val())==''){
$('#ETravelCMS_Comment_RePost_Msg').css({color:'#FF0000'}).text('姓名必需填写!');
}else if($.trim($('#ETravelCMS_Comment_RePost_Content').val()).length<8){
$('#ETravelCMS_Comment_RePost_Msg').css({color:'#FF0000'}).text('评论内容不能少于8个字符!');
}else{
$('#ETravelCMS_Comment_RePost_Msg').css({color:'#008000'}).text('评论数据发送中……');
$("#ETravelCMS_Comment_RePost_Button").attr("disabled",true);
$.post('/system/comment.asp?do=repost',{id:'14421',reid:id,type:'Module',name:escape($('#ETravelCMS_Comment_RePost_Name').val()),contact:escape($('#ETravelCMS_Comment_RePost_Contact').val()),content:escape($('#ETravelCMS_Comment_RePost_Content').val())},function(data){
$(".ETravelCMS_Comment_Re_Post").each(function(){$(this).remove()})
});
}
}
function ETravelCMS_Comment_ReNClick(o){if(o.value=='游客')o.value='';}
function ETravelCMS_Comment_ReNBlur(o){if(o.value=='')o.value='游客';}
function ETravelCMS_Comment_Re(id,obj){
$(".ETravelCMS_Comment_Re_Post").each(function(){$(this).remove()})
$(obj).parent().parent().after('
');
}
$(
function(){
$('#ETravelCMS_Comment_PostForm').html('
姓名:联系方式:
');
$('#ETravelCMS_Comment_Post_Name').click(
function(){
if(this.value=='游客')this.value='';
}
).blur(
function(){
if(this.value=='')this.value='游客'
}
);
$('#ETravelCMS_Comment_Post_Button').click(
function(){
if($.trim($('#ETravelCMS_Comment_Post_Name').val())==''){
$('#ETravelCMS_Comment_Post_Msg').css({color:'#FF0000'}).text('姓名必需填写!');
}else if($.trim($('#ETravelCMS_Comment_Post_Content').val()).length<8){
$('#ETravelCMS_Comment_Post_Msg').css({color:'#FF0000'}).text('评论内容不能少于8个字符!');
}else{
$('#ETravelCMS_Comment_Post_Msg').css({color:'#008000'}).text('评论数据发送中……');
this.disabled=true;
$.post('/system/comment.asp?do=post',{id:'14421',type:'Module',name:escape($('#ETravelCMS_Comment_Post_Name').val()),contact:escape($('#ETravelCMS_Comment_Post_Contact').val()),content:escape($('#ETravelCMS_Comment_Post_Content').val())},function(data){
$('#ETravelCMS_Comment_Post_Button').removeAttr('disabled');
$('#ETravelCMS_Comment_Post_Msg').css({color:'#008000'}).text('完成!');
$('#ETravelCMS_Comment_List').html('- '+$('#ETravelCMS_Comment_Post_Name').val()+' 说道:
- '+$('#ETravelCMS_Comment_Post_Content').val().replace(/\n/g,'
')+'
'+$('#ETravelCMS_Comment_List').html());
$('#ETravelCMS_Comment_Post_Contact').val('');
$('#ETravelCMS_Comment_Post_Content').val('');
setTimeout(function(){$('#ETravelCMS_Comment_Post_Msg').text('')},3000);
});
}
}
)
$('#ETravelCMS_Comment_List').load('/system/comment.asp?do=list&cid=14421&ctype=Module&T='+Math.random());
}
);