var MApplication_2_2=new function(){this.version="2.2.8",this.lastUpdate="2015-05-18",this.language=new function(){this.lang=navigator.browserLanguage?navigator.browserLanguage:navigator.language,this.langArr=this.lang.toLowerCase().split("-"),this.reValue=function(valueArr){var reValue=valueArr[this.langArr[0]];return reValue=null==reValue?valueArr.default:reValue},this.countdownJump=function(valueArr,interval){var url=this.reValue(valueArr);null!=url&&""!=url&&setTimeout((function(){window.location=url}),1e3*interval)}},this.client=new function(){this.userAgent=navigator.userAgent.toLowerCase(),this.getDevice=function(){var device="other";return-1!=this.userAgent.indexOf("windows")?device="pc":-1!=this.userAgent.indexOf("ipad")?device="ipad":-1!=this.userAgent.indexOf("macintosh")?device="mac":-1!=this.userAgent.indexOf("ipod touch")?device="ipod touch":-1!=this.userAgent.indexOf("iphone")?device="iphone":-1!=this.userAgent.indexOf("mobile")&&(device="mobile"),device},this.getSystemBit=function(){var bit="32";return-1==this.userAgent.indexOf("wow64")&&-1==this.userAgent.indexOf("x86_64")||(bit="64"),bit},this.getSystemType=function(){var systemType="other";return-1!=this.userAgent.indexOf("windows")?systemType="windows":-1!=this.userAgent.indexOf("mac os")?systemType=-1!=this.userAgent.indexOf("macintosh")?"macos":"ios":-1!=this.userAgent.indexOf("android")&&(systemType="android"),systemType},this.getSystem=function(){var system="other";return-1!=this.userAgent.indexOf("windows nt 6.2")?system="win8":-1!=this.userAgent.indexOf("windows nt 6.1")?system="win7":-1!=this.userAgent.indexOf("windows nt 5.1")?system="winxp":-1!=this.userAgent.indexOf("mac os")?system=-1!=this.userAgent.indexOf("macintosh")?"macos":"ios":-1!=this.userAgent.indexOf("android")&&(system="android"),system},this.getBrowser=function(){var browser="other",ieTest,edgeTest=/(edge)/,chromeTest=/(chrome)/,firefoxTest=/(firefox)/,safariTest=/(safari)/,operaTest=/(opr|opera)/;return/(msie.|trident.*rv:)/.test(this.userAgent)?browser="ie":edgeTest.test(this.userAgent)?browser="edge":operaTest.test(this.userAgent)?browser="opera":chromeTest.test(this.userAgent)?browser="chrome":firefoxTest.test(this.userAgent)?browser="firefox":safariTest.test(this.userAgent)&&(browser="safari"),browser},this.getBrowserVer=function(){var browser=this.getBrowser(),browserVerArr,browserVer,browserVerArr;if("ie"==browser){if("-1"!=this.userAgent.indexOf("msie"))browserVer=(browserVerArr=this.userAgent.match(/(msie)+.(\d+)/g))[0].replace("msie ","").toString();else if("-1"!=this.userAgent.indexOf("rv:")){var browserVerArr;browserVer=(browserVerArr=this.userAgent.match(/([rv:])+(\d+)/g))[0].replace("rv:","").toString()}}else if("chrome"==browser){var browserVerArr;browserVer=(browserVerArr=this.userAgent.match(/(chrome)+.(\d+)/g))[0].replace("chrome/","").toString()}else if("firefox"==browser){var browserVerArr;browserVer=(browserVerArr=this.userAgent.match(/(firefox)+.(\d+)/g))[0].replace("firefox/","").toString()}else if("safari"==browser){var browserVerArr;browserVer=(browserVerArr=this.userAgent.match(/(version)+.(\d+)/g))[0].replace("version/","").toString()}else browserVer="unknown";return Array(browser,browserVer)},this.getHead=function(){var req=new XMLHttpRequest,head;return req.open("GET",document.location,!1),req.send(null),req.getAllResponseHeaders().toLowerCase()}},this.url=new function(){this.getUrl=function(){return window.location.href},this.getReferrer=function(){return document.referrer},this.getDomain=function(url){var domain;return url?null!=(domain=url.match(/([\w-]+)(:\/\/)([\w.-]+)/i))&&(domain=domain[3]):domain=window.document.location.host,null!=domain?domain.toString():null},this.getFilePath=function(url){var filePath;return(filePath=url?(filePath=(filePath=(filePath=url.replace(this.getDomain(url),"")).replace(/^\w+:\/\//i,"")).replace(/(\?+)([^\?+])*$/,"")).replace(/(\#+)([^\#+])*$/,""):(filePath=window.document.location.pathname).replace(/\/{2,}/g,"/")).toString()},this.getDirPath=function(url){var filePath,dirPath,fileName;return filePath=this.getFilePath(url),url?(fileName=filePath.match(/[\w.-]*$/i),dirPath=(dirPath=filePath.replace(this.getDomain(url),"")).replace(fileName,"")):dirPath=filePath.substring(0,filePath.lastIndexOf("/"))+"/",dirPath.toString()},this.getFileName=function(url){var filePath,fileName;return url||(url=this.getUrl()),(fileName=(filePath=this.getFilePath(url)).match(/[\w.-]*$/i)).toString()},this.getQuery=function(url){var query="";if(url)null!=(query=url.match(/[?].*$/i))&&(query=query[0].substring(1).toString().replace(/#.*/,""));else if(null==(query=this.getQuery(this.getUrl())))return"";return query},this.getHashTag=function(url){return this.getFragment(url)},this.getFragment=function(url){var fragment;return url||(url=this.getUrl()),null!=(fragment=url.match(/#.*/))&&(fragment=fragment[0].substring(1)),fragment},this.getParameters=function(key){var queryString=this.getQuery(),returnValue="",returnValueArr=Array();if(null!=queryString){if(queryString.length>1)for(var queryList=queryString.split("&"),i=0;i<queryList.length;i++){var singleQueryArr=queryList[i].split("="),singleQueryKey=singleQueryArr[0],singleQueryValue=singleQueryArr[1]?singleQueryArr[1].replace(/#.*/,""):"";singleQueryKey==key&&2==singleQueryArr.length&&(returnValue=singleQueryValue),returnValueArr[singleQueryKey]=singleQueryValue}if(key)return returnValue}return returnValueArr},this.parseUrl=function(url){var domain,filePath,dirPath,fileName,query;return url||(url=this.getUrl()),domain=this.getDomain(url),filePath=this.getFilePath(url),dirPath=this.getDirPath(url),fileName=this.getFileName(url),query=this.getQuery(url),hashTag=this.getHashTag(url),Array(domain,filePath,dirPath,fileName,query,hashTag)},this.parseQuery=function(url){var query,hashTag;return url||(url=this.getUrl()),query=this.getQuery(url),hashTag=this.getHashTag(url),Array(query,hashTag)}},this.check=new function(){this.isEmail=function(email){if(this.isNull(email))return!1;var start=email.indexOf("@"),nameTest;return"-1"!=start&&(domain=email.substr(start+1),!!this.isDomain(domain)&&(name=email.substr(0,start),!!/^([\w])+([\w-.]?)+$/i.test(name)))},this.isDomain=function(domain){var domainTest;return/^(([\w]+-?)*[\w]+.)+([a-z]{2,})+$/i.test(domain)},this.isHttpUrl=function(url){var urlTest;return!!/^http[s]?:\/\/([\w-]+.)+[\w-]+([\w-./?%&=]*)?$/i.test(url)},this.isNull=function(val){return null!=val&&0!=val&&(val=val.replace(/[ ]/g,"")),""==val||"undefined"==val||null==val},this.isCode=function(code,len){var codeTest;if(19==len){if(!(codeTest=/[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}/i).test(code.toLowerCase()))return!1}else if(23==len){var codeTest;if(!(codeTest=/[0-9a-f]{5}-[0-9a-f]{5}-[0-9a-f]{5}-[0-9a-f]{3}[0-9a-z]{2}/i).test(code.toLowerCase()))return!1}else if(!this.isCode(code,19)&&!this.isCode(code,23))return!1;return!0}},this.cookie=new function(){this.cookieEnabled=navigator.cookieEnabled,this.expireTime=31104e6,this.set=function(cName,cValue){var str=cName+"="+escape(cValue),date=new Date;return date.setTime(date.getTime()+this.expireTime),document.cookie=str+"; expires="+date.toGMTString()+"; path=/",!0},this.get=function(cName){for(var cookieArr=document.cookie.split("; "),i=0;i<cookieArr.length;i++){var temp=cookieArr[i].split("=");if(temp[0]==cName)return unescape(temp[1])}},this.getAll=function(){for(var cookieArr=document.cookie.split("; "),reCookieArr=Array,i=0;i<cookieArr.length;i++){var temp=cookieArr[i].split("=");reCookieArr[temp[0]]=unescape(temp[1])}return reCookieArr},this.remove=function(cName){var date=new Date;return date.setTime(date.getTime()-1e4),document.cookie=cName+"=0; expires="+date.toGMTString(),!0}},this.datetime=new function(){this.get=function(type,timestamp){if(timestamp)var dateObj=new Date(1e3*parseInt(timestamp));else var dateObj=new Date;var month=Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sept","Oct","Nov","Dec"),y=dateObj.getFullYear(),m=dateObj.getMonth()+1;m=m<10?"0"+m:m;var d=dateObj.getDate();d=d<10?"0"+d:d;var h=dateObj.getHours();h=h<10?"0"+h:h;var i=dateObj.getMinutes();i=i<10?"0"+i:i;var s=dateObj.getSeconds();s=s<10?"0"+s:s;var mi=dateObj.getMilliseconds();return mi=mi<100?mi<10?"00"+mi:"0"+mi:mi,"datetime"==type?datetime=y+"-"+m+"-"+d+" "+h+":"+i+":"+s:"datetimes"==type?datetime=y+"-"+m+"-"+d+" "+h+":"+i+":"+s+" "+mi:"date"==type?datetime=y+"-"+m+"-"+d:"dates"==type?datetime=month[Number(m-1)]+". "+d+", "+y:"time"==type&&(datetime=h+":"+i+":"+s),datetime},this.getTimeZone=function(){var dateObj;return(new Date).getTimezoneOffset()/60},this.transformCurrentDatetimeToUtc=function(type,datetime){var timestamp=this.getTimestamp(datetime)+60*this.getTimeZone()*60;if("timestamp"==type)return timestamp;var dateObj=new Date(1e3*parseInt(timestamp)),y=dateObj.getFullYear(),m=dateObj.getMonth()+1;m=m<10?"0"+m:m;var d=dateObj.getDate();d=d<10?"0"+d:d;var h=dateObj.getHours();h=h<10?"0"+h:h;var i=dateObj.getMinutes();i=i<10?"0"+i:i;var s=dateObj.getSeconds();return y+"-"+m+"-"+d+" "+h+":"+i+":"+(s=s<10?"0"+s:s)},this.getTimestamp=function(datetime){var dateObj=new Date;return datetime?(dateObj.setFullYear(datetime.substring(0,4)),dateObj.setMonth(datetime.substring(5,7)-1),dateObj.setDate(datetime.substring(8,10)),dateObj.setHours(datetime.substring(11,13)),dateObj.setMinutes(datetime.substring(14,16)),dateObj.setSeconds(datetime.substring(17,19)),Date.parse(dateObj)/1e3):Math.floor(dateObj.getTime()/1e3)},this.getCountdown=function(expireDatetime){var currentDateObj=new Date,currentTime=this.getTimestamp(),expireTime,overTime=this.getTimestamp(expireDatetime)-currentTime;if(overTime>0){var d=Math.floor(overTime/86400),h=Math.floor(overTime/3600%24),i=Math.floor(overTime/60%60),s=Math.floor(overTime%60),mi=999-currentDateObj.getMilliseconds();return mi<10?mi="00"+mi:mi<100&&(mi="0"+mi),Array(d,h,i,s,mi)}return Array("0","0","0","0","000")},this.getCycleCountdown=function(startTimestamp,intervalDay){var intervalTimestamp=24*intervalDay*60*60,dateObj=new Date,time=dateObj.getTime().toString().substring(0,10);for(i=1;;i++){var remainingTime=startTimestamp+intervalTimestamp*i-time;if(remainingTime>0)break}var d=Math.floor(remainingTime/86400),h=Math.floor(remainingTime/3600%24),i=Math.floor(remainingTime/60%60),s=Math.floor(remainingTime%60),mi=999-dateObj.getMilliseconds();return mi<10?mi="00"+mi:mi<100&&(mi="0"+mi),Array(d,h,i,s,mi)}},this.packages=new function(){this.replaceoto0=function(str){return str.replace(/o|O/g,"0")},this.countdownToJump=function(url,time){setTimeout((function(){window.location.href=url}),time)},this.getFileExt=function(name){return extArr=name.split("."),ext=extArr[extArr.length-1],ext=ext.toLocaleLowerCase(),ext},this.openWindowAndGoto=function(openUrl,jumpUrl){window.open(openUrl,"openWindow",""),window.location.href=jumpUrl},this.lTrim=function(str){return str.replace(/(^\s*)/g,"")},this.rTrim=function(str){return str.replace(/(\s*$)/g,"")},this.trim=function(str){return str=this.lTrim(str),this.rTrim(str)},this.zeroize=function(num,len){var str=num.toString(),strLen=str.length;if(strLen<len)for(var i=0;i<len-strLen;i++)str="0"+str;return str},this.conversionSize=function(size){var units=Array("B","KB","MB","GB","TB");for(i=0;size>=1024&&i<4;i++)size/=1024;return size=Math.round(100*size),(size/=100)+" "+units[i]},this.getRandom=function(lowerValue,upperValue){var choices=upperValue-lowerValue+1;return Math.floor(Math.random()*choices+lowerValue)},this.refreshCaptcha=function(id,captchaUrl){var randoms=Math.random();document.getElementById(id).src=captchaUrl+"&r="+randoms},this.genPassword=function(grade,length){grade=grade>0?grade:3,length=length>0?length:12;for(var letter="aAbBcCdDeEfFgGhHjJkKmMnNpPqQrRsStTuUvVwWxXyYzZ",number="123456789",symbol="-_*#?$@[]()~,.;|+=%",password="",i=0;i<=length;i++)characterSet=0==i?grade>1?letter:number:3==grade?letter+number+symbol:2==grade?letter+number:"0"+number,password+=characterSet.substr(this.getRandom(1,characterSet.length)-1,1);return password},this.passwordStrength=function(password){var strength=0,passwordTest,passwordTest,passwordTest,passwordTest;return password.length>=8&&(strength+=1),(passwordTest=/[0-9]/).test(password)&&(strength+=1),(passwordTest=/[a-z]/).test(password)&&(strength+=1),(passwordTest=/[A-Z]/).test(password)&&(strength+=1),(passwordTest=/[^a-z0-9]/i).test(password)&&(strength+=1),strength},this.passwordExpirationTips=function(platform,key){}}};function MApp(ver){return ver=ver?ver.toString().replace(".","_"):"","object"==typeof window["MApplication_"+ver]?window["MApplication_"+ver]:MApplication_2_2}