var basePath=getBasePath(); var baseSystemTime = '1531854895458' function getBasePath(){var basePath = location.href;basePath=basePath.replace("http://","http@");basePath=basePath.substring(0, basePath.indexOf("/"));basePath=basePath.replace("http@","http://");basePath=basePath+'/';return basePath;} function getUrlParamStr(name){var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");var r = window.location.search.substr(1).match(reg);if (r != null)return decodeURI(r[2]);return "";} function getUrlParam(name){ var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)"); var r = window.location.search.substr(1).match(reg); if (r!=null) return unescape(r[2]); return null; } function goHome(){location.href=basePath;} function showLoading(){ $("body").append('
努力加载中
'); var clientHeight = $(window).height(); var clientWidth = $(window).width(); $("#innerdiv").css({"top":(clientHeight-100)/2,"left":(clientWidth-100)/2}); } function hideLoading(){$("#outerdiv").remove();} function back() {history.back(-1)} function validateIdIdNum(DocNumValue){ var num = DocNumValue; var factorArr = new Array(7,9,10,5,8,4,2,1,6,3,7,9,10,5,8,4,2,1); var error = ""; var varArray = new Array(); var intValue; var lngProduct = 0; var intCheckDigit; var intStrLen = num.length; var idNumber = num; if ((intStrLen != 15) && (intStrLen != 18)) { error = "输入身份证号码长度不对!"; return error; } for(i=0;i '9') && (i != 17)) { error = "错误的身份证号码!"; return error; } else if (i < 17) { varArray[i] = varArray[i]*factorArr[i]; } } if (intStrLen == 18) { for(i=0;i<17;i++) { lngProduct = lngProduct + varArray[i]; } intCheckDigit = 12 - lngProduct % 11; switch (intCheckDigit) { case 10: intCheckDigit = 'X'; break; case 11: intCheckDigit = 0; break; case 12: intCheckDigit = 1; break; } if (varArray[17] != intCheckDigit) { if(varArray[17]=='x') { error = "身份证最后一位请填写为大写的X!" ; } error = "身份证号最后一位的效验位错误!" ; return error; } } return error; }