// JavaScript Document
String.prototype.trim = function()
{
	// 用正则表达式将前后空格
	// 用空字符串替代。
	return this.replace(/(^\s*)|(\s*$)/g, "");
}
/**
 * 统计字符串字节数
 *
 * return	integer
 */
String.prototype.ByteCount = function()
{
	txt = this.replace(/(<.*?>)/ig,'');
	txt = txt.replace(/([\u0391-\uFFE5])/ig, '11');
	var count = txt.length;
	return count;
}
//举报
function checkjb()
{
	//内容
	if(document.jbform.Content.value=="您举报的原因：")
	{
		alert("请输入举报内容，字数限定在5～200个字符。");
		document.jbform.Content.focus();
		return false;
	}
	var count = document.jbform.Content.value.trim().ByteCount();
	if ( count < 4 || count > 400 )
	{
		alert("请输入举报内容，字数限定在2～200个汉字，即4～400个英文字符。");
		document.jbform.Content.focus();
		return false;
	}
	if(document.jbform.Contact.value=="")
	{
		alert("请输入您的联系方式，否则不接受您的举报！\n\n可以是电子邮件、电话、手机、Msn等联系方式。");
		document.jbform.Contact.focus();
		return false;
		}
	document.jbform.jbSubmit.value='正在提交...';
	document.jbform.jbSubmit.disabled=true;
}
//回复
function checkreply()
{
	var count = document.replyform.Content.value.trim().ByteCount();
	if ( count < 4 || count > 400 )
	{
		alert("请输入回复内容，字数限定在2～200个汉字，即4～400个英文字符。");
		document.replyform.Content.focus();
		return false;
	}
	document.replyform.replySubmit.value='正在提交...';
	document.replyform.replySubmit.disabled=true;
	document.replyform.replyreSubmit.disabled=true;
}
function multi_click()
{
	if(document.all("navcontent").style.display == "none")
	{
		document.all("navcontent").style.display = "block";
		}
	else
	{
		document.all("navcontent").style.display = "none";
		}
}
