function doCheck() {
	var start_target_date = $("[name=start_target_date]").val();
	var end_target_date = $("[name=end_target_date]").val();
	var reg = /^(1|2\d{3})\-((0[1-9])|(1[0-2]))\-((0[1-9])|([1-2][0-9])|(3[0|1]))\s(([0-1]\d|2[0-4])\:[0-6]\d\:[0-6]\d)$/;
	if(start_target_date != '' || end_target_date !='') {
		if(!start_target_date.match(reg)){
			alert ("日期格式不正确");
			return false;
		}
		if(!end_target_date.match(reg)){
			alert ("日期格式不正确");
			return false;
		}
		start_date = start_target_date.split(' ',2)[0].replace(/\-/g,'');
		end_date = end_target_date.split(' ',2)[0].replace(/\-/g,'');
		if(!isDateString(start_date)){
			alert ("请输入正确的日期");
			return false;
		}
		if(!isDateString(end_date)){
			alert ("请输入正确的日期");
			return false;
		}
		if(dateToUnixTime(start_target_date) > dateToUnixTime(end_target_date)) {
			alert("输入的开始日期不能大于结束时间");
			return false;
		}
	}

	document.user_point_search_input.submit();
}

function dateToUnixTime(date){
	var f = date.split(' ', 2);
    var d = (f[0] ? f[0] : '').split('-', 3);
    var t = (f[1] ? f[1] : '').split(':', 3);
    return (new Date(
    	parseInt(d[0], 10) || null,
    	(parseInt(d[1], 10) || 1) - 1,
    	parseInt(d[2], 10) || null,
    	parseInt(t[0], 10) || null,
    	parseInt(t[1], 10) || null,
    	parseInt(t[2], 10) || null
    )).getTime() / 1000;
}