1/*ADOBE SYSTEMS INCORPORATED 2Copyright 2007 Adobe Systems Incorporated 3All Rights Reserved. 4 5NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the 6terms of the Adobe license agreement accompanying it. If you have received this file from a 7source other than Adobe, then your use, modification, or distribution of it requires the prior 8written permission of Adobe.*/ 9var KT_focusedEl=null; 10KT_validateSingle=function(_52,_53){ 11var _54=_52.charCodeAt(0); 12switch(_53){ 13case "9": 14if(_54<58&&_54>47){ 15return true; 16} 17break; 18case "A": 19if((_54<91&&_54>64)||(_54<123&&_54>96)){ 20return true; 21} 22break; 23case "X": 24if((_54<91&&_54>64)||(_54<123&&_54>96)||(_54<58&&_54>47)){ 25return true; 26} 27break; 28case "?": 29return true; 30break; 31default: 32return true; 33break; 34} 35}; 36KT_maskDefaultValue=function(_55){ 37switch(_55){ 38case "9": 39return "0"; 40break; 41case "A": 42return "a"; 43break; 44case "X": 45return "0"; 46break; 47case "?": 48return "0"; 49break; 50default: 51return "0"; 52break; 53} 54}; 55KT_isSpecialChar=function(_56){ 56if(_56=="9"||_56=="A"||_56=="X"||_56=="?"){ 57return true; 58}else{ 59return false; 60} 61}; 62mask_onValueChanged=function(){ 63if((typeof window.getSelection=="undefined"&&typeof document.selection=="undefined")){ 64return; 65} 66if(KT_focusedEl==null||KT_focusedEl.mask==null||KT_focusedEl.mask==""){ 67return; 68} 69var _57=KT_focusedEl.mask; 70var val=KT_focusedEl.value; 71var i=0; 72var _5a=false; 73if(val==KT_focusedEl.oldText){ 74return; 75} 76if(val.length>_57.length){ 77val=val.substr(0,_57.length); 78_5a=true; 79} 80for(;i<_57.length;i++){ 81if(val.charCodeAt(i).toString()!="NaN"){ 82if(KT_isSpecialChar(_57.charAt(i))){ 83if(KT_validateSingle(val.charAt(i),_57.charAt(i))){ 84continue; 85}else{ 86val=KT_focusedEl.oldText; 87i=_57.length; 88break; 89} 90}else{ 91if(val.charAt(i)!=_57.charAt(i)){ 92if(i==val.length-1){ 93var _5b=val.substr(val.length-1,val.length); 94val=val.substr(0,val.length-1)+_57.charAt(i)+_5b; 95_5a=true; 96continue; 97}else{ 98val=KT_focusedEl.oldText; 99i=_57.length; 100} 101break; 102} 103} 104}else{ 105if(val.length<KT_focusedEl.oldText.length){ 106break; 107} 108for(;i<_57.length;i++){ 109if(!KT_isSpecialChar(_57.charAt(i))){ 110val+=_57.charAt(i); 111_5a=true; 112}else{ 113break; 114} 115} 116break; 117} 118} 119if(val.length>_57.length){ 120val=val.substr(0,_57.length); 121_5a=true; 122} 123if(KT_focusedEl.value!=val){ 124KT_focusedEl.value=val; 125} 126KT_focusedEl.oldText=val; 127if(_5a){ 128} 129}; 130mask_parseFirstTime=function(_5c,_5d){ 131var _5e=""; 132var _5f=""; 133cond=1; 134imask=0; 135ival=0; 136cnt=0; 137while(cond==1){ 138cond=1; 139if(!KT_isSpecialChar(_5d.charAt(imask))){ 140if(_5c.charCodeAt(ival).toString()!="NaN"){ 141if(_5d.charAt(imask)==_5c.charAt(ival)){ 142imask++; 143ival++; 144}else{ 145_5c=_5c.substr(0,ival)+_5d.charAt(imask)+_5c.substr(ival,_5c.length); 146imask=0; 147ival=0; 148cond=1; 149} 150}else{ 151_5c+=KT_maskDefaultValue(_5d.charAt(imask)); 152} 153}else{ 154imask++; 155ival++; 156} 157if(imask>=_5d.length||ival>=_5c.length){ 158cond=0; 159} 160} 161for(i=0;i<_5d.length;i++){ 162if(KT_isSpecialChar(_5d.charAt(i))){ 163_5e+=_5d.charAt(i); 164if(_5c.charCodeAt(i).toString()!="NaN"){ 165_5f+=_5c.charAt(i); 166}else{ 167_5f+=KT_maskDefaultValue(_5d.charAt(i)); 168} 169} 170} 171oldvalue=_5c; 172_5c=_5f; 173var _60=""; 174for(i=0;i<_5e.length;i++){ 175if(!KT_validateSingle(_5c.charAt(i),_5e.charAt(i))){ 176_60+=KT_maskDefaultValue(_5e.charAt(i)); 177}else{ 178_60+=_5c.charAt(i); 179} 180} 181var _61=""; 182var j=0; 183for(i=0;i<_5d.length;i++){ 184if(KT_isSpecialChar(_5d.charAt(i))){ 185_61+=_60.charAt(j++); 186}else{ 187_61+=_5d.charAt(i); 188} 189} 190return _61; 191}; 192mask_onSetFocus=function(obj,_64){ 193if((typeof window.getSelection=="undefined"&&typeof document.selection=="undefined")){ 194return; 195} 196if(typeof obj.mask=="undefined"){ 197ret=""; 198if(obj.value!=""){ 199ret=mask_parseFirstTime(obj.value,_64); 200} 201obj.value=ret; 202obj.mask=_64; 203} 204KT_focusedEl=obj; 205if(typeof KT_focusedEl.oldText=="undefined"){ 206KT_focusedEl.oldText=obj.value; 207mask_onValueChanged(); 208} 209}; 210mask_onKillFocus=function(){ 211if((typeof window.getSelection=="undefined"&&typeof document.selection=="undefined")){ 212return; 213} 214mask_onValueChanged(); 215KT_focusedEl=null; 216};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.