/*ADOBE SYSTEMS INCORPORATED Copyright 2007 Adobe Systems Incorporated All Rights Reserved. NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms of the Adobe license agreement accompanying it. If you have received this file from a source other than Adobe, then your use, modification, or distribution of it requires the prior written permission of Adobe.*/ var KT_focusedEl=null; KT_validateSingle=function(_8fc,_8fd){ var _8fe=_8fc.charCodeAt(0); switch(_8fd){ case "9": if(_8fe<58&&_8fe>47){ return true; } break; case "A": if((_8fe<91&&_8fe>64)||(_8fe<123&&_8fe>96)){ return true; } break; case "X": if((_8fe<91&&_8fe>64)||(_8fe<123&&_8fe>96)||(_8fe<58&&_8fe>47)){ return true; } break; case "?": return true; break; default: return true; break; } }; KT_maskDefaultValue=function(_8ff){ switch(_8ff){ case "9": return "0"; break; case "A": return "a"; break; case "X": return "0"; break; case "?": return "0"; break; default: return "0"; break; } }; KT_isSpecialChar=function(_900){ if(_900=="9"||_900=="A"||_900=="X"||_900=="?"){ return true; }else{ return false; } }; mask_onValueChanged=function(){ if((typeof window.getSelection=="undefined"&&typeof document.selection=="undefined")){ return; } if(KT_focusedEl==null||KT_focusedEl.mask==null||KT_focusedEl.mask==""){ return; } var mask=KT_focusedEl.mask; var val=KT_focusedEl.value; var i=0; var _904=false; if(val==KT_focusedEl.oldText){ return; } if(val.length>mask.length){ val=val.substr(0,mask.length); _904=true; } for(;imask.length){ val=val.substr(0,mask.length); _904=true; } if(KT_focusedEl.value!=val){ KT_focusedEl.value=val; } KT_focusedEl.oldText=val; if(_904){ } }; mask_parseFirstTime=function(_906,mask){ var _908=""; var _909=""; cond=1; imask=0; ival=0; cnt=0; while(cond==1){ cond=1; if(!KT_isSpecialChar(mask.charAt(imask))){ if(_906.charCodeAt(ival).toString()!="NaN"){ if(mask.charAt(imask)==_906.charAt(ival)){ imask++; ival++; }else{ _906=_906.substr(0,ival)+mask.charAt(imask)+_906.substr(ival,_906.length); imask=0; ival=0; cond=1; } }else{ _906+=KT_maskDefaultValue(mask.charAt(imask)); } }else{ imask++; ival++; } if(imask>=mask.length||ival>=_906.length){ cond=0; } } for(i=0;i