var reInteger = /^\d+$/

function isEmpty(s){
   return ((s == null) || (s.length == 0))
}
function toolarge(s){ 
   return s.length>=2000;
}
function isNum(s){   
	if (reInteger.test(s))
		return false;
	else
		return true;
}
function mag_check(form){
	var temp2=form.year.value;
	var temp3=form.month.value;

	if (isEmpty(temp2) || isNum(temp2) || (temp2.length != 4)) {
		alert("请输入正确的年份");
		return false;
	}

	if (temp3.length == 1)
		temp3 = "0" + temp3;

	form.period.value = temp2 + temp3;

	form.submit();
	
	return true;
}
