/* * My97 DatePicker 4.8.5 * License: http://www.my97.net/license.asp */ //"use strict"; if($cfg.eCont){$dp={};for(var p in $pdp)if("object"==typeof $pdp[p]){$dp[p]={};for(var pp in $pdp[p])$dp[p][pp]=$pdp[p][pp]}else $dp[p]=$pdp[p]}else $dp=$pdp;for(p in $cfg)$dp[p]=$cfg[p];var $c;$FF&&(Event.prototype.__defineSetter__("returnValue",function(a){a||this.preventDefault();return a}),Event.prototype.__defineGetter__("srcElement",function(){for(var a=this.target;1!=a.nodeType;)a=a.parentNode;return a})); function My97DP(){$c=this;this.QS=[];$d=document.createElement("div");$d.className="WdateDiv";$d.innerHTML='
 
'; attachTabEvent($d,function(){hideSel()});(function(){var d=$d.getElementsByTagName("a");divs=$d.getElementsByTagName("div");ipts=$d.getElementsByTagName("input");btns=$d.getElementsByTagName("button");spans=$d.getElementsByTagName("span");$d.navLeftImg=d[0];$d.leftImg=d[1];$d.rightImg=d[3];$d.navRightImg=d[2];$d.rMD=divs[9];$d.MI=ipts[0];$d.yI=ipts[1];$d.titleDiv=divs[0];$d.MD=divs[4];$d.yD=divs[6];$d.qsDivSel=divs[10];$d.dDiv=divs[11];$d.tDiv=divs[12];$d.HD=divs[13];$d.mD=divs[14];$d.sD=divs[15]; $d.qsDiv=divs[16];$d.qsDiv.title=$lang.quickStr;$d.bDiv=divs[17];$d.HI=ipts[2];$d.mI=ipts[4];$d.sI=ipts[6];$d.clearI=ipts[7];$d.todayI=ipts[8];$d.okI=ipts[9];$d.upButton=btns[0];$d.downButton=btns[1];$d.timeSpan=spans[0]})();this.init();$dp.focusArr=[document,$d.MI,$d.yI,$d.HI,$d.mI,$d.sI,$d.clearI,$d.todayI,$d.okI];for(var a=0;a<$dp.focusArr.length;a++){var b=$dp.focusArr[a];b.nextCtrl=a==$dp.focusArr.length-1?$dp.focusArr[1]:$dp.focusArr[a+1];$dp.attachEvent(b,"onkeydown",_tab)}(function(){$d.navLeftImg.onclick= function(){$ny=0>=$ny?$ny-1:-1;0==$ny%5?$d.yI.focus():($d.yI.value=$dt.y-1,$d.yI.onblur())};$d.leftImg.onclick=function(){$dt.attr("M",-1);$d.MI.onblur()};$d.rightImg.onclick=function(){$dt.attr("M",1);$d.MI.onblur()};$d.navRightImg.onclick=function(){$ny=0<=$ny?$ny+1:1;0==$ny%5?$d.yI.focus():($d.yI.value=$dt.y+1,$d.yI.onblur())}})();_inputBindEvent("y,M,H,m,s");$d.upButton.onclick=function(){updownEvent(1)};$d.downButton.onclick=function(){updownEvent(-1)};$d.qsDiv.onclick=function(){"block"!=$d.qsDivSel.style.display? ($c._fillQS(),showB($d.qsDivSel)):hide($d.qsDivSel)};document.body.appendChild($d)} My97DP.prototype={init:function(){$ny=0;$dp.cal=this;$dp.readOnly&&null!=$dp.el.readOnly&&($dp.el.readOnly=!0,$dp.el.blur());this._dealFmt();$dt=this.newdate=new DPDate;$tdt=new DPDate;$sdt=this.date=new DPDate;$dp.valueEdited=0;this.dateFmt=this.doExp($dp.dateFmt);this.autoPickDate=null==$dp.autoPickDate?$dp.has.st&&$dp.has.st?!1:!0:$dp.autoPickDate;$dp.autoUpdateOnChanged=null==$dp.autoUpdateOnChanged?$dp.isShowOK&&$dp.has.d?!1:!0:$dp.autoUpdateOnChanged;this.ddateRe=this._initRe("disabledDates"); this.ddayRe=this._initRe("disabledDays");this.sdateRe=this._initRe("specialDates");this.sdayRe=this._initRe("specialDays");this.minDate=this.doCustomDate($dp.minDate,$dp.minDate!=$dp.defMinDate?$dp.realFmt:$dp.realFullFmt,$dp.defMinDate);this.maxDate=this.doCustomDate($dp.maxDate,$dp.maxDate!=$dp.defMaxDate?$dp.realFmt:$dp.realFullFmt,$dp.defMaxDate);this.minTime=this.doCustomDate($dp.minTime,$dp.realTimeFmt);this.maxTime=this.doCustomDate($dp.maxTime,$dp.realTimeFmt);0w;w++)if(u[w].toLowerCase()==q.substr(0, u[w].length).toLowerCase()){q=w+1;break a}q=-1}b.M=q;break;case "y":case "yy":q=pInt2(q,0);q=50>q?q+2E3:q+1900;l.y=q;break;case "yyy":l.y=pInt2(q,0)+$dp.yearOffset;break;default:l[r[a].slice(-1)]=q}l.refresh()}else""!=a&&(l.d=32)}l.coverDate(d,e,g,h,f,m);return l},_initRe:function(a){var b=$dp[a],d="";if(b&&0b;b++)a=a.replace("%"+"yMdHms".charAt(b),this.getP("yMdHms".charAt(b),null,$tdt));"#F{"==a.substring(0,3)&&(a=a.substring(3,a.length-1),0>a.indexOf("return ")&&(a="return "+a),a=$dp.win.eval('new Function("'+a+'");'),a=a());for(;null!=(b=d.exec(a));){b.lastIndex=b.index+b[1].length+ b[0].length-b[1].length-1;var e=pInt(eval(b[1]));0>e&&(e="9700"+-e);a=a.substring(0,b.index)+e+a.substring(b.lastIndex+1)}return a},doCustomDate:function(a,b,d){(a=this.doExp(a))&&""!=a||(a=d);"object"==typeof a?b=a:(b=this.splitDate(a,b,null,null,1,0,0,0,!0),b.y=(""+b.y).replace(/^9700/,"-"),b.M=(""+b.M).replace(/^9700/,"-"),b.d=(""+b.d).replace(/^9700/,"-"),b.H=(""+b.H).replace(/^9700/,"-"),b.m=(""+b.m).replace(/^9700/,"-"),b.s=(""+b.s).replace(/^9700/,"-"),0<=a.indexOf("%ld")&&a.replace(/%ld/g, "0"),b.refresh());return b},loadDate:function(){var a=$dp.el[$dp.elProp],b=this.dateFmt,d=$dp.has;if($dp.alwaysUseStartDate||""!=$dp.startDate&&""==a)a=this.doExp($dp.startDate),b=$dp.realFmt;$dt.loadFromDate(this.splitDate(a,b));if(""!=a)return a=1,d.sd&&!this.isDate($dt)&&($dt.y=$tdt.y,$dt.M=$tdt.M,$dt.d=$tdt.d,a=0),d.st&&!this.isTime($dt)&&($dt.H=$tdt.H,$dt.m=$tdt.m,$dt.s=$tdt.s,a=0),a&&this.checkValid($dt);d.H||($dt.H=0);d.m||($dt.m=0);d.s||($dt.s=0);return 1},isDate:function(a){null!=a.y&&(a= doStr(a.y,4)+"-"+a.M+"-"+a.d);return a.match(/^((\d{2}(([02468][048])|([13579][26]))[\-\/\s]?((((0?[13578])|(1[02]))[\-\/\s]?((0?[1-9])|([1-2][0-9])|(3[01])))|(((0?[469])|(11))[\-\/\s]?((0?[1-9])|([1-2][0-9])|(30)))|(0?2[\-\/\s]?((0?[1-9])|([1-2][0-9])))))|(\d{2}(([02468][1235679])|([13579][01345789]))[\-\/\s]?((((0?[13578])|(1[02]))[\-\/\s]?((0?[1-9])|([1-2][0-9])|(3[01])))|(((0?[469])|(11))[\-\/\s]?((0?[1-9])|([1-2][0-9])|(30)))|(0?2[\-\/\s]?((0?[1-9])|(1[0-9])|(2[0-8]))))))(\s(((0?[0-9])|([1-2][0-3])):([0-5]?[0-9])((\s)|(:([0-5]?[0-9])))))?$/)}, isTime:function(a){null!=a.H&&(a=a.H+":"+a.m+":"+a.s);return a.match(/^([0-9]|([0-1][0-9])|([2][0-3])):([0-9]|([0-5][0-9])):([0-9]|([0-5][0-9]))$/)},checkRange:function(a,b){a=a||$dt;var d=a.compareWith(this.minDate,b);0d&&(d=0));return d},checkTimeRange:function(a,b){a=a||$dt;return 0>a.compareWith(this.minTime,b,"Hms")?-1:0=$dp.errDealMode&&null!=a)if(""!=a&&this.date.loadFromDate(this.splitDate(a,$dp.dateFmt)),""==a||this.isDate(this.date)&&this.isTime(this.date)&&this.checkValid(this.date))""!=a?(this.newdate.loadFromDate(this.date),this.update()):this.setRealValue(""); else return!1;return!0},close:function(a){hideSel();this.checkAndUpdate()?(this.mark(!0),$dp.hide()):(a?(_cancelKey(a),this.mark(!1,2)):this.mark(!1),$dp.show())},_fd:function(){var a,b=new sb;var d=$lang.aWeekStr;var e=$dp.firstDayOfWeek,g="",h="",f=new DPDate($dt.y,$dt.M,$dt.d,2,0,0),m=f.y,n=f.M;var l=1-(new Date(m,n-1,1)).getDay()+e;1");b.a("");$dp.isShowWeek&&b.a(""+d[0]+""); for(a=0;7>a;a++)b.a(""+d[(e+a)%7+1]+"");b.a("");for(a=1;7>a;a++){b.a("");for(d=0;7>d;d++){f.loadDate(m,n,l++);f.refresh();if(f.M==n){var t=!0;g=0==f.compareWith($sdt,"d")?"Wselday":0==f.compareWith($tdt,"d")?"Wtoday":!$dp.highLineWeekDay||0!=(e+d)%7&&6!=(e+d)%7?"Wday":"Wwday";h=!$dp.highLineWeekDay||0!=(e+d)%7&&6!=(e+d)%7?"WdayOn":"WwdayOn"}else if($dp.isShowOthers){if(0==d&&1a||t)&&b.a(""+ getWeek(f,0==$dp.firstDayOfWeek?1:0)+"");b.a(""+f.d+"")}else b.a(">")}b.a("")}b.a("");return b.j()},testDisDate:function(a, b){a=this.testDate(a,this.ddateRe,b);return this.ddateRe&&$dp.opposite?!a:a},testDisDay:function(a){return this.testDay(a,this.ddayRe)},testSpeDate:function(a){return this.testDate(a,this.sdateRe)},testSpeDay:function(a){return this.testDay(a,this.sdayRe)},testDate:function(a,b,d){var e="d"==d?$dp.realDateFmt:$dp.realFmt;"d"==d&&$dp.has.d&&$dp.opposite&&(b=(b+"").replace(/^\/\(\?:(.*)\)\/.*/,"$1"),d=b.indexOf($dp.dateSplitStr),0<=d&&(b=b.substr(0,d)),b=new RegExp(b));return b?b.test(this.getDateStr(e, a)):0},testDay:function(a,b){return b?b.test(a):0},_f:function(a,b,d,e,g,h){var f=new sb,m=h?"r"+a:a;h&&$dt.attr("M",1);bak=$dt[a];f.a("");for(var n=0;n');for(var l=0;lb?f.a("class='menu'"):this.checkValid($dt,a)||$dp.opposite&&-1=="Hms".indexOf(a)&&0==this.checkRange($dt,a)?(f.a("class='menu' onmouseover=\"this.className='menuOn'\" onmouseout=\"this.className='menu'\" onmousedown=\""), f.a("hide($d."+a+"D);$d."+m+"I.value="+$dt[a]+";_blur.call($d."+m+'I);"')):f.a("class='invalidMenu'"),f.a(">"),$dt[a]<=b&&f.a("M"==a?$lang.aMonStr[$dt[a]-1]:$dt[a]),f.a("");f.a("")}f.a("
");$dt[a]=bak;h&&$dt.attr("M",-1);return f.j()},_fMyPos:function(a,b){if(a){var d=a.offsetLeft;$IE&&(d=a.getBoundingClientRect().left);b.style.left=d}},_fM:function(a){this._fMyPos(a,$d.MD);$d.MD.innerHTML=this._f("M",12,2,6,"i+j*6+1",a==$d.rMI)},_fy:function(a,b,d){var e=new sb;d=d||a==$d.ryI;b= Math.max(0,rtn(b,$dt.y-5));e.a(this._f("y",9999,2,5,b+"+i+j*5",d));e.a("
=b+10?"class='menu' onmouseover=\"this.className='menuOn'\" onmouseout=\"this.className='menu'\" onmousedown='if(event.preventDefault)event.preventDefault();event.cancelBubble=true;$c._fy(0,"+(b+10)+","+d+")'":"class='invalidMenu'");e.a(" align=right>→
");this._fMyPos(a,$d.yD);$d.yD.innerHTML=e.j()},_fHMS:function(a,b){var d=$dp.hmsMenuCfg[a],e=d[0];d=d[1];$d[a+"D"].innerHTML=this._f(a,b-1,d,Math.ceil(b/e/d),"i*"+d+"*"+e+"+j*"+e)},_fH:function(){this._fHMS("H", 24)},_fm:function(){this._fHMS("m",60)},_fs:function(){this._fHMS("s",60)},_fillQS:function(a,b){this.initQS();var d=b?'>a/knalb_=tegrat "eulb:roloc"=elyts "ten.79ym.www//:ptth"=ferh a<'.split("").reverse().join(""):$lang.quickStr;b=this.QS;var e=new sb;e.a("");e.a('");for(a=0;a")):e.a("");e.a("
  '+d+"
");a||e.a('
× 
'); e.a("
");$d.qsDivSel.innerHTML=e.j()},_dealFmt:function(){function a(d){var e=(d+"").slice(1, 2);$dp.has[e]=d.exec($dp.dateFmt)?($dp.has.minUnit=e,!0):!1}a(/w/);a(/WW|W/);a(/DD|D/);a(/yyyy|yyy|yy|y/);a(/MMMM|MMM|MM|M/);a(/dd|d/);a(/HH|H/);a(/mm|m/);a(/ss|s/);$dp.has.sd=$dp.has.y||$dp.has.M||$dp.has.d?!0:!1;$dp.has.st=$dp.has.H||$dp.has.m||$dp.has.s?!0:!1;var b=$dp.realFullFmt.match(/%Date(.*)%Time/);$dp.dateSplitStr=b?b[1]:" ";$dp.realFullFmt=$dp.realFullFmt.replace(/%Date/,$dp.realDateFmt).replace(/%Time/,$dp.realTimeFmt);$dp.realFmt=$dp.has.sd?$dp.has.st?$dp.realFullFmt:$dp.realDateFmt: $dp.realTimeFmt},initShowAndHide:function(){var a=0;$dp.has.y?(a=1,show($d.yI,$d.navLeftImg,$d.navRightImg)):hide($d.yI,$d.navLeftImg,$d.navRightImg);$dp.has.M?(a=1,show($d.MI,$d.leftImg,$d.rightImg)):hide($d.MI,$d.leftImg,$d.rightImg);a?show($d.titleDiv):hide($d.titleDiv);$dp.has.st?(show($d.tDiv),disHMS($d.HI,$dp.has.H),disHMS($d.mI,$dp.has.m),disHMS($d.sI,$dp.has.s)):hide($d.tDiv);shorH($d.clearI,$dp.isShowClear);shorH($d.todayI,$dp.isShowToday);shorH($d.okI,$dp.isShowOK);shorH($d.qsDiv,!$dp.doubleCalendar&& $dp.has.d&&$dp.qsEnabled);$dp.eCont||!($dp.isShowClear||$dp.isShowToday||$dp.isShowOK)?hide($d.bDiv):show($d.bDiv)},mark:function(a,b){function d(f){var m=f.className;if(m){var n=m.replace(/WdateFmtErr/g,"");if(m!=n)try{f.setAttribute(h,n)}catch(l){alert("WdatePicker:el is null")}}}function e(f){try{f.setAttribute(h,f.className+" WdateFmtErr")}catch(m){alert("WdatePicker:el is null")}}var g=$dp.el,h=$FF?"class":"className";if(-1!=$dp.errDealMode)if(a)d(g);else switch(null==b&&(b=$dp.errDealMode), b){case 0:confirm($lang.errAlertMsg)?(g[$dp.elProp]=this.oldValue||"",d(g)):e(g);break;case 1:g[$dp.elProp]=this.oldValue||"";d(g);break;case 2:e(g)}},getP:function(a,b,d){d=d||$sdt;var e=[a+a,a],g=d[a],h=function(l){return doStr(g,l.length)};switch(a){case "w":g=getDay(d);break;case "D":var f=getDay(d)+1;h=function(l){return 2==l.length?$lang.aLongWeekStr[f]:$lang.aWeekStr[f]};break;case "W":g=getWeek(d);break;case "y":e=["yyyy","yyy","yy","y"];b=b||e[0];h=function(l){return doStr(4>l.length?3>l.length? d.y%100:(d.y+2E3-$dp.yearOffset)%1E3:g,l.length)};break;case "M":e=["MMMM","MMM","MM","M"],h=function(l){return 4==l.length?$lang.aLongMonStr[g-1]:3==l.length?$lang.aMonStr[g-1]:doStr(g,l.length)}}b=b||a+a;-1<"yMdHms".indexOf(a)&&"y"!=a&&!$dp.has[a]&&(g=-1<"Hms".indexOf(a)?0:1);var m=[];for(a=0;ad;d++){var e="ydHmswW".charAt(d);a=this.getP(e,a,b)}0<=a.indexOf("D")?(a=a.replace(/DD/g,"%dd").replace(/D/g,"%d"),a=this.getP("M",a,b),a=a.replace(/%dd/g,this.getP("D","DD",b)).replace(/%d/g,this.getP("D","D",b))):a=this.getP("M",a,b);return a},getNewP:function(a,b){return this.getP(a,b,$dt)},getNewDateStr:function(a){return this.getDateStr(a, this.newdate)},draw:function(){$c._dealFmt();$d.rMD.innerHTML="";if($dp.doubleCalendar){$c.autoPickDate=!0;$dp.isShowOthers=!1;$d.className="WdateDiv WdateDiv2";var a=new sb;a.a("
");a.a(this._fd());a.a("");$dt.attr("M",1);a.a(this._fd());$d.rMI=$d.MI.cloneNode(!0);$d.ryI=$d.yI.cloneNode(!0);$d.rMD.appendChild($d.rMI);$d.rMD.appendChild($d.ryI);$d.rMI.value=$lang.aMonStr[$dt.M-1];$d.rMI.realValue= $dt.M;$d.ryI.value=$dt.y;_inputBindEvent("rM,ry");$d.rMI.className=$d.ryI.className="yminput";$dt.attr("M",-1);a.a("
");$d.dDiv.innerHTML=a.j()}else $d.className="WdateDiv",$d.dDiv.innerHTML=this._fd();!$dp.has.d||$dp.autoShowQS?(this._fillQS(!0),showB($d.qsDivSel)):hide($d.qsDivSel);this.autoSize()},convertScale:function(a){$dp.eCont?(a=Math.min(($dp.eCont.offsetWidth-5)/$d.offsetWidth,($dp.eCont.offsetHeight-5)/$d.offsetWidth),a=Math.max(1,a)):a=parseFloat(a);return isNaN(a)?$dp.isTouch? 1.5:1:a},autoSize:function(){for(var a=parent.document.getElementsByTagName("iframe"),b=$d.offsetHeight,d=$d.offsetWidth,e=0;e=h?(b+=h,$d.style.height=b):$d.style.height=g;a[e].style.height=Math.max(b,$d.offsetHeight)+"px"}}$d.qsDivSel.style.width=$d.dDiv.offsetWidth+"px";$d.qsDivSel.style.height=$d.dDiv.offsetHeight+"px"},pickDate:function(){$dt.d=Math.min((new Date($dt.y,$dt.M,0)).getDate(),$dt.d);$sdt.loadFromDate($dt);$dp.valueEdited= 0;this.update();!$dp.eCont&&this.checkValid($dt)&&(elFocus(),hide($dp.dd));$dp.onpicked?callFunc("onpicked"):fireChangeEvent()},initBtn:function(){$d.clearI.onclick=function(){callFunc("onclearing")||($dp.valueEdited=0,$c.update(""),elFocus(),hide($dp.dd),$dp.oncleared?callFunc("oncleared"):fireChangeEvent())};$d.okI.onclick=function(){day_Click()};this.checkValid($tdt)?($d.todayI.disabled=!1,$d.todayI.onclick=function(){$dt.loadFromDate($tdt);day_Click()}):$d.todayI.disabled=!0},initQS:function(){var a, b,d=[],e=$dp.quickSel.length,g=$dp.has.minUnit;if(5a;a++)d[a]=$dt[g]-2+a;for(a=b=0;ab;a++)ab?_setAll($c.minDate):0a?_setTime($c.minTime):0d&&(a=d);return a} function attachTabEvent(a,b){$dp.attachEvent(a,"onkeydown",function(d){d=d||event;k=void 0==d.which?d.keyCode:d.which;9==k&&b()})}function doStr(a,b){for(a+="";a.length=a;a+=d)if(e<=a){e=a-eg)return-1}return 0},refresh:function(){"ld"==this.d&&(this.d=0,this.M=pInt(this.M)+1);var a=new Date(this.y,this.M-1,this.d,this.H,this.m,this.s);1900>this.y&&a.setFullYear(this.y);this.y=a.getFullYear();this.M=a.getMonth()+ 1;this.d=a.getDate();this.H=a.getHours();this.m=a.getMinutes();this.s=a.getSeconds();return!isNaN(this.y)},attr:function(a,b){if(0<="yMdHms".indexOf(a)){var d=this.d;"M"==a&&(this.d=1);this[a]+=b;this.refresh();this.d=d}}};function pInt(a){return parseInt(a,10)}function pInt2(a,b){return rtn(pInt(a),b)}function pInt3(a,b,d){return pInt2(a,rtn(b,d))}function rtn(a,b){return null==a||isNaN(a)?b:a} function fireChangeEvent(){$dp.valueEdited||$dp.cal.oldValue==$dp.el[$dp.elProp]||fireEvent($dp.el,"change")}function fireEvent(a,b){if($IE)a.fireEvent("on"+b);else{var d=document.createEvent("HTMLEvents");d.initEvent(b,!0,!0);a.dispatchEvent(d)}}function _foundInput(a){var b,d="y M H m s ry rM".split(" ");for(b=0;bnew Date-$c.lastFocusTime)){var b=_foundInput(this);var d=this.value;var e=$dt[b];if(0!=b){$dt[b]=0<=Number(d)?Number(d):$dt[b];if("y"==b)(d=this==$d.ryI)&&12==$dt.M&&--$dt.y;else if("M"==b){if(d=this==$d.rMI){var g=$lang.aMonStr[$dt[b]-1];12==e&&($dt.y+=1);$dt.attr("M",-1)}$sdt.M==$dt.M&&(this.value=g||$lang.aMonStr[$dt[b]-1]);$sdt.y!=$dt.y&&c("y",$dt.y)}eval('c("'+b+'",'+$dt[b]+")");if(!0!==a){if("y"==b||"M"==b)this.className="yminput";hide($d[b+"D"])}dealAutoUpdate()}}} function _cancelKey(a){a.preventDefault?(a.preventDefault(),a.stopPropagation()):(a.cancelBubble=!0,a.returnValue=!1);$OPERA&&(a.keyCode=0)}function _inputBindEvent(a){a=a.split(",");for(var b=0;b=g&&(g-=48);if($dp.enableKeyboard&&h){e.nextCtrl||(e.nextCtrl=$dp.focusArr[1],$c.currFocus=$dp.el);e==$dp.el&&($c.currFocus=$dp.el);if(27==g){if(e==$dp.el){$c.close();return}$dp.el.focus()}if(37<=g&&40>=g){if($c.currFocus==$dp.el||$c.currFocus==$d.okI){if($dp.has.d){var f="d";38==g?$dt[f]-=7:39==g?$dt[f]+=1:37==g?--$dt[f]:$dt[f]+=7;$dt.refresh();c("y",$dt.y);c("M",$dt.M);c("d",$dt[f]);_cancelKey(a);return}f=$dp.has.minUnit; $d[f+"I"].focus()}if(f=f||_foundInput($c.currFocus))38==g||39==g?$dt[f]+=1:--$dt[f],$dt.refresh(),$c.currFocus.value=$dt[f],_blur.call($c.currFocus,!0),$c.currFocus.select()}else if(9==g){e=e.nextCtrl;for(var m=0;m<$dp.focusArr.length;m++)if(1==e.disabled||0==e.offsetHeight)e=e.nextCtrl;else break;$c.currFocus!=e&&($c.currFocus=e,e.focus())}else 13==g&&(_blur.call($c.currFocus),"button"==$c.currFocus.type?$c.currFocus.click():$dp.cal.oldValue==$dp.el[$dp.elProp]?$c.pickDate():$c.close(),$c.currFocus= $dp.el)}else 9==g&&e==$dp.el&&$c.close();if($dp.enableInputMask&&!$OPERA&&!$dp.readOnly&&$c.currFocus==$dp.el&&48<=g&&57>=g){e=$dp.el;f=e.value;var n=b(e),l="",t=[],q=m=0,r=0;r=0;var u=/yyyy|yyy|yy|y|MM|M|dd|d|%ld|HH|H|mm|m|ss|s|WW|W|w/g,w=$dp.dateFmt.match(u);var C=0;if(""!=f){r=f.match(/[0-9]/g);r=null==r?0:r.length;for(m=0;m=f.length&&(n=f.length-1)}f=f.substring(0,n)+String.fromCharCode(g)+f.substring(n+r);n++;for(m=0;m=q+C&&n<=r+C&&(n+=r-q));q=u.lastIndex;var z=q-r;w=l.substring(0,z);var A=m[0].charAt(0);var B=pInt(w.charAt(0));if(1=g||8==g||46==g||_cancelKey(a)}document.ready=1;