document.getElementById("comments_box").NetName.focus();
function CheckComments()
    {
        var reg = /<(.[^>]*)>/g;
        
        //验证留言姓名
	    if (document.comments_box.NetName.value.replace(/\s/g,'') == '') {
		    alert("请输入您的大名.");
		    document.comments_box.NetName.focus();
		    return false;
	    }
	    if (reg.test(document.comments_box.NetName.value)) {  //判断是否包含HTML标签
		    alert("你的大名不能包含HTML标签.");
		    document.comments_box.NetName.focus();
		    return false;
	    }
	    if (document.comments_box.NetName.value.replace(/[^\x00-\xff]/ig,'aa').length < 2) {  //转换1个中文为2个字符，并判断字符长度
		    alert("你的大名不能少于2个英文字符，一个中文字符等于2个英文字符.");
		    document.comments_box.NetName.focus();
		    return false;
	    }
	    if (document.comments_box.NetName.value.replace(/[^\x00-\xff]/ig,'aa').length > 12) {
		    alert("你的大名不能少于6个英文字符，一个中文字符等于2个英文字符.");
		    document.comments_box.NetName.focus();
		    return false;
	    }
	    
	    //验证留言内容
	    if (document.comments_box.Content.value.replace(/\s/g,'') == '') {
		    alert("请输入留言内容.");
		    document.comments_box.Content.focus();
		    return false;
	    }
	    if (reg.test(document.comments_box.Content.value)) {
		    alert("留言内容不能包含HTML标签.");
		    document.comments_box.Content.focus();
		    return false;
	    }
	    if (document.comments_box.Content.value.replace(/[^\x00-\xff]/ig,'aa').length < 8) {
		    alert("留言内容不能少于8个英文字符，一个中文字符等于2个英文字符.");
		    document.comments_box.Content.focus();
		    return false;
	    }
	    if (document.comments_box.Content.value.replace(/[^\x00-\xff]/ig,'aa').length > 360) {
		    alert("留言内容不能多于180个英文字符，一个中文字符等于2个英文字符.");
		    document.comments_box.Content.focus();
		    return false;
	    }
	return true;
    }