/*  */
function mode_check_number(path, sval, numid, dfval){
	if (isNaN(numid.val().replace(/,/g,"")) || numid.val().trim() == "") {
		alert(return_language_str(path, sval, '', 'TEXTVAL_NOT_NUMBER_ERROR', ''));
		console.log('[數值錯誤]id:'+numid.attr("id")+',val:'+numid.val());
		numid.val(dfval);
	} else {
		var numary = numid.val().split("."), outnum = 0,
			scnum = numid.attr("scale"), mfnum = numid.attr("mft"),
			numstr = (parseFloat(numid.val().replace(/,/g,"")).toFixed(10)).toString().replace(/0+$/,'');
		if ((numary[1]) && numary[1].length > 10) numid.val(numstr);
		numary = numstr.split(".");
		if ((numary[1]) && numary[1].length > scnum) {
			//alert(return_language_str(path, sval, '', 'TEXTVAL_NOT_DECIMAL_ERROR', ''));
			console.log(return_language_str(path, sval, '', 'TEXTVAL_NOT_DECIMAL_ERROR', '')+'(id:'+numid.attr("id")+',sca:'+scnum.toString()+',val:'+numstr+')');
			if (mfnum == "1") outnum = FloatCeil(numstr.replace(/,/g,""), scnum);
			else if (mfnum == "2") outnum = FloatFloor(numstr.replace(/,/g,""), scnum);
			else outnum = FloatRound(numstr.replace(/,/g,""), scnum);
			numid.val(outnum);
		}
	}
}