//数据类型检查正则表达式
Reg_Null="^$";

Reg_OneSpace="^ $";
Reg_Space="^ {0,}$";
Reg_Blank="^ {0,}$";

Reg_Boolean="^(true|false)$";
Reg_Int="^(+|-)?[0-9]{1,}$";
Reg_ZeroInt="^[0]{1,}$";

Reg_PosInt="^(+)?(1-9)[0-9]{0,}$";
Reg_NegInt="^(-)(1-9)[0-9]{0,}$";
Reg_NoNegInt="^(+)?[0-9]{1,}$";

Reg_Double="^(+|-)?[0-9]{1,}(.[0-9]{0,})?$";
Reg_PosDouble="^(+)?[0-9]{1,}(.[0-9]{0,})?$";
Reg_NegDouble="^(-)?[0-9]{1,}(.[0-9]{0,})?$";
Reg_ZeroDouble="^(+|-)0(.[0-9]{0,})?$";

Reg_Number="^[0-9]{1,}$";
Reg_NumTel="^[0-9]{1,}$";
Reg_Tel="^(([0-9]{1,}-)?[0-9]{1,}-)?[0-9]{1,}(#[0-9]{1,})?$";
Reg_ExtTel="^(([0-9]{1,}-)?[0-9]{1,}-)?[0-9]{1,}(#[0-9]{1,})?(@.)?$";
Reg_Email="^([^(@|\.)]{1,})@([^(@|\.)]{1,})(\.[^(@|\.)]{1,}){0,}$";
Reg_ExtEmail="^([^(@|\.)]{1,})@([^(@|\.)]{1,})(\.[^(@|\.)]{1,}){0,}$";
Reg_MultiEmail="^(([^(@|\.)]{1,})@([^(@|\.)]{1,})(\.[^(@|\.)]{1,}){0,}(;|,)){1,}$";
Reg_ChsZip="^[0-9]{6}$";
Reg_Zip="^[0-9]{1,}(-[0-9]{1,}){1,}$";
Reg_Date="^d{0,4}(-)?(-)?()$";
Reg_Year="^(BC|AD)?[0,9][0-9]{0,3}$";
Reg_Month="^((0?[1,9])|(1[0-2]))$";
Reg_Day="^((0?[1,9])|((1|2)[0-2])|(3[0-1]))$";
Reg_Hour="^(((0|1)[1-9])|(2[0-3]))$";
Reg_Minute="^[0-5][0-9]$";
Reg_Second="^[0-5][0-9]$";
Reg_Time="^(((0|1)[1-9])|(2[0-3])):[0-5]d$";
Reg_DateTime="^(((0|1)[1-9])|(2[0-3])):[0-5]d$";
Reg_IDCardNo="^([0-9]|[a-z]|[A-Z]){1,20}$";






//前台检查错误信息
Err_Null="请正确填写不填字段";
Err_NoNull="请正确填写必填字段";
Err_OneSpace="请正确填写单个空格";
Err_Space="请正确填写多个空格";
Err_Blank="请正确填写空字段";
Err_NoBlank="请正确填写非空字段";
Err_Boolean="请正确填写布尔型数据";
Err_Int="请正确填写整数";
Err_ZeroInt="请正确填写零";
Err_NoZeroInt="请正确填写非零";
Err_PosInt="请正确填写正整数";
Err_NegInt="请正确填写负整数";
Err_NoNegInt="请正确填写非负整数";
Err_="请正确填写";
Err_Double="请正确填写小数";
Err_PosDouble="请正确填写正小数";
Err_NegDouble="请正确填写负小数";
Err_ZeroDouble="请正确填写零小数";
Err_NoZeroDouble="请正确填写非零小数";
Err_Number="请正确填写数字";
Err_NumTel="请正确填写电话号码";
Err_Tel="请正确填写电话";
Err_ExtTel="请正确填写复杂电话";
Err_Email="请正确填写单个Email地址";
Err_ExtEmail="请正确填写扩展Email地址";
Err_MultiEmail="请正确填写Email地址";
Err_ChsZip="请正确填写中国邮编";
Err_Zip="请正确填写邮政编码";
Err_Date="请正确填写日期";
Err_Year="请正确填写年";
Err_Month="请正确填写月";
Err_Day="请正确填写日";
Err_Hour="请正确填写小时";
Err_Minute="请正确填写分钟";
Err_Second="请正确填写秒";
Err_Time="请正确填写时间";
Err_DateTime="请正确填写日期时间";
Err_EqualTo="请正确填写相等";
Err_NoEqualTo="请正确填写不等于";
Err_NoLargerThan="请正确填写不大于";
Err_NoSmallerThan="请正确填写不小于";
Err_LargerThan="请正确填写大于";
Err_SmallerThan="请正确填写小于";
Err_LongerThan="请正确填写长度长于";
Err_ShorterThan="请正确填写长度短于";
Err_InRange="请正确填写属于范围";
Err_InSet="请正确填写属于集合";
Err_IntInterval="请正确填写整数区间";
Err_DoubleInterval="请正确填写小数区间";
Err_DateInterval="请正确填写日期区间";
Err_TimeInterval="请正确填写时间区间";
Err_DateTimeInterval="请正确填写日期时间区间";
Err_Sum="请正确填写和";
Err_Sub="请正确填写差";
Err_Product="请正确填写积";
Err_Div="请正确填写商";
Err_Substring="请正确填写子串";
Err_IDCardNo="请正确填写身份证号码";
//数据类型检查函数，返回布尔值
function isNull(Expression){var Reg=new RegExp(Reg_Null, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isNoNull(Expression){ return true; }
function isOneSpace(Expression){var Reg=new RegExp(Reg_OneSpace, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isSpace(Expression){var Reg=new RegExp(Reg_Space, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isBlank(Expression){var Reg=new RegExp(Reg_Blank, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
	//function isNoBlank(Expression){ return true; }
function isBoolean(Expression){var Reg=new RegExp(Reg_Boolean, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isInt(Expression){var Reg=new RegExp(Reg_Int, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isZeroInt(Expression){var Reg=new RegExp(Reg_ZeroInt, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isNoZeroInt(Expression){ return true; }
function isPosInt(Expression){var Reg=new RegExp(Reg_PosInt, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isNegInt(Expression){var Reg=new RegExp(Reg_NegInt, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isNoNegInt(Expression){var Reg=new RegExp(Reg_NoNegInt, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function is(Expression){ return true; }
function isDouble(Expression){var Reg=new RegExp(Reg_Double, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isPosDouble(Expression){var Reg=new RegExp(Reg_PosDouble, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isNegDouble(Expression){var Reg=new RegExp(Reg_NegDouble, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isZeroDouble(Expression){var Reg=new RegExp(Reg_ZeroDouble, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isNoZeroDouble(Expression){ return true; }
function isNumber(Expression){var Reg=new RegExp(Reg_Number, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isNumTel(Expression){var Reg=new RegExp(Reg_NumTel, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isTel(Expression){var Reg=new RegExp(Reg_Tel, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isExtTel(Expression){var Reg=new RegExp(Reg_ExtTel, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isEmail(Expression){var Reg=new RegExp(Reg_Email, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isExtEmail(Expression){var Reg=new RegExp(Reg_ExtEmail, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isMultiEmail(Expression){var Reg=new RegExp(Reg_MultiEmail, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isChsZip(Expression){var Reg=new RegExp(Reg_ChsZip, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isZip(Expression){var Reg=new RegExp(Reg_Zip, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isDate(Expression){var Reg=new RegExp(Reg_Date, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isYear(Expression){var Reg=new RegExp(Reg_Year, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isMonth(Expression){var Reg=new RegExp(Reg_Month, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isDay(Expression){var Reg=new RegExp(Reg_Day, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isHour(Expression){var Reg=new RegExp(Reg_Hour, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isMinute(Expression){var Reg=new RegExp(Reg_Minute, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isSecond(Expression){var Reg=new RegExp(Reg_Second, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isTime(Expression){var Reg=new RegExp(Reg_Time, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isDateTime(Expression){var Reg=new RegExp(Reg_DateTime, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isIDCardNo(Expression){var Reg=new RegExp(Reg_IDCardNo, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isEqualTo(Expression){ return true; }
function isNoEqualTo(Expression){ return true; }
function isNoLargerThan(Expression){ return true; }
function isNoSmallerThan(Expression){ return true; }
function isLargerThan(Expression){ return true; }
function isSmallerThan(Expression){ return true; }


function isInRange(Expression){ return true; }
function isInSet(Expression){ return true; }
function isIntInterval(Expression){ return true; }
function isDoubleInterval(Expression){ return true; }
function isDateInterval(Expression){ return true; }
function isTimeInterval(Expression){ return true; }
function isDateTimeInterval(Expression){ return true; }
function isSum(Expression){ return true; }
function isSub(Expression){ return true; }
function isProduct(Expression){ return true; }
function isDiv(Expression){ return true; }
function isSubstring(Expression){ return true; }


//数据类型检查函数，显示错误信息
function chkNull(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isNull(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写不填字段。"); srcElement.select(); return false;}return true;}
function chkNoNull(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isNoNull(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写必填字段。"); srcElement.select(); return false;}return true;}
function chkOneSpace(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isOneSpace(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写单个空格。"); srcElement.select(); return false;}return true;}
function chkSpace(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isSpace(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写多个空格。"); srcElement.select(); return false;}return true;}
function chkBlank(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isBlank(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写空字段。"); srcElement.select(); return false;}return true;}
function chkNoBlank(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isNoBlank(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写非空字段。"); srcElement.select(); return false;}return true;}
function chkBoolean(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isBoolean(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写布尔型数据。"); srcElement.select(); return false;}return true;}
function chkInt(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isInt(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写整数。"); srcElement.select(); return false;}return true;}
function chkZeroInt(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isZeroInt(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写零。"); srcElement.select(); return false;}return true;}
function chkNoZeroInt(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isNoZeroInt(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写非零。"); srcElement.select(); return false;}return true;}
function chkPosInt(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isPosInt(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写正整数。"); srcElement.select(); return false;}return true;}
function chkNegInt(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isNegInt(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写负整数。"); srcElement.select(); return false;}return true;}
function chkNoNegInt(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isNoNegInt(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写非负整数。"); srcElement.select(); return false;}return true;}
function chkDouble(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isDouble(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写小数。"); srcElement.select(); return false;}return true;}
function chkPosDouble(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isPosDouble(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写正小数。"); srcElement.select(); return false;}return true;}
function chkNegDouble(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isNegDouble(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写负小数。"); srcElement.select(); return false;}return true;}
function chkZeroDouble(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isZeroDouble(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写零小数。"); srcElement.select(); return false;}return true;}
function chkNoZeroDouble(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isNoZeroDouble(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写非零小数。"); srcElement.select(); return false;}return true;}
function chkNumber(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isNumber(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写数字。"); srcElement.select(); return false;}return true;}
function chkNumTel(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isNumTel(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写电话号码。"); srcElement.select(); return false;}return true;}
function chkTel(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isTel(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写电话。"); srcElement.select(); return false;}return true;}
function chkExtTel(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isExtTel(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写复杂电话。"); srcElement.select(); return false;}return true;}
function chkEmail(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isEmail(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写单个Email地址。"); srcElement.select(); return false;}return true;}
function chkExtEmail(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isExtEmail(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写扩展Email地址。"); srcElement.select(); return false;}return true;}
function chkMultiEmail(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isMultiEmail(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写Email地址。"); srcElement.select(); return false;}return true;}
function chkChsZip(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isChsZip(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写中国邮编。"); srcElement.select(); return false;}return true;}
function chkZip(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isZip(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写邮政编码。"); srcElement.select(); return false;}return true;}
function chkDate(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isDate(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写日期。"); srcElement.select(); return false;}return true;}
function chkYear(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isYear(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写年。"); srcElement.select(); return false;}return true;}
function chkMonth(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isMonth(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写月。"); srcElement.select(); return false;}return true;}
function chkDay(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isDay(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写日。"); srcElement.select(); return false;}return true;}
function chkHour(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isHour(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写小时。"); srcElement.select(); return false;}return true;}
function chkMinute(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isMinute(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写分钟。"); srcElement.select(); return false;}return true;}
function chkSecond(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isSecond(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写秒。"); srcElement.select(); return false;}return true;}
function chkTime(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isTime(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写时间。"); srcElement.select(); return false;}return true;}
function chkDateTime(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isDateTime(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写日期时间。"); srcElement.select(); return false;}return true;}
function chkEqualTo(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isEqualTo(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写相等。"); srcElement.select(); return false;}return true;}
function chkNoEqualTo(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isNoEqualTo(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写不等于。"); srcElement.select(); return false;}return true;}
function chkNoLargerThan(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isNoLargerThan(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写不大于。"); srcElement.select(); return false;}return true;}
function chkNoSmallerThan(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isNoSmallerThan(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写不小于。"); srcElement.select(); return false;}return true;}
function chkLargerThan(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isLargerThan(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写大于。"); srcElement.select(); return false;}return true;}
function chkSmallerThan(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isSmallerThan(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写小于。"); srcElement.select(); return false;}return true;}


function chkInRange(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isInRange(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写属于范围。"); srcElement.select(); return false;}return true;}
function chkInSet(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isInSet(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写属于集合。"); srcElement.select(); return false;}return true;}
function chkIntInterval(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isIntInterval(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写整数区间。"); srcElement.select(); return false;}return true;}
function chkDoubleInterval(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isDoubleInterval(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写小数区间。"); srcElement.select(); return false;}return true;}
function chkDateInterval(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isDateInterval(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写日期区间。"); srcElement.select(); return false;}return true;}
function chkTimeInterval(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isTimeInterval(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写时间区间。"); srcElement.select(); return false;}return true;}
function chkDateTimeInterval(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isDateTimeInterval(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写日期时间区间。"); srcElement.select(); return false;}return true;}
function chkSum(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isSum(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写和。"); srcElement.select(); return false;}return true;}
function chkSub(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isSub(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写差。"); srcElement.select(); return false;}return true;}
function chkProduct(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isProduct(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写积。"); srcElement.select(); return false;}return true;}
function chkDiv(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isDiv(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写商。"); srcElement.select(); return false;}return true;}
function chkSubstring(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isSubstring(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写子串。"); srcElement.select(); return false;}return true;}


//重新写的函数
function isNoBlank(Expression){ if(isBlank(Expression))	return false; else return true;  }

function isLongerThan(Expression, nLength){if (Expression.length>nLength) return true; else return false;}
function isShorterThan(Expression, nLength){if (Expression.length<nLength) return true; else return false; }
function isNoShorterThan(Expression, nLength){if (Expression.length<=nLength) return true; else return false; }
function isLength(Expression, nLength){ if (Expression.length==nLength) return true; else return false;}
function isNoLongerThan(Expression, nLength)
    {
	return (Expression.length<=nLength);
    }


function chkLongerThan	(srcElement){ VALUE=srcElement.value; nMaxLength=srcElement.maxlength; if(isNull(VALUE)) return true; else if(!isLongerThan	(VALUE,nMaxLength)){ alert(srcElement.showname+"输入不正确。\n请正确填写长度长于"+nMaxLength+"的字符串。"); srcElement.select(); return false;}return true;}
function chkNoLongerThan(srcElement)
    { 
	VALUE=srcElement.value; 
	nMaxLength=srcElement.maxlength; 
	if(isNull(VALUE)) return true; else if(!isNoLongerThan(VALUE,nMaxLength))
	    { 
		alert(srcElement.showname+"输入不正确。\n请正确填写长度不长于"+nMaxLength+"的字符串。"); 
		srcElement.select(); 
		srcElement.value = srcElement.value.substring(0, nMaxLength);
		return false;
	   }
	return true;
    }
function chkShorterThan	(srcElement){ VALUE=srcElement.value; nMaxLength=srcElement.maxlength; if(isNull(VALUE)) return true; else if(!isShorterThan	(VALUE,nMaxLength)){ alert(srcElement.showname+"输入不正确。\n请正确填写长度短于"+nMaxLength+"的字符串。"); srcElement.select(); return false;}return true;}
function chkNoShorterThan(srcElement){VALUE=srcElement.value; nMaxLength=srcElement.maxlength; if(isNull(VALUE)) return true; else if(!isNoShorterThan(VALUE,nMaxLength)){ alert(srcElement.showname+"输入不正确。\n请正确填写长度不短于"+nMaxLength+"的字符串。"); srcElement.select(); return false;}return true;}
function chkLength(srcElement)
    {
	VALUE=srcElement.value; 
	nMaxLength=srcElement.maxlength; 
	if(isNull(VALUE)) return true; else if(!isLength(VALUE,nMaxLength))
	    {
		alert(srcElement.showname+"输入不正确。\n请正确填写长度为"+nMaxLength+"的字符串。"); 
		srcElement.select();
		return false;
	    }
	return true;
    }

//数据类型检查正则表达式
Reg_Null="^$";

Reg_OneSpace="^ $";
Reg_Space="^ {0,}$";
Reg_Blank="^ {0,}$";

Reg_Boolean="^(true|false)$";
Reg_Int="^(+|-)?[0-9]{1,}$";
Reg_ZeroInt="^[0]{1,}$";

Reg_PosInt="^(+)?(1-9)[0-9]{0,}$";
Reg_NegInt="^(-)(1-9)[0-9]{0,}$";
Reg_NoNegInt="^(+)?[0-9]{1,}$";

Reg_Double="^(+|-)?[0-9]{1,}(.[0-9]{0,})?$";
Reg_PosDouble="^(+)?[0-9]{1,}(.[0-9]{0,})?$";
Reg_NegDouble="^(-)?[0-9]{1,}(.[0-9]{0,})?$";
Reg_ZeroDouble="^(+|-)0(.[0-9]{0,})?$";

Reg_Number="^[0-9]{1,}$";
Reg_NumTel="^[0-9]{1,}$";
Reg_Tel="^(([0-9]{1,}-)?[0-9]{1,}-)?[0-9]{1,}(#[0-9]{1,})?$";
Reg_ExtTel="^(([0-9]{1,}-)?[0-9]{1,}-)?[0-9]{1,}(#[0-9]{1,})?(@.)?$";
Reg_Email="^([^(@|\.)]{1,})@([^(@|\.)]{1,})(\.[^(@|\.)]{1,}){0,}$";
Reg_ExtEmail="^([^(@|\.)]{1,})@([^(@|\.)]{1,})(\.[^(@|\.)]{1,}){0,}$";
Reg_MultiEmail="^(([^(@|\.)]{1,})@([^(@|\.)]{1,})(\.[^(@|\.)]{1,}){0,}(;|,)){1,}$";
Reg_ChsZip="^[0-9]{6}$";
Reg_Zip="^[0-9]{1,}(-[0-9]{1,}){1,}$";
Reg_Date="^d{0,4}(-)?(-)?()$";
Reg_Year="^(BC|AD)?[0,9][0-9]{0,3}$";
Reg_Month="^((0?[1,9])|(1[0-2]))$";
Reg_Day="^((0?[1,9])|((1|2)[0-2])|(3[0-1]))$";
Reg_Hour="^(((0|1)[1-9])|(2[0-3]))$";
Reg_Minute="^[0-5][0-9]$";
Reg_Second="^[0-5][0-9]$";
Reg_Time="^(((0|1)[1-9])|(2[0-3])):[0-5]d$";
Reg_DateTime="^(((0|1)[1-9])|(2[0-3])):[0-5]d$";
Reg_IDCardNo="^([0-9]|[a-z]|[A-Z]){1,20}$";






//前台检查错误信息
Err_Null="请正确填写不填字段";
Err_NoNull="请正确填写必填字段";
Err_OneSpace="请正确填写单个空格";
Err_Space="请正确填写多个空格";
Err_Blank="请正确填写空字段";
Err_NoBlank="请正确填写非空字段";
Err_Boolean="请正确填写布尔型数据";
Err_Int="请正确填写整数";
Err_ZeroInt="请正确填写零";
Err_NoZeroInt="请正确填写非零";
Err_PosInt="请正确填写正整数";
Err_NegInt="请正确填写负整数";
Err_NoNegInt="请正确填写非负整数";
Err_="请正确填写";
Err_Double="请正确填写小数";
Err_PosDouble="请正确填写正小数";
Err_NegDouble="请正确填写负小数";
Err_ZeroDouble="请正确填写零小数";
Err_NoZeroDouble="请正确填写非零小数";
Err_Number="请正确填写数字";
Err_NumTel="请正确填写电话号码";
Err_Tel="请正确填写电话";
Err_ExtTel="请正确填写复杂电话";
Err_Email="请正确填写单个Email地址";
Err_ExtEmail="请正确填写扩展Email地址";
Err_MultiEmail="请正确填写Email地址";
Err_ChsZip="请正确填写中国邮编";
Err_Zip="请正确填写邮政编码";
Err_Date="请正确填写日期";
Err_Year="请正确填写年";
Err_Month="请正确填写月";
Err_Day="请正确填写日";
Err_Hour="请正确填写小时";
Err_Minute="请正确填写分钟";
Err_Second="请正确填写秒";
Err_Time="请正确填写时间";
Err_DateTime="请正确填写日期时间";
Err_EqualTo="请正确填写相等";
Err_NoEqualTo="请正确填写不等于";
Err_NoLargerThan="请正确填写不大于";
Err_NoSmallerThan="请正确填写不小于";
Err_LargerThan="请正确填写大于";
Err_SmallerThan="请正确填写小于";
Err_LongerThan="请正确填写长度长于";
Err_ShorterThan="请正确填写长度短于";
Err_InRange="请正确填写属于范围";
Err_InSet="请正确填写属于集合";
Err_IntInterval="请正确填写整数区间";
Err_DoubleInterval="请正确填写小数区间";
Err_DateInterval="请正确填写日期区间";
Err_TimeInterval="请正确填写时间区间";
Err_DateTimeInterval="请正确填写日期时间区间";
Err_Sum="请正确填写和";
Err_Sub="请正确填写差";
Err_Product="请正确填写积";
Err_Div="请正确填写商";
Err_Substring="请正确填写子串";
Err_IDCardNo="请正确填写身份证号码";
//数据类型检查函数，返回布尔值
function isNull(Expression){var Reg=new RegExp(Reg_Null, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isNoNull(Expression){ return true; }
function isOneSpace(Expression){var Reg=new RegExp(Reg_OneSpace, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isSpace(Expression){var Reg=new RegExp(Reg_Space, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isBlank(Expression){var Reg=new RegExp(Reg_Blank, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
	//function isNoBlank(Expression){ return true; }
function isBoolean(Expression){var Reg=new RegExp(Reg_Boolean, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isInt(Expression){var Reg=new RegExp(Reg_Int, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isZeroInt(Expression){var Reg=new RegExp(Reg_ZeroInt, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isNoZeroInt(Expression){ return true; }
function isPosInt(Expression){var Reg=new RegExp(Reg_PosInt, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isNegInt(Expression){var Reg=new RegExp(Reg_NegInt, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isNoNegInt(Expression){var Reg=new RegExp(Reg_NoNegInt, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function is(Expression){ return true; }
function isDouble(Expression){var Reg=new RegExp(Reg_Double, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isPosDouble(Expression){var Reg=new RegExp(Reg_PosDouble, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isNegDouble(Expression){var Reg=new RegExp(Reg_NegDouble, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isZeroDouble(Expression){var Reg=new RegExp(Reg_ZeroDouble, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isNoZeroDouble(Expression){ return true; }
function isNumber(Expression){var Reg=new RegExp(Reg_Number, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isNumTel(Expression){var Reg=new RegExp(Reg_NumTel, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isTel(Expression){var Reg=new RegExp(Reg_Tel, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isExtTel(Expression){var Reg=new RegExp(Reg_ExtTel, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isEmail(Expression){var Reg=new RegExp(Reg_Email, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isExtEmail(Expression){var Reg=new RegExp(Reg_ExtEmail, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isMultiEmail(Expression){var Reg=new RegExp(Reg_MultiEmail, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isChsZip(Expression){var Reg=new RegExp(Reg_ChsZip, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isZip(Expression){var Reg=new RegExp(Reg_Zip, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isDate(Expression){var Reg=new RegExp(Reg_Date, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isYear(Expression){var Reg=new RegExp(Reg_Year, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isMonth(Expression){var Reg=new RegExp(Reg_Month, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isDay(Expression){var Reg=new RegExp(Reg_Day, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isHour(Expression){var Reg=new RegExp(Reg_Hour, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isMinute(Expression){var Reg=new RegExp(Reg_Minute, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isSecond(Expression){var Reg=new RegExp(Reg_Second, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isTime(Expression){var Reg=new RegExp(Reg_Time, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isDateTime(Expression){var Reg=new RegExp(Reg_DateTime, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isIDCardNo(Expression){var Reg=new RegExp(Reg_IDCardNo, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isEqualTo(Expression){ return true; }
function isNoEqualTo(Expression){ return true; }
function isNoLargerThan(Expression){ return true; }
function isNoSmallerThan(Expression){ return true; }
function isLargerThan(Expression){ return true; }
function isSmallerThan(Expression){ return true; }


function isInRange(Expression){ return true; }
function isInSet(Expression){ return true; }
function isIntInterval(Expression){ return true; }
function isDoubleInterval(Expression){ return true; }
function isDateInterval(Expression){ return true; }
function isTimeInterval(Expression){ return true; }
function isDateTimeInterval(Expression){ return true; }
function isSum(Expression){ return true; }
function isSub(Expression){ return true; }
function isProduct(Expression){ return true; }
function isDiv(Expression){ return true; }
function isSubstring(Expression){ return true; }


//数据类型检查函数，显示错误信息
function chkNull(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isNull(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写不填字段。"); srcElement.select(); return false;}return true;}
function chkNoNull(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isNoNull(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写必填字段。"); srcElement.select(); return false;}return true;}
function chkOneSpace(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isOneSpace(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写单个空格。"); srcElement.select(); return false;}return true;}
function chkSpace(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isSpace(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写多个空格。"); srcElement.select(); return false;}return true;}
function chkBlank(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isBlank(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写空字段。"); srcElement.select(); return false;}return true;}
function chkNoBlank(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isNoBlank(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写非空字段。"); srcElement.select(); return false;}return true;}
function chkBoolean(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isBoolean(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写布尔型数据。"); srcElement.select(); return false;}return true;}
function chkInt(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isInt(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写整数。"); srcElement.select(); return false;}return true;}
function chkZeroInt(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isZeroInt(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写零。"); srcElement.select(); return false;}return true;}
function chkNoZeroInt(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isNoZeroInt(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写非零。"); srcElement.select(); return false;}return true;}
function chkPosInt(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isPosInt(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写正整数。"); srcElement.select(); return false;}return true;}
function chkNegInt(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isNegInt(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写负整数。"); srcElement.select(); return false;}return true;}
function chkNoNegInt(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isNoNegInt(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写非负整数。"); srcElement.select(); return false;}return true;}
function chkDouble(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isDouble(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写小数。"); srcElement.select(); return false;}return true;}
function chkPosDouble(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isPosDouble(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写正小数。"); srcElement.select(); return false;}return true;}
function chkNegDouble(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isNegDouble(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写负小数。"); srcElement.select(); return false;}return true;}
function chkZeroDouble(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isZeroDouble(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写零小数。"); srcElement.select(); return false;}return true;}
function chkNoZeroDouble(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isNoZeroDouble(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写非零小数。"); srcElement.select(); return false;}return true;}
function chkNumber(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isNumber(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写数字。"); srcElement.select(); return false;}return true;}
function chkNumTel(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isNumTel(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写电话号码。"); srcElement.select(); return false;}return true;}
function chkTel(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isTel(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写电话。"); srcElement.select(); return false;}return true;}
function chkExtTel(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isExtTel(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写复杂电话。"); srcElement.select(); return false;}return true;}
function chkEmail(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isEmail(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写单个Email地址。"); srcElement.select(); return false;}return true;}
function chkExtEmail(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isExtEmail(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写扩展Email地址。"); srcElement.select(); return false;}return true;}
function chkMultiEmail(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isMultiEmail(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写Email地址。"); srcElement.select(); return false;}return true;}
function chkChsZip(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isChsZip(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写中国邮编。"); srcElement.select(); return false;}return true;}
function chkZip(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isZip(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写邮政编码。"); srcElement.select(); return false;}return true;}
function chkDate(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isDate(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写日期。"); srcElement.select(); return false;}return true;}
function chkYear(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isYear(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写年。"); srcElement.select(); return false;}return true;}
function chkMonth(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isMonth(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写月。"); srcElement.select(); return false;}return true;}
function chkDay(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isDay(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写日。"); srcElement.select(); return false;}return true;}
function chkHour(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isHour(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写小时。"); srcElement.select(); return false;}return true;}
function chkMinute(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isMinute(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写分钟。"); srcElement.select(); return false;}return true;}
function chkSecond(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isSecond(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写秒。"); srcElement.select(); return false;}return true;}
function chkTime(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isTime(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写时间。"); srcElement.select(); return false;}return true;}
function chkDateTime(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isDateTime(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写日期时间。"); srcElement.select(); return false;}return true;}
function chkEqualTo(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isEqualTo(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写相等。"); srcElement.select(); return false;}return true;}
function chkNoEqualTo(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isNoEqualTo(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写不等于。"); srcElement.select(); return false;}return true;}
function chkNoLargerThan(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isNoLargerThan(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写不大于。"); srcElement.select(); return false;}return true;}
function chkNoSmallerThan(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isNoSmallerThan(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写不小于。"); srcElement.select(); return false;}return true;}
function chkLargerThan(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isLargerThan(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写大于。"); srcElement.select(); return false;}return true;}
function chkSmallerThan(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isSmallerThan(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写小于。"); srcElement.select(); return false;}return true;}


function chkInRange(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isInRange(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写属于范围。"); srcElement.select(); return false;}return true;}
function chkInSet(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isInSet(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写属于集合。"); srcElement.select(); return false;}return true;}
function chkIntInterval(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isIntInterval(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写整数区间。"); srcElement.select(); return false;}return true;}
function chkDoubleInterval(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isDoubleInterval(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写小数区间。"); srcElement.select(); return false;}return true;}
function chkDateInterval(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isDateInterval(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写日期区间。"); srcElement.select(); return false;}return true;}
function chkTimeInterval(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isTimeInterval(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写时间区间。"); srcElement.select(); return false;}return true;}
function chkDateTimeInterval(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isDateTimeInterval(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写日期时间区间。"); srcElement.select(); return false;}return true;}
function chkSum(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isSum(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写和。"); srcElement.select(); return false;}return true;}
function chkSub(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isSub(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写差。"); srcElement.select(); return false;}return true;}
function chkProduct(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isProduct(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写积。"); srcElement.select(); return false;}return true;}
function chkDiv(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isDiv(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写商。"); srcElement.select(); return false;}return true;}
function chkSubstring(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isSubstring(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写子串。"); srcElement.select(); return false;}return true;}


//重新写的函数
function isNoBlank(Expression){ if(isBlank(Expression))	return false; else return true;  }

function isLongerThan(Expression, nLength){if (Expression.length>nLength) return true; else return false;}
function isShorterThan(Expression, nLength){if (Expression.length<nLength) return true; else return false; }
function isNoShorterThan(Expression, nLength){if (Expression.length<=nLength) return true; else return false; }
function isLength(Expression, nLength){ if (Expression.length==nLength) return true; else return false;}
function isNoLongerThan(Expression, nLength)
    {
	return (Expression.length<=nLength);
    }


function chkLongerThan	(srcElement){ VALUE=srcElement.value; nMaxLength=srcElement.maxlength; if(isNull(VALUE)) return true; else if(!isLongerThan	(VALUE,nMaxLength)){ alert(srcElement.showname+"输入不正确。\n请正确填写长度长于"+nMaxLength+"的字符串。"); srcElement.select(); return false;}return true;}
function chkNoLongerThan(srcElement)
    { 
	VALUE=srcElement.value; 
	nMaxLength=srcElement.maxlength; 
	if(isNull(VALUE)) return true; else if(!isNoLongerThan(VALUE,nMaxLength))
	    { 
		alert(srcElement.showname+"输入不正确。\n请正确填写长度不长于"+nMaxLength+"的字符串。"); 
		srcElement.select(); 
		srcElement.value = srcElement.value.substring(0, nMaxLength);
		return false;
	   }
	return true;
    }
function chkShorterThan	(srcElement){ VALUE=srcElement.value; nMaxLength=srcElement.maxlength; if(isNull(VALUE)) return true; else if(!isShorterThan	(VALUE,nMaxLength)){ alert(srcElement.showname+"输入不正确。\n请正确填写长度短于"+nMaxLength+"的字符串。"); srcElement.select(); return false;}return true;}
function chkNoShorterThan(srcElement){VALUE=srcElement.value; nMaxLength=srcElement.maxlength; if(isNull(VALUE)) return true; else if(!isNoShorterThan(VALUE,nMaxLength)){ alert(srcElement.showname+"输入不正确。\n请正确填写长度不短于"+nMaxLength+"的字符串。"); srcElement.select(); return false;}return true;}
function chkLength(srcElement)
    {
	VALUE=srcElement.value; 
	nMaxLength=srcElement.maxlength; 
	if(isNull(VALUE)) return true; else if(!isLength(VALUE,nMaxLength))
	    {
		alert(srcElement.showname+"输入不正确。\n请正确填写长度为"+nMaxLength+"的字符串。"); 
		srcElement.select();
		return false;
	    }
	return true;
    }

//数据类型检查正则表达式
Reg_Null="^$";

Reg_OneSpace="^ $";
Reg_Space="^ {0,}$";
Reg_Blank="^ {0,}$";

Reg_Boolean="^(true|false)$";
Reg_Int="^(+|-)?[0-9]{1,}$";
Reg_ZeroInt="^[0]{1,}$";

Reg_PosInt="^(+)?(1-9)[0-9]{0,}$";
Reg_NegInt="^(-)(1-9)[0-9]{0,}$";
Reg_NoNegInt="^(+)?[0-9]{1,}$";

Reg_Double="^(+|-)?[0-9]{1,}(.[0-9]{0,})?$";
Reg_PosDouble="^(+)?[0-9]{1,}(.[0-9]{0,})?$";
Reg_NegDouble="^(-)?[0-9]{1,}(.[0-9]{0,})?$";
Reg_ZeroDouble="^(+|-)0(.[0-9]{0,})?$";

Reg_Number="^[0-9]{1,}$";
Reg_NumTel="^[0-9]{1,}$";
Reg_Tel="^(([0-9]{1,}-)?[0-9]{1,}-)?[0-9]{1,}(#[0-9]{1,})?$";
Reg_ExtTel="^(([0-9]{1,}-)?[0-9]{1,}-)?[0-9]{1,}(#[0-9]{1,})?(@.)?$";
Reg_Email="^([^(@|\.)]{1,})@([^(@|\.)]{1,})(\.[^(@|\.)]{1,}){0,}$";
Reg_ExtEmail="^([^(@|\.)]{1,})@([^(@|\.)]{1,})(\.[^(@|\.)]{1,}){0,}$";
Reg_MultiEmail="^(([^(@|\.)]{1,})@([^(@|\.)]{1,})(\.[^(@|\.)]{1,}){0,}(;|,)){1,}$";
Reg_ChsZip="^[0-9]{6}$";
Reg_Zip="^[0-9]{1,}(-[0-9]{1,}){1,}$";
Reg_Date="^d{0,4}(-)?(-)?()$";
Reg_Year="^(BC|AD)?[0,9][0-9]{0,3}$";
Reg_Month="^((0?[1,9])|(1[0-2]))$";
Reg_Day="^((0?[1,9])|((1|2)[0-2])|(3[0-1]))$";
Reg_Hour="^(((0|1)[1-9])|(2[0-3]))$";
Reg_Minute="^[0-5][0-9]$";
Reg_Second="^[0-5][0-9]$";
Reg_Time="^(((0|1)[1-9])|(2[0-3])):[0-5]d$";
Reg_DateTime="^(((0|1)[1-9])|(2[0-3])):[0-5]d$";
Reg_IDCardNo="^([0-9]|[a-z]|[A-Z]){1,20}$";






//前台检查错误信息
Err_Null="请正确填写不填字段";
Err_NoNull="请正确填写必填字段";
Err_OneSpace="请正确填写单个空格";
Err_Space="请正确填写多个空格";
Err_Blank="请正确填写空字段";
Err_NoBlank="请正确填写非空字段";
Err_Boolean="请正确填写布尔型数据";
Err_Int="请正确填写整数";
Err_ZeroInt="请正确填写零";
Err_NoZeroInt="请正确填写非零";
Err_PosInt="请正确填写正整数";
Err_NegInt="请正确填写负整数";
Err_NoNegInt="请正确填写非负整数";
Err_="请正确填写";
Err_Double="请正确填写小数";
Err_PosDouble="请正确填写正小数";
Err_NegDouble="请正确填写负小数";
Err_ZeroDouble="请正确填写零小数";
Err_NoZeroDouble="请正确填写非零小数";
Err_Number="请正确填写数字";
Err_NumTel="请正确填写电话号码";
Err_Tel="请正确填写电话";
Err_ExtTel="请正确填写复杂电话";
Err_Email="请正确填写单个Email地址";
Err_ExtEmail="请正确填写扩展Email地址";
Err_MultiEmail="请正确填写Email地址";
Err_ChsZip="请正确填写中国邮编";
Err_Zip="请正确填写邮政编码";
Err_Date="请正确填写日期";
Err_Year="请正确填写年";
Err_Month="请正确填写月";
Err_Day="请正确填写日";
Err_Hour="请正确填写小时";
Err_Minute="请正确填写分钟";
Err_Second="请正确填写秒";
Err_Time="请正确填写时间";
Err_DateTime="请正确填写日期时间";
Err_EqualTo="请正确填写相等";
Err_NoEqualTo="请正确填写不等于";
Err_NoLargerThan="请正确填写不大于";
Err_NoSmallerThan="请正确填写不小于";
Err_LargerThan="请正确填写大于";
Err_SmallerThan="请正确填写小于";
Err_LongerThan="请正确填写长度长于";
Err_ShorterThan="请正确填写长度短于";
Err_InRange="请正确填写属于范围";
Err_InSet="请正确填写属于集合";
Err_IntInterval="请正确填写整数区间";
Err_DoubleInterval="请正确填写小数区间";
Err_DateInterval="请正确填写日期区间";
Err_TimeInterval="请正确填写时间区间";
Err_DateTimeInterval="请正确填写日期时间区间";
Err_Sum="请正确填写和";
Err_Sub="请正确填写差";
Err_Product="请正确填写积";
Err_Div="请正确填写商";
Err_Substring="请正确填写子串";
Err_IDCardNo="请正确填写身份证号码";
//数据类型检查函数，返回布尔值
function isNull(Expression){var Reg=new RegExp(Reg_Null, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isNoNull(Expression){ return true; }
function isOneSpace(Expression){var Reg=new RegExp(Reg_OneSpace, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isSpace(Expression){var Reg=new RegExp(Reg_Space, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isBlank(Expression){var Reg=new RegExp(Reg_Blank, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
	//function isNoBlank(Expression){ return true; }
function isBoolean(Expression){var Reg=new RegExp(Reg_Boolean, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isInt(Expression){var Reg=new RegExp(Reg_Int, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isZeroInt(Expression){var Reg=new RegExp(Reg_ZeroInt, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isNoZeroInt(Expression){ return true; }
function isPosInt(Expression){var Reg=new RegExp(Reg_PosInt, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isNegInt(Expression){var Reg=new RegExp(Reg_NegInt, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isNoNegInt(Expression){var Reg=new RegExp(Reg_NoNegInt, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function is(Expression){ return true; }
function isDouble(Expression){var Reg=new RegExp(Reg_Double, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isPosDouble(Expression){var Reg=new RegExp(Reg_PosDouble, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isNegDouble(Expression){var Reg=new RegExp(Reg_NegDouble, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isZeroDouble(Expression){var Reg=new RegExp(Reg_ZeroDouble, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isNoZeroDouble(Expression){ return true; }
function isNumber(Expression){var Reg=new RegExp(Reg_Number, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isNumTel(Expression){var Reg=new RegExp(Reg_NumTel, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isTel(Expression){var Reg=new RegExp(Reg_Tel, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isExtTel(Expression){var Reg=new RegExp(Reg_ExtTel, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isEmail(Expression){var Reg=new RegExp(Reg_Email, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isExtEmail(Expression){var Reg=new RegExp(Reg_ExtEmail, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isMultiEmail(Expression){var Reg=new RegExp(Reg_MultiEmail, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isChsZip(Expression){var Reg=new RegExp(Reg_ChsZip, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isZip(Expression){var Reg=new RegExp(Reg_Zip, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isDate(Expression){var Reg=new RegExp(Reg_Date, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isYear(Expression){var Reg=new RegExp(Reg_Year, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isMonth(Expression){var Reg=new RegExp(Reg_Month, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isDay(Expression){var Reg=new RegExp(Reg_Day, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isHour(Expression){var Reg=new RegExp(Reg_Hour, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isMinute(Expression){var Reg=new RegExp(Reg_Minute, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isSecond(Expression){var Reg=new RegExp(Reg_Second, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isTime(Expression){var Reg=new RegExp(Reg_Time, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isDateTime(Expression){var Reg=new RegExp(Reg_DateTime, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isIDCardNo(Expression){var Reg=new RegExp(Reg_IDCardNo, "g"); var Str=new String(); Str=Expression; return Str.match(Reg); }
function isEqualTo(Expression){ return true; }
function isNoEqualTo(Expression){ return true; }
function isNoLargerThan(Expression){ return true; }
function isNoSmallerThan(Expression){ return true; }
function isLargerThan(Expression){ return true; }
function isSmallerThan(Expression){ return true; }


function isInRange(Expression){ return true; }
function isInSet(Expression){ return true; }
function isIntInterval(Expression){ return true; }
function isDoubleInterval(Expression){ return true; }
function isDateInterval(Expression){ return true; }
function isTimeInterval(Expression){ return true; }
function isDateTimeInterval(Expression){ return true; }
function isSum(Expression){ return true; }
function isSub(Expression){ return true; }
function isProduct(Expression){ return true; }
function isDiv(Expression){ return true; }
function isSubstring(Expression){ return true; }


//数据类型检查函数，显示错误信息
function chkNull(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isNull(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写不填字段。"); srcElement.select(); return false;}return true;}
function chkNoNull(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isNoNull(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写必填字段。"); srcElement.select(); return false;}return true;}
function chkOneSpace(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isOneSpace(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写单个空格。"); srcElement.select(); return false;}return true;}
function chkSpace(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isSpace(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写多个空格。"); srcElement.select(); return false;}return true;}
function chkBlank(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isBlank(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写空字段。"); srcElement.select(); return false;}return true;}
function chkNoBlank(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isNoBlank(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写非空字段。"); srcElement.select(); return false;}return true;}
function chkBoolean(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isBoolean(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写布尔型数据。"); srcElement.select(); return false;}return true;}
function chkInt(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isInt(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写整数。"); srcElement.select(); return false;}return true;}
function chkZeroInt(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isZeroInt(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写零。"); srcElement.select(); return false;}return true;}
function chkNoZeroInt(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isNoZeroInt(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写非零。"); srcElement.select(); return false;}return true;}
function chkPosInt(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isPosInt(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写正整数。"); srcElement.select(); return false;}return true;}
function chkNegInt(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isNegInt(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写负整数。"); srcElement.select(); return false;}return true;}
function chkNoNegInt(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isNoNegInt(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写非负整数。"); srcElement.select(); return false;}return true;}
function chkDouble(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isDouble(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写小数。"); srcElement.select(); return false;}return true;}
function chkPosDouble(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isPosDouble(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写正小数。"); srcElement.select(); return false;}return true;}
function chkNegDouble(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isNegDouble(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写负小数。"); srcElement.select(); return false;}return true;}
function chkZeroDouble(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isZeroDouble(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写零小数。"); srcElement.select(); return false;}return true;}
function chkNoZeroDouble(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isNoZeroDouble(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写非零小数。"); srcElement.select(); return false;}return true;}
function chkNumber(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isNumber(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写数字。"); srcElement.select(); return false;}return true;}
function chkNumTel(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isNumTel(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写电话号码。"); srcElement.select(); return false;}return true;}
function chkTel(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isTel(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写电话。"); srcElement.select(); return false;}return true;}
function chkExtTel(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isExtTel(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写复杂电话。"); srcElement.select(); return false;}return true;}
function chkEmail(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isEmail(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写单个Email地址。"); srcElement.select(); return false;}return true;}
function chkExtEmail(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isExtEmail(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写扩展Email地址。"); srcElement.select(); return false;}return true;}
function chkMultiEmail(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isMultiEmail(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写Email地址。"); srcElement.select(); return false;}return true;}
function chkChsZip(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isChsZip(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写中国邮编。"); srcElement.select(); return false;}return true;}
function chkZip(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isZip(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写邮政编码。"); srcElement.select(); return false;}return true;}
function chkDate(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isDate(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写日期。"); srcElement.select(); return false;}return true;}
function chkYear(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isYear(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写年。"); srcElement.select(); return false;}return true;}
function chkMonth(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isMonth(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写月。"); srcElement.select(); return false;}return true;}
function chkDay(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isDay(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写日。"); srcElement.select(); return false;}return true;}
function chkHour(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isHour(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写小时。"); srcElement.select(); return false;}return true;}
function chkMinute(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isMinute(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写分钟。"); srcElement.select(); return false;}return true;}
function chkSecond(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isSecond(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写秒。"); srcElement.select(); return false;}return true;}
function chkTime(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isTime(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写时间。"); srcElement.select(); return false;}return true;}
function chkDateTime(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isDateTime(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写日期时间。"); srcElement.select(); return false;}return true;}
function chkEqualTo(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isEqualTo(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写相等。"); srcElement.select(); return false;}return true;}
function chkNoEqualTo(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isNoEqualTo(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写不等于。"); srcElement.select(); return false;}return true;}
function chkNoLargerThan(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isNoLargerThan(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写不大于。"); srcElement.select(); return false;}return true;}
function chkNoSmallerThan(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isNoSmallerThan(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写不小于。"); srcElement.select(); return false;}return true;}
function chkLargerThan(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isLargerThan(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写大于。"); srcElement.select(); return false;}return true;}
function chkSmallerThan(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isSmallerThan(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写小于。"); srcElement.select(); return false;}return true;}


function chkInRange(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isInRange(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写属于范围。"); srcElement.select(); return false;}return true;}
function chkInSet(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isInSet(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写属于集合。"); srcElement.select(); return false;}return true;}
function chkIntInterval(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isIntInterval(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写整数区间。"); srcElement.select(); return false;}return true;}
function chkDoubleInterval(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isDoubleInterval(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写小数区间。"); srcElement.select(); return false;}return true;}
function chkDateInterval(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isDateInterval(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写日期区间。"); srcElement.select(); return false;}return true;}
function chkTimeInterval(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isTimeInterval(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写时间区间。"); srcElement.select(); return false;}return true;}
function chkDateTimeInterval(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isDateTimeInterval(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写日期时间区间。"); srcElement.select(); return false;}return true;}
function chkSum(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isSum(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写和。"); srcElement.select(); return false;}return true;}
function chkSub(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isSub(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写差。"); srcElement.select(); return false;}return true;}
function chkProduct(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isProduct(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写积。"); srcElement.select(); return false;}return true;}
function chkDiv(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isDiv(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写商。"); srcElement.select(); return false;}return true;}
function chkSubstring(srcElement){ VALUE=srcElement.value; if(isNull(VALUE)) return true; else if(!isSubstring(VALUE)){ alert(srcElement.showname+"输入不正确。\n请正确填写子串。"); srcElement.select(); return false;}return true;}


//重新写的函数
function isNoBlank(Expression){ if(isBlank(Expression))	return false; else return true;  }

function isLongerThan(Expression, nLength){if (Expression.length>nLength) return true; else return false;}
function isShorterThan(Expression, nLength){if (Expression.length<nLength) return true; else return false; }
function isNoShorterThan(Expression, nLength){if (Expression.length<=nLength) return true; else return false; }
function isLength(Expression, nLength){ if (Expression.length==nLength) return true; else return false;}
function isNoLongerThan(Expression, nLength)
    {
	return (Expression.length<=nLength);
    }


function chkLongerThan	(srcElement){ VALUE=srcElement.value; nMaxLength=srcElement.maxlength; if(isNull(VALUE)) return true; else if(!isLongerThan	(VALUE,nMaxLength)){ alert(srcElement.showname+"输入不正确。\n请正确填写长度长于"+nMaxLength+"的字符串。"); srcElement.select(); return false;}return true;}
function chkNoLongerThan(srcElement)
    { 
	VALUE=srcElement.value; 
	nMaxLength=srcElement.maxlength; 
	if(isNull(VALUE)) return true; else if(!isNoLongerThan(VALUE,nMaxLength))
	    { 
		alert(srcElement.showname+"输入不正确。\n请正确填写长度不长于"+nMaxLength+"的字符串。"); 
		srcElement.select(); 
		srcElement.value = srcElement.value.substring(0, nMaxLength);
		return false;
	   }
	return true;
    }
function chkShorterThan	(srcElement){ VALUE=srcElement.value; nMaxLength=srcElement.maxlength; if(isNull(VALUE)) return true; else if(!isShorterThan	(VALUE,nMaxLength)){ alert(srcElement.showname+"输入不正确。\n请正确填写长度短于"+nMaxLength+"的字符串。"); srcElement.select(); return false;}return true;}
function chkNoShorterThan(srcElement){VALUE=srcElement.value; nMaxLength=srcElement.maxlength; if(isNull(VALUE)) return true; else if(!isNoShorterThan(VALUE,nMaxLength)){ alert(srcElement.showname+"输入不正确。\n请正确填写长度不短于"+nMaxLength+"的字符串。"); srcElement.select(); return false;}return true;}
function chkLength(srcElement)
    {
	VALUE=srcElement.value; 
	nMaxLength=srcElement.maxlength; 
	if(isNull(VALUE)) return true; else if(!isLength(VALUE,nMaxLength))
	    {
		alert(srcElement.showname+"输入不正确。\n请正确填写长度为"+nMaxLength+"的字符串。"); 
		srcElement.select();
		return false;
	    }
	return true;
    }

