//增大字体
function ChangeSize(size){	var objSize=document.getElementById('container');objSize.style.fontSize=size+"px";}

//添加收藏
function AddFav(){	window.external.AddFavorite(window.document.location.href, document.title)}

function strIsNull(str)   
	{   
	var patrn=/['|*|%|`|&]/;	
	if (!patrn.exec(str)) return false 
	return true
} 
		
function plcheack(){
	var pinlun=document.pinlun;
	
	if (pinlun.plname.value.replace(/ /g,"")==""){
		alert("网友呢称不能为空");
		pinlun.plname.focus();
		return false;
		}
	if (pinlun.plname.value.replace(/ /g,"").length < 2){
		alert("网友呢称太短了吧，有这么短的吗？");
		pinlun.plname.focus();
		return false;
		}
	if (pinlun.plname.value.replace(/ /g,"").length > 15){
		alert("网友呢称太长了吧，有这么长的吗？");
		pinlun.plname.focus();
		return false;
		}
	if (strIsNull(pinlun.plname.value)){
		alert("网友呢称中有非法字符，请正确输入您的呢称");
		pinlun.plname.focus();
		return false;
		} 
			

	if (pinlun.conter.value.replace(/ /g,"")==""){
		alert("评论内容不能为空");
		pinlun.conter.focus();
		return false;
		}
	if (pinlun.conter.value.replace(/ /g,"").length<4){
		alert("评论内容太短了");
		pinlun.conter.focus();
		return false;
		}	
	if (pinlun.conter.value.replace(/ /g,"").length>200){
		alert("评论内容不可超过 200 个!!!\n\n当前的评论内容长度为："+ pinlun.conter.value.replace(/ /g,"").length +"");
		pinlun.conter.focus();
		return false;
		}
	if (strIsNull(pinlun.conter.value)){
		alert("评论内容里有非法字符，请正确输入您的评论");
		pinlun.conter.focus();
		return false;
		}
		
	if (pinlun.yianzhen.value.replace(/ /g,"")==""){
		alert("验证码不能为空\n\n请认真填写验证码");
		pinlun.yianzhen.focus();
		return false;
		}
	if (isNaN(pinlun.yianzhen.value)){
		alert("验证码必须为数字\n\n请认真填写验证码");
		pinlun.yianzhen.value="";
		pinlun.yianzhen.focus();
		return false;
		}	
			
	return true;	
}
