/*
表单检测函数
///////////////////////
1.ErrEmpty	是否为空
	返回值：为空返回true 不为空返回false
	例 ErrEmpty(Form1.Input1,"Input1不得为空！")
2.ErrInteger	整型
*/

//发送返回信息
function showMsg_check(sCaption){
	try{
		showMessage(sCaption,'<b>&nbsp;提示</b>');
	}catch(e){
		alert(sCaption);
	};
}

//是否为空
function ErrEmpty(obj,sCaption){
	if (obj.value==''){
		showMsg_check(sCaption);
		try{obj.focus();}catch(e){};
		return true;
	}
	return false;
}

//是否为整数
function ErrInteger(obj,sCaption){
	if(/^\d/.test(obj.value)){
		return false;
	}else{
		showMsg_check(sCaption);
		try{obj.focus();}catch(e){};
		return true;
	}
}

//判断是否为数字
function ErrorNumeric(aObj,sCaption){
		return false;
}

//判断用户名是否合法
function ErrorUserName(aObj,sCaption){
		return false;
}

//判断邮件地址是否合法
function ErrorEmail(aObj,sCaption){
		return false;
}

//判断文件名是否合法
function ErrorFileName(aObj,sCaption){
		return false;
}

