function check(oForm){
	try{
		checkNull(oForm.C_JDSM.value,"主题不能为空!");
		checkNull(oForm.C_TSLR.value,"投诉内容不能为空!");
		checkNull(oForm.C_TSR.value,"请留下你的姓名!");
		checkNull(oForm.C_LXDH.value,"请留下你的联系电话!");
		checkReg(oForm.C_EMAIL.value.trim(),
			/^[\w.-]+@[\w]+(\.[\w]+)+$/,"电子邮件不正确",true);
		checkReg(oForm.C_LXDH.value.trim(),
			/^[\d\+\(\)\-# ]{5,}$/,"电话输入不正确",true);
	}catch(ex){
		alert("错误:"+ex);
		return false;
	}
	if(confirm("确定已经填写正确要提交吗？"))
		return true;
	else 
		return false;
}
String.prototype.trim=function(){
	return this.replace(/(^\s+)|(\s+$)/g,'');
}
function checkNull(s,msg){
	if(s==null || s.replace(/(^\s+)|(\s+$)/g,'')=='')
		throw msg;
	return s;
}
function checkReg(s,reg,msg,allowNull){
	if(allowNull && s.replace(/(^\s+)|(\s+$)/g,'')=='')
	{
		return;
	}
	if( !(reg.test(s)))
		throw msg;
	return s;
}

