function HxG_5 () { this.version="4.00"; this.brw=new this.HxBrowserMgr(); this.brw.initClientBrowserObject(this); this.g=new this.HxGeometryMgr(this); this.ifr=new this.HxIFrameMgr(this); this.res=[]; this.i=new this.HxCompImpMgr(this); this.popMgr=new this.HxPopMgr(this); this.mouser=new this.HxMouseMgr(this); this.uistate=new this.HxUIState(); this.Components=[]; this.SubComponents=[]; this.Behaviors=[]; this.Converters=[]; this.Validators=[]; this.HTMLTags=[]; this.Popups=[]; this.DialogStack= []; this.ifr=new this.HxIFrameMgr(); this.Timers=[]; this.ObjTimers=[]; this.userEvents=[]; this.regExp=new this.HxConstraints(); this.sel=new this.HxCaretSelection(); this.tabNav=null; this.c=new this.HxCache(); this.clip=new this.pseudoClipboard(); this.action=new this.HxAction(); this.CSSSelectors=null; this.cal=new this.HxICal(); this.col=new this.HxICol(); this.Topics=[]; this.bodyLoadRewritten=false; this.bodyLoadDone=false; this.bodyLoadRedrawA=false; this.bodyLoadRedrawB=false; this.isPortal=false; this.timerUnq=999; this.topicUnq=999; this.globalResize=false; this.pendingFocusReturn=null; this.skipVCMonitor=false; this.pendingSelect=false; this.pendingBlurRefocus=null; this.pendingPrompt=null; this.cursorTracking=null; } HxG_5.prototype.BHR_generic="generic"; HxG_5.prototype.BHR_keybind="keybind"; HxG_5.prototype.BHR_validate= "validate"; HxG_5.prototype.BHR_assist="assist"; HxG_5.prototype.BHR_focus="focus"; HxG_5.prototype.BHR_alert="alert"; HxG_5.prototype.BHR_hs="hs"; HxG_5.prototype.BHR_track="track"; HxG_5.prototype.BHR_mouseclick="mouseclick"; HxG_5.prototype.BHR_ajaxgetexternal="ajaxgetexternal"; HxG_5.prototype.BHR_ajaxget="ajaxget"; HxG_5.prototype.BHR_ajaxsubmit="ajaxsubmit"; HxG_5.prototype.BHR_typeahead="typeahead"; HxG_5.prototype.CMP_calendar="calendar"; HxG_5.prototype.CMP_section="section"; HxG_5.prototype.CMP_colorpicker="colorpicker"; HxG_5.prototype.CMP_slider="slider"; HxG_5.prototype.CMP_spinner="spinner"; HxG_5.prototype.CMP_progressbar="progressbar"; HxG_5.prototype.CMP_timepicker="timepicker"; HxG_5.prototype.CMP_datepicker="datepicker"; HxG_5.prototype.CMP_image="image"; HxG_5.prototype.CMP_twistie="twistie"; HxG_5.prototype.CMP_menu="menu"; HxG_5.prototype.CMP_submenu="submenu"; HxG_5.prototype.CMP_mapitem="mapitem"; HxG_5.prototype.CMP_dialog="dialog"; HxG_5.prototype.CMP_datatable="datatable"; HxG_5.prototype.AJAX_prototypeloader=function () { if (HxG_5.prototype.JSFDatePicker && !hX_5.JSFDatePicker) hX_5.JSFDatePicker=HxG_5.prototype.JSFDatePicker; if (HxG_5.prototype.JSFMonth && !hX_5.JSFMonth) hX_5.JSFMonth=HxG_5.prototype.JSFMonth; if (HxG_5.prototype.JSFCalendar && !hX_5.JSFCalendar) hX_5.JSFCalendar=HxG_5.prototype.JSFCalendar; if (HxG_5.prototype.JSFColorPicker && !hX_5.JSFColorPicker) hX_5.JSFColorPicker=HxG_5.prototype.JSFColorPicker; if (HxG_5.prototype.JSFDialog && !hX_5.JSFDialog) hX_5.JSFDialog=HxG_5.prototype.JSFDialog; if (HxG_5.prototype.JSFImage && !hX_5.JSFImage) hX_5.JSFImage=HxG_5.prototype.JSFImage; if (HxG_5.prototype.JSFTwistie && !hX_5.JSFTwistie) hX_5.JSFTwistie=HxG_5.prototype.JSFTwistie; if (HxG_5.prototype.JSFMenu && !hX_5.JSFMenu) hX_5.JSFMenu=HxG_5.prototype.JSFMenu; if (HxG_5.prototype.JSFSubMenu && !hX_5.JSFSubMenu) hX_5.JSFSubMenu=HxG_5.prototype.JSFSubMenu; if (HxG_5.prototype.JSFMenuItem && !hX_5.JSFMenuItem) hX_5.JSFMenuItem=HxG_5.prototype.JSFMenuItem; if (HxG_5.prototype.JSFProgressBar && !hX_5.JSFProgressBar) hX_5.JSFProgressBar=HxG_5.prototype.JSFProgressBar; if (HxG_5.prototype.JSFSection && !hX_5.JSFSection) hX_5.JSFSection=HxG_5.prototype.JSFSection; if (HxG_5.prototype.JSFBehaviorTypeahead && !hX_5.JSFBehaviorTypeahead) hX_5.JSFBehaviorTypeahead=HxG_5.prototype.JSFBehaviorTypeahead; if (HxG_5.prototype.JSFTimePicker && !hX_5.JSFTimePicker) hX_5.JSFTimePicker=HxG_5.prototype.JSFTimePicker; if (HxG_5.prototype.JSFSlider && !hX_5.JSFSlider) hX_5.JSFSlider=HxG_5.prototype.JSFSlider if (HxG_5.prototype.JSFSpinner && !hX_5.JSFSpinner) hX_5.JSFSpinner=HxG_5.prototype.JSFSpinner; if (HxG_5.prototype.JSFDataTable && !hX_5.JSFDataTable) hX_5.JSFDataTable=HxG_5.prototype.JSFDataTable; } HxG_5.prototype.CVT_number="number"; HxG_5.prototype.CVT_datetime= "datetime"; HxG_5.prototype.CVT_mask="mask"; HxG_5.prototype.CVT_string="string"; HxG_5.prototype.ACT_FOCUS="FOCUS"; HxG_5.prototype.ACT_SELECTED="SELECTED"; HxG_5.prototype.ACT_UNSELECTED="UNSELECTED"; HxG_5.prototype.ACT_SHOW="SHOW"; HxG_5.prototype.ACT_HIDE="HIDE"; HxG_5.prototype.ACT_INVERTHIDE="INVERTHIDE"; HxG_5.prototype.ACT_VISIBLE="VISIBLE"; HxG_5.prototype.ACT_INVISIBLE="INVISIBLE"; HxG_5.prototype.ACT_INVERTVISIBLE="INVERTVISIBLE"; HxG_5.prototype.ACT_LOCKED="LOCKED"; HxG_5.prototype.ACT_UNLOCKED="UNLOCKED"; HxG_5.prototype.ACT_INVERTLOCKED= "INVERTLOCKED"; HxG_5.prototype.ACT_NEXTTAB="NEXTTAB"; HxG_5.prototype.ACT_NEXTTABCLEAR= "NEXTTABCLEAR"; HxG_5.prototype.ACT_PREVTAB="PREVTAB"; HxG_5.prototype.ACT_PREVTABCLEAR= "PREVTABCLEAR"; HxG_5.prototype.ACT_PADLEFT="PADLEFT"; HxG_5.prototype.ACT_PADRIGHT="PADRIGHT"; HxG_5.prototype.ACT_TRIM="TRIM"; HxG_5.prototype.ACT_CONFIRM="CONFIRM"; HxG_5.prototype.ACT_ALERT="ALERT"; HxG_5.prototype.ACT_CLICK="CLICK"; HxG_5.prototype.ACT_SUBMIT="SUBMIT"; HxG_5.prototype.ACT_NOTHING="NOTHING"; HxG_5.prototype.ACT_NONE="NONE"; HxG_5.prototype.ACT_STOP="STOP"; HxG_5.prototype.ACT_GOTO="GOTO"; HxG_5.prototype.ACT_GET="GET"; HxG_5.prototype.ACT_MOVE="MOVE"; HxG_5.prototype.ACT_DLG_OK="DLG_OK"; HxG_5.prototype.ACT_DLG_CANCEL="DLG_CANCEL"; HxG_5.prototype.TGT_ATERROR="@ERROR"; HxG_5.prototype.TGT_ISERROR="ERROR"; HxG_5.prototype.CLASS_BUTTON_LABEL="_Label"; HxG_5.prototype.CLASS_BUTTON_ICON="_Icon"; HxG_5.prototype.CLASS_BUTTON_MOUSED="_moused"; HxG_5.prototype.CLASS_BUTTON_DEPRSD="_depressed"; HxG_5.prototype.CLASS_BUTTON_DISBLD="_disabled"; HxG_5.prototype.CLASS_DEF="inputText"; HxG_5.prototype.CLASS_SL="_Slider"; HxG_5.prototype.CLASS_SL_LINES="_Body"; HxG_5.prototype.CLASS_DP="_DatePicker"; HxG_5.prototype.CLASS_DPS=["-Header", "-HeaderLine1", "-HeaderLine2", "-HeaderYear", "-HeaderMonth", "-HeaderWeekday", "-Body", "-Button", "-Hover", "-CurrentMonth", "-OtherMonth", "-CurrentDay", "-InvalidDay", "-Today", "-CurrentToday", "-Size"]; HxG_5.prototype.CLASS_CA="inputMiniCalendar"; HxG_5.prototype.CLASS_DEFC="selectOneColor"; HxG_5.prototype.CLASS_CLR="_ColorPicker"; HxG_5.prototype.CLASS_CLRS=["-Body", "-GridCell", "-GridSwatch", "-GridCell-Selected", "-GridCell-Hover","-GridCell-Hover-Selected"]; HxG_5.prototype.CLASS_TP="_TimePicker"; HxG_5.prototype.CLASS_TPS=["-Body", "-GridCell", "-GridSwatch", "-GridCell-Selected", "-GridCell-Hover","-GridCell-Hover-Selected"]; HxG_5.prototype.CLASS_PB="progressBar"; HxG_5.prototype.CLASS_PBS=["-Table", "-Message", "-Bar", "-Bar_container", "-Bar_text"]; HxG_5.prototype.CLASS_TA="_TypeAhead"; HxG_5.prototype.CLASS_TAS=["-List", "-Item", "-Item-Selected"]; HxG_5.prototype.CLASS_DLG=["_TitleBar", "_TitleBar-CloseButton", "_TitleBar-CloseButton-img", "_ContentArea", "_Footer"]; HxG_5.prototype.CLASS_MB_SEPARATOR="separator"; HxG_5.prototype.CLASS_MB_SEPARATOR_L= "separator_first"; HxG_5.prototype.CLASS_MB_SEPARATOR_R= "separator_last"; HxG_5.prototype.CLASS_MB_CELL="cell"; HxG_5.prototype.CLASS_MB_ALTCELL="cell_alt"; HxG_5.prototype.CLASS_MB_CELLF="cell_first"; HxG_5.prototype.CLASS_MB_CELLL="cell_last"; HxG_5.prototype.CLASS_MB_ITEM="item"; HxG_5.prototype.CLASS_MB_ALTITEM="item_alt"; HxG_5.prototype.CLASS_MB_ARROW="arrow"; HxG_5.prototype.CLASS_MB_N="_normal"; HxG_5.prototype.CLASS_MB_M="_moused"; HxG_5.prototype.CLASS_MB_S="_selected"; HxG_5.prototype.CLASS_MB_SM="_selected_moused"; HxG_5.prototype.CLASS_MB_D="_disabled"; HxG_5.prototype.DTFMT_DATE0="MM-dd-yyyy"; HxG_5.prototype.DTFMT_DEFAULTSTRICT=1; HxG_5.prototype.DTFMT_DEFAULTFIRSTDAYWEEK=0; HxG_5.prototype.DTFMT_YEAR="%yyyy"; HxG_5.prototype.DTFMT_GEYEAR="%GGGG %y"; HxG_5.prototype.DTFMT_GCYEAR="%yyyy %GG"; HxG_5.prototype.MFMT_DEFAULTSTRICT=1; HxG_5.prototype.WDIGITS="0123456789"; HxG_5.prototype.MASK_ALPHA="ABCDEFGHIJKLMNOPQRSTUVWXYZ"; HxG_5.prototype.DATE_EPOCH_IDS=["","i","h","b","j"]; HxG_5.prototype.DATE_EPOCH_YEARS=[ [0,0], ["06220716","006220716"], ["-37611006","-37611006"], ["-05430101","-05430101"], ["18680908","19120731","19261226","19890108"] ]; HxG_5.prototype.STR_DATE_TODAY=["today","tomorrow","yesterday","now"]; HxG_5.prototype._uA="A"; HxG_5.prototype._u2A="AA"; HxG_5.prototype._u3A="AAA"; HxG_5.prototype._u4A="AAAA"; HxG_5.prototype._u5A="AAAAA"; HxG_5.prototype._u6A="AAAAAA"; HxG_5.prototype._u7A="AAAAAAA"; HxG_5.prototype._u8A="AAAAAAAA"; HxG_5.prototype._lG="g"; HxG_5.prototype._l2G="gg"; HxG_5.prototype._l3G="ggg"; HxG_5.prototype._l4G="gggg"; HxG_5.prototype._l5G="ggggg"; HxG_5.prototype._l6G="gggggg"; HxG_5.prototype._l7G="ggggggg"; HxG_5.prototype._l8G="gggggggg"; HxG_5.prototype._lY="y"; HxG_5.prototype._l2Y="yy"; HxG_5.prototype._l3Y="yyy"; HxG_5.prototype._l4Y="yyyy"; HxG_5.prototype._uY="Y"; HxG_5.prototype._u2Y="YY"; HxG_5.prototype._u3Y="YYY"; HxG_5.prototype._u4Y="YYYY"; HxG_5.prototype._uG="G"; HxG_5.prototype._u2G="GG"; HxG_5.prototype._u3G="GGG"; HxG_5.prototype._u4G="GGGG"; HxG_5.prototype._uM="M"; HxG_5.prototype._u2M="MM"; HxG_5.prototype._u3M="MMM"; HxG_5.prototype._u4M="MMMM"; HxG_5.prototype._uE="E"; HxG_5.prototype._u2E="EE"; HxG_5.prototype._u3E="EEE"; HxG_5.prototype._u4E="EEEE"; HxG_5.prototype._uD="D"; HxG_5.prototype._u2D="DD"; HxG_5.prototype._u3D="DDD"; HxG_5.prototype._uS="S"; HxG_5.prototype._u2S="SS"; HxG_5.prototype._u3S="SSS"; HxG_5.prototype._lD="d"; HxG_5.prototype._l2D="dd"; HxG_5.prototype._lH="h"; HxG_5.prototype._l2H="hh"; HxG_5.prototype._uH="H"; HxG_5.prototype._u2H="HH"; HxG_5.prototype._lM="m"; HxG_5.prototype._l2M="mm"; HxG_5.prototype._lS="s"; HxG_5.prototype._l2S="ss"; HxG_5.prototype._uK="K"; HxG_5.prototype._u2K="KK"; HxG_5.prototype._lK="k"; HxG_5.prototype._l2K="kk"; HxG_5.prototype._lW="w"; HxG_5.prototype._l2W="ww"; HxG_5.prototype._uF="F"; HxG_5.prototype._uW="W"; HxG_5.prototype._lE="e"; HxG_5.prototype._lA="a"; HxG_5.prototype._lZ="z"; HxG_5.prototype._uZ="Z"; HxG_5.prototype._lX="x"; HxG_5.prototype._lN="n"; HxG_5.prototype._lP="p"; HxG_5.prototype._lF="f"; HxG_5.prototype._lL="l"; HxG_5.prototype._uR="R"; HxG_5.prototype.NFMT_DECIMAL0="###,###,##0"; HxG_5.prototype.NFMT_LOCALE0=",.%\u2030-$"; HxG_5.prototype.NFMT_DEFAULTSTRICT=1; HxG_5.prototype.TW_UP=0; HxG_5.prototype.TW_DN=1; HxG_5.prototype.TW_LT=2; HxG_5.prototype.TW_RT=3; HxG_5.prototype.TW_SNOUT=0; HxG_5.prototype.TW_PUG=1; HxG_5.prototype.TW_VEE=2; HxG_5.prototype.TW_TRI=3; HxG_5.prototype.TW_NOBAR=0; HxG_5.prototype.TW_BAR_INNER=1; HxG_5.prototype.TW_BAR_OUTER=2; HxG_5.prototype.TAG_OBJECT="object"; HxG_5.prototype.TAG_PARAM="param"; HxG_5.prototype.TAG_EMBED="embed"; HxG_5.prototype.ELEMENT_NODE=1; HxG_5.prototype.TEXT_NODE=3; HxG_5.prototype.DOCUMENT_NODE=9; HxG_5.prototype.KEY_BS=8; HxG_5.prototype.KEY_TAB=9; HxG_5.prototype.KEY_ENTER=13; HxG_5.prototype.KEY_ESC=27; HxG_5.prototype.KEY_SPACEBAR= 32; HxG_5.prototype.KEY_PGUP=33; HxG_5.prototype.KEY_PGDN=34; HxG_5.prototype.KEY_END=35; HxG_5.prototype.KEY_HOME=36; HxG_5.prototype.KEY_LTARROW=37; HxG_5.prototype.KEY_UPARROW=38; HxG_5.prototype.KEY_RTARROW=39; HxG_5.prototype.KEY_DNARROW=40; HxG_5.prototype.KEY_INS=45; HxG_5.prototype.KEY_DEL=46; HxG_5.prototype.CLR_BTN="buttonface"; HxG_5.prototype.CLR_BCK="Window"; HxG_5.prototype.CLR_SHDW="ThreeDShadow"; HxG_5.prototype.CLR_BLK="#000000"; HxG_5.prototype.CLR_WHT="#FFFFFF"; HxG_5.prototype.AMP_ABBS=[["times","\u00D7"],["amp","&"],["nbsp","\u00A0"],["gt",">"],["lt","<"],["yen","\u00A5"],["copy","\u00A9"],["reg","\u00AE"],["para","\u00B6"],["pi","\u03C0"],["trade","\u2122"],["euro","\u20AC"]]; HxG_5.prototype.BIG_ZINDEX=10000; HxG_5.prototype._Z="0"; HxG_5.prototype._1="1"; HxG_5.prototype._2="2"; HxG_5.prototype.__1="-1"; HxG_5.prototype._C=","; HxG_5.prototype._U="_"; HxG_5.prototype._Y="-"; HxG_5.prototype._P="."; HxG_5.prototype._B=" "; HxG_5.prototype._E=""; HxG_5.prototype._X="X"; HxG_5.prototype._LB="#"; HxG_5.prototype._EQ="="; HxG_5.prototype._QM="?"; HxG_5.prototype._AMP="&"; HxG_5.prototype._EX="!"; HxG_5.prototype._TL="~"; HxG_5.prototype._SL="/"; HxG_5.prototype._SM=";"; HxG_5.prototype._CL=":"; HxG_5.prototype._VB="|"; HxG_5.prototype._SQT="'"; HxG_5.prototype._DQT='"'; HxG_5.prototype._LT="<"; HxG_5.prototype._GT=">"; HxG_5.prototype._PL="("; HxG_5.prototype._PR=")"; HxG_5.prototype._PCT="%"; HxG_5.prototype._UPC="^"; HxG_5.prototype._ON="on"; HxG_5.prototype._OFF="off"; HxG_5.prototype._FLS="false"; HxG_5.prototype._PX="px"; HxG_5.prototype._ZPX="0px"; HxG_5.prototype._1PX="1px"; HxG_5.prototype._2PX="2px"; HxG_5.prototype._HEX="0x"; HxG_5.prototype._ID="id"; HxG_5.prototype._NAM="name"; HxG_5.prototype._TRU="true"; HxG_5.prototype._HX="_hx_"; HxG_5.prototype._lOBJ= "object"; HxG_5.prototype._UND="undefined"; HxG_5.prototype._ALL="all"; HxG_5.prototype._NO="none"; HxG_5.prototype._HI="hidden"; HxG_5.prototype._VS="visible"; HxG_5.prototype._POS="position"; HxG_5.prototype._ABS="absolute"; HxG_5.prototype._REL="relative"; HxG_5.prototype._TRN="transparent"; HxG_5.prototype._DSB="disabled"; HxG_5.prototype._RDO="readonly"; HxG_5.prototype._SLD="solid"; HxG_5.prototype._OUT="outset"; HxG_5.prototype._INS="inset"; HxG_5.prototype._AUT="auto"; HxG_5.prototype._DFT="default"; HxG_5.prototype._IGN="ignore"; HxG_5.prototype._INL="inline"; HxG_5.prototype._INB="inline-block"; HxG_5.prototype._BLK="block"; HxG_5.prototype._MID="middle"; HxG_5.prototype._CTR="center"; HxG_5.prototype._LFT="left"; HxG_5.prototype._RGT="right"; HxG_5.prototype._TOP="top"; HxG_5.prototype._BOT="bottom"; HxG_5.prototype._COR="color"; HxG_5.prototype._BCOR= "background-color"; HxG_5.prototype._BRD="border"; HxG_5.prototype._BRCOR= "border-color"; HxG_5.prototype._BRSTY= "border-style"; HxG_5.prototype._BRWID= "border-width"; HxG_5.prototype._BRLWD= "border-left-width"; HxG_5.prototype._BRRWD= "border-right-width"; HxG_5.prototype._BRTWD= "border-top-width"; HxG_5.prototype._BRBWD= "border-bottom-width"; HxG_5.prototype._BRLCL= "border-left-color"; HxG_5.prototype._BRRCL= "border-right-color"; HxG_5.prototype._BRTCL= "border-top-color"; HxG_5.prototype._BRBCL= "border-bottom-color"; HxG_5.prototype._BRLSY= "border-left-style"; HxG_5.prototype._BRRSY= "border-right-style"; HxG_5.prototype._BRTSY= "border-top-style"; HxG_5.prototype._BRBSY= "border-bottom-style"; HxG_5.prototype._BIMG="background-image"; HxG_5.prototype._BPOS="background-position"; HxG_5.prototype._BREP="background-repeat"; HxG_5.prototype._NREP="no-repeat"; HxG_5.prototype._ZUF="-moz-user-focus"; HxG_5.prototype._WD="width"; HxG_5.prototype._HT="height"; HxG_5.prototype._ALT= "alt"; HxG_5.prototype._TTL= "title"; HxG_5.prototype._SRC= "src" HxG_5.prototype._TYP= "type"; HxG_5.prototype._XT="text"; HxG_5.prototype._VIS="visibility"; HxG_5.prototype._DSP="display"; HxG_5.prototype._OFW="overflow"; HxG_5.prototype._ZND="z-index"; HxG_5.prototype._FSZ="font-size"; HxG_5.prototype._MGNL= "margin-left"; HxG_5.prototype._MGNR= "margin-right"; HxG_5.prototype._MGNT= "margin-top"; HxG_5.prototype._MGNB= "margin-bottom"; HxG_5.prototype._PADL= "padding-left"; HxG_5.prototype._PADR= "padding-right"; HxG_5.prototype._PADT= "padding-top"; HxG_5.prototype._PADB= "padding-bottom"; HxG_5.prototype._TXA="text-align"; HxG_5.prototype._VXA="vertical-align"; HxG_5.prototype._CRS="cursor"; HxG_5.prototype._PTR="pointer"; HxG_5.prototype._URL="url("; HxG_5.prototype._URI="uri("; HxG_5.prototype._BODY= "#body"; HxG_5.prototype._DOC="#document"; HxG_5.prototype._WDW="#window"; HxG_5.prototype._RAD="radio"; HxG_5.prototype._CHK="checkbox"; HxG_5.prototype._FIL="file"; HxG_5.prototype._SBM="submit"; HxG_5.prototype._RES="reset"; HxG_5.prototype._PWD="password"; HxG_5.prototype._TBTN= "button"; HxG_5.prototype._lIMG= "image"; HxG_5.prototype._lINP= "input"; HxG_5.prototype._VL="value"; HxG_5.prototype._LTR="ltr"; HxG_5.prototype._RTL="rtl"; HxG_5.prototype._onKD= "onkeydown"; HxG_5.prototype._evKD= "keydown"; HxG_5.prototype._onKU= "onkeyup"; HxG_5.prototype._evKU= "keyup"; HxG_5.prototype._onKP= "onkeypress"; HxG_5.prototype._evKP= "keypress"; HxG_5.prototype._onMC= "onclick"; HxG_5.prototype._evMC= "click"; HxG_5.prototype._onMCC="ondblclick"; HxG_5.prototype._evMCC="dblclick"; HxG_5.prototype._onMU= "onmouseup"; HxG_5.prototype._evMU= "mouseup"; HxG_5.prototype._onMD= "onmousedown"; HxG_5.prototype._evMD= "mousedown"; HxG_5.prototype._onMM= "onmousemove"; HxG_5.prototype._evMM= "mousemove"; HxG_5.prototype._onMV= "onmouseover"; HxG_5.prototype._evMV= "mouseover"; HxG_5.prototype._onMO= "onmouseout"; HxG_5.prototype._evMO= "mouseout"; HxG_5.prototype._onIN= "oninput"; HxG_5.prototype._onMS= "onmouse"; HxG_5.prototype._onPK= "onpoke"; HxG_5.prototype._onPC= "onpropertychange"; HxG_5.prototype._onDOMPC="DOMAttrModified"; HxG_5.prototype._onDOMVPC= "DOMCharacterDataModified"; HxG_5.prototype._onR="onresize"; HxG_5.prototype._evR="resize"; HxG_5.prototype._onF="onfocus"; HxG_5.prototype._evF="focus"; HxG_5.prototype._onB="onblur"; HxG_5.prototype._evB="blur"; HxG_5.prototype._onL="onload"; HxG_5.prototype._onUL= "onunload"; HxG_5.prototype._onC="onchange"; HxG_5.prototype._onSC= "onscroll"; HxG_5.prototype._evSC= "scroll"; HxG_5.prototype._onCM= "oncontextmenu"; HxG_5.prototype._evCM= "contextmenu"; HxG_5.prototype._onCP="oncopy"; HxG_5.prototype._evCP="copy"; HxG_5.prototype._onCT="oncut"; HxG_5.prototype._evCT="cut"; HxG_5.prototype._onPST= "onpaste"; HxG_5.prototype._evPST= "paste"; HxG_5.prototype._SECTIONHEADERANCHOR_OPENED_ID="_SECTIONHEADER_OPENED"; HxG_5.prototype._SECTIONHEADERANCHOR_CLOSED_ID="_SECTIONHEADER_CLOSED"; HxG_5.prototype._SECTIONHEADER_OPENED_ID="_TITLE_OPENED"; HxG_5.prototype._SECTIONHEADER_CLOSED_ID="_TITLE_CLOSED"; HxG_5.prototype._SECTIONHEADER_TITLE="_TITLE"; HxG_5.prototype.CAL_extra_id_for_input="_INPUT"; HxG_5.prototype.DLG_CANCEL="CANCEL"; HxG_5.prototype.DLG_OK="OK"; HxG_5.prototype.DLG_modal="modal"; HxG_5.prototype.DLG_modeless="modeless"; HxG_5.prototype.DLG_ContentAreaSuffix= "_ca"; HxG_5.prototype.DLG_TitleBarSuffix="_tb"; HxG_5.prototype.DLG_CloseButtonSuffix= "_cb"; HxG_5.prototype.DLG_CloseButtonImgSuffix= "_cbi"; HxG_5.prototype.DLG_IFrameSuffix="_if"; HxG_5.prototype.IMG_NORMAL=0; HxG_5.prototype.IMG_MOUSED=1; HxG_5.prototype.IMG_DEPRESSED=2; HxG_5.prototype.IMG_DISABLED=3; if (document && document.createElement && ((document.createElement("button")).tagName == "button")) { HxG_5.prototype.tagCase=function (s) {return s.toLowerCase();} } else { HxG_5.prototype.tagCase=function (s) {return s.toUpperCase();} } HxG_5.prototype._BBODY=HxG_5.prototype.tagCase("body"); HxG_5.prototype._DDOC=HxG_5.prototype.tagCase("document"); HxG_5.prototype._TAB=HxG_5.prototype.tagCase("table"); HxG_5.prototype._TBDY=HxG_5.prototype.tagCase("tbody"); HxG_5.prototype._THED=HxG_5.prototype.tagCase("thead"); HxG_5.prototype._TD=HxG_5.prototype.tagCase("td"); HxG_5.prototype._TR=HxG_5.prototype.tagCase("tr"); HxG_5.prototype._DIV=HxG_5.prototype.tagCase("div"); HxG_5.prototype._INP=HxG_5.prototype.tagCase("input"); HxG_5.prototype._TXT=HxG_5.prototype.tagCase("textarea"); HxG_5.prototype._BTN=HxG_5.prototype.tagCase("button"); HxG_5.prototype._IMG=HxG_5.prototype.tagCase("img"); HxG_5.prototype._SEL=HxG_5.prototype.tagCase("select"); HxG_5.prototype._OPT=HxG_5.prototype.tagCase("option"); HxG_5.prototype._SPN=HxG_5.prototype.tagCase("span"); HxG_5.prototype._FRM=HxG_5.prototype.tagCase("form"); HxG_5.prototype._ANC=HxG_5.prototype.tagCase("a"); HxG_5.prototype._EMB=HxG_5.prototype.tagCase("embed"); HxG_5.prototype._OBJ=HxG_5.prototype.tagCase("object"); HxG_5.prototype._APP=HxG_5.prototype.tagCase("applet"); HxG_5.prototype._BR=HxG_5.prototype.tagCase("br"); HxG_5.prototype._HR=HxG_5.prototype.tagCase("hr"); HxG_5.prototype._IFRM=HxG_5.prototype.tagCase("iframe"); HxG_5.prototype._LAB=HxG_5.prototype.tagCase("label"); HxG_5.prototype._SCR=HxG_5.prototype.tagCase("script"); HxG_5.prototype._HEAD=HxG_5.prototype.tagCase("head"); HxG_5.prototype._HHTML=HxG_5.prototype.tagCase("html"); HxG_5.prototype.INTERR_Dispatcher="Internal Error: Cannot dispatch user function."; HxG_5.prototype.INTERR_Constraint="Internal error: Cannot consruct constraint."; HxG_5.prototype.INTERR_Bad_Family="Internal error: Invalid stylesheet family."; HxG_5.prototype.INTERR_Parse_Literal= "Parse error: Failed parsing a strict literal: "; HxG_5.prototype.INTERR_Parse_TwoDig="Parse error: Failed parsing number digits: "; HxG_5.prototype.INTERR_Parse_end="Parse error: Failing at end of parse: "; HxG_5.prototype.INTERR_Format_Symbol="Bad format: Unexpected number symbol."; HxG_5.prototype.INTERR_Format_ZSymbol="Bad format: Unexpected 0 symbol."; HxG_5.prototype.INTERR_Format_LSymbol="Bad format: Unexpected # symbol."; HxG_5.prototype.INTERR_Format_Group="Bad format: Bad grouping character: "; HxG_5.prototype.INTERR_Format_Decimal="Bad format: Multiple decimal points."; HxG_5.prototype.INTERR_Format_Exponent="Bad format: Bad exponent marker."; HxG_5.prototype.INTERR_Format_Padding="Bad format: Incorrect use of padding marker."; HxG_5.prototype.INTERR_Format_Percent="Bad format: Cannot have percent and mille."; HxG_5.prototype.INTERR_Empty_Palette="Bad definition: Palette content is empty."; HxG_5.prototype.INTERR_bc_timeout="Page reload error: unable to retrieve additional data (request timed out)."; HxG_5.prototype.INTERR_bc_baddata="Page reload error: illformed data sent from server."; HxG_5.prototype.INTERR_bc_badpanel="Page reload error: request not issued against a panel."; HxG_5.prototype.INTERR_invalid_param="Required parameter '{0}' is null or 'undefined'"; HxG_5.prototype.INTERR_invalid_param_type="Type of parameter '{0}' is invalid"; HxG_5.prototype.INTERR_xmldata_not_element="XMLData object must represent node of type 'element'"; HxG_5.prototype.INTERR_invalid_index="Index out of bounds"; HxG_5.prototype.INTERR_xml_str_type="XMLData must only contain objects representing nodes of type 'element', 'comment', 'attribute' or 'text'"; HxG_5.prototype.STR_percent_char="%"; HxG_5.prototype.STR_mille_char="\u2030"; HxG_5.prototype.STR_icurrency_char="\u00A4"; HxG_5.prototype.HxICol=function () { } HxG_5.prototype.HxICol.prototype.CSStoRGB=function (c) { var i, x, r=0, g=0, b=0; if (c.charAt(0)==hX_5._LB) { r=parseInt(hX_5._HEX+c.substr(1,2)); g=parseInt(hX_5._HEX+c.substr(3,2)); b=parseInt(hX_5._HEX+c.substr(5,2)); } else if (c.substr(0,3).toLowerCase()=="rgb") { x=hX_5.replaceAll(hX_5.replaceAll(c.substr(3),"(",hX_5._E),")",hX_5._E); i=x.indexOf(","); r=parseInt(x.substr(0,i),10); x=x.substr(i+1); i=x.indexOf(","); g=parseInt(x.substr(0,i),10); b=parseInt(x.substr(i+1),10); } else return null; return {R:r, G:g, B:b}; } HxG_5.prototype.HxICol.prototype.isDark=function (c) { var cR=this.CSStoRGB(c); return ((cR==null)?false:((cR.R+cR.G+cR.B)<=400)); } HxG_5.prototype.HxICal=function () { this.bIsGregorian=false; this.bIsHebrew=false; this.bIsHijiri=false; this.hebrewAccumulatedMonthsPerCycle=[0,12,24,37,49,61,74,86,99,111,123,136,148,160,173,185,197,210,222]; this.hijiriAccumulatedDaysPerCycle=[0,354,709,1063,1417,1772,2126,2481,2835,3189,3544,3898,4252,4607,4961,5316,5670,6024,6379,6733,7087,7442,7796,8150,8505,8859,9214,9568,9922,10277]; } HxG_5.prototype.HxICal.prototype.setCalendar=function (bIsGreg, bIsHb, bIsHj) { this.bIsHebrew=bIsHb; this.bIsHijiri=bIsHj; this.bIsGregorian=(!this.bIsHebrew && !this.bIsHijiri); } HxG_5.prototype.HxICal.prototype.daysInYear=function (cyr) { if (this.bIsGregorian) return ((cyr==null||this.isLeapYear(cyr))?366:365); else if (this.bIsHijiri) return ((cyr==null||this.isLeapYear(cyr))?355:354); else return (hX_5.cal.calcRoshHaShannah(cyr+1)-hX_5.cal.calcRoshHaShannah(cyr)); } HxG_5.prototype.HxICal.prototype.monthsInYear=function (cyr) { return ((!this.bIsHebrew)?12:(cyr==null||this.isLeapYear(cyr)?13:12)); } HxG_5.prototype.HxICal.prototype.maxDaysInMonth=function () { return ((this.bIsGregorian)?31:30); } HxG_5.prototype.HxICal.prototype.minDaysInMonth=function () { return ((this.bIsGregorian)?28:29); } HxG_5.prototype.HxICal.prototype.daysInMonth=function (cm,cyr) { if (this.bIsGregorian) return ((cm>11)?99:((1==cm)?(this.isLeapYear(cyr)?29:28):((cm==3||cm==5||cm==8||cm==10)?30:31))); if (this.bIsHijiri) return ((cm>11)?99:((11==cm)?(this.isLeapYear(cyr)?30:29):((cm%2==1)?29:30))); else { var dYr, l=this.isLeapYear(cyr), r=(cm%2==1)?29:30; if (cm>11) r=(!l)?99:((cm>12)?99:29); else if (cm>10) r=(l)?30:29; else if (cm==7 || cm==8) { dYr=this.daysInYear(cyr); r+=(((cm==7) && (dYr==355 || dYr==385))?1:0); r -= (((cm==8) && (dYr==353 || dYr==383))?1:0); } return r; } } HxG_5.prototype.HxICal.prototype.dateToCalendar=function (dt) { var l,mx,yD,y,m,d; if (this.bIsGregorian) { y=dt.getAdjYear(); m=dt.getMonth(); d=dt.getDate(); } else if (this.bIsHijiri) { yD=this.gregorianToJulian(dt)-1948440; if (yD < 0) return {year:1, month:0, date:1}; y=Math.floor(yD/10631); y=(y*30)+1; l=yD%10631; mx=this.daysInYear(y); while (l>=mx) { y++; l-=mx; mx=this.daysInYear(y); } m=0; d=l; mx=this.daysInMonth(m,y); while (d>=mx) { m++; d-=mx; mx=this.daysInMonth(m,y); } d++; } else { yD=this.gregorianToJulian(dt); if (yD < 347997) return {year:1, month:6, date:1}; y=dt.getFullYear()+3761; m=6; d=1; l=this.calendarToJulian(y,m,d); while (yD < l && l >= 0) { y--; l=this.calendarToJulian(y,m,d); } yD=yD-l; mx=this.daysInYear(y); while (yD>=mx) { y++; yD-=mx; mx=this.daysInYear(y); } m=6; mx=this.daysInMonth(m,y); while (yD>=mx) { m++; yD-=mx; m=(m>=this.monthsInYear(y))?0:m; mx=this.daysInMonth(m,y); } d=yD+1; } return {year:y, month:m, date:d}; } HxG_5.prototype.HxICal.prototype.calendarToDate=function (y,m,d,h,mn,s,mls) { var o,r; if (this.bIsGregorian) o=this.calendarToDatePc(((y<0)?y+1:y),m,d); else o=this.calendarToDatePc(y,m,d); r=new Date(o.year, o.month, o.date, h, mn, s); r.setFullYear(o.year); r.setMonth(o.month); r.setDate(o.date); if (mls && mls>0) r.setMilliseconds(mls); return r; } HxG_5.prototype.HxICal.prototype.calendarToDatePc=function (y,m,d) { if (this.bIsGregorian) return {year:y, month:m, date:d}; return this.julianToDatePc(this.calendarToJulian(y,m,d)); } HxG_5.prototype.HxICal.prototype.calendarToJulian=function (y,m,d) { var jD,j,mX; if (this.bIsGregorian) jD=this.gregorianToJulian(y,m,d); else if (this.bIsHijiri) { if (y < 0) return 0; jD=Math.floor((y-1)/30)*10631; jD+=this.hijiriAccumulatedDaysPerCycle[(y-1)%30]; for (j=0; j=6)?m:(this.monthsInYear(y)); for (j=6; j 2299160) { y=Math.floor(((jd-1867216)-0.25)/36524.25); x=jd + y + 1 - Math.floor(0.25*y); } else x=jd; y=x + 1524.0; z=Math.floor(6680.0 + ((y-2439870.0)-122.1)/365.25); i=Math.floor(z*365.25); j=Math.floor((y-i)/30.6001); d=Math.floor(y-i-Math.floor(j*30.6001)); m=Math.floor(j-1.0); if (m > 12) m -= 12; y=Math.floor(z-4715.0); if (m > 2) y--; return {year:y, month:m-1, date:d}; } HxG_5.prototype.HxICal.prototype.gregorianToJulian=function(dt, iM, iD) { var g=(15+31*(10+12*1582)), jd, xy, xm, x, y, m, d; if (typeof(dt)=="object") {y=dt.getFullYear(); m=dt.getMonth()+1; d=dt.getDate();} else {y=dt;(y<0)?y++:y;m=iM+1;d=iD;} if (y <= -4713) return 0; if (y==1582 && m==10 && d>4 && d<15) d=4; if (m > 2) { xy=y; xm=m + 1; } else { xy=y - 1; xm=m + 13; } jd=Math.floor(Math.floor(365.25*xy) + Math.floor(30.6001*xm) + d + 1720995); if ((d+31*(m+12*y)) >= g) { x=Math.floor(0.01*xy); jd+=(2 - x + Math.floor(0.25*x)); } return jd; } HxG_5.prototype.HxICal.prototype.isLeapYear=function (cyr) { var y=(cyr<0)?cyr+1:cyr; if (this.bIsGregorian) return (((0==y%4) && (y<1582 || 0!=(y%100))) || (0==y%400)); else return (this.isLunarLeap(y%((this.bIsHijiri)?30:19))); } HxG_5.prototype.HxICal.prototype.nearestLeapYear=function (cyr) { var y, yc; if (this.bIsGregorian) { y=(cyr<0)?cyr++:cyr; y=Math.floor(y/4)*4; y=((y<1582) || (0!=y%100) || (0==y%400))?y:(y+4); return ((y==0)?((cyr<0)?-4:4):y); } else if (this.bIsHijiri) { y=cyr; yc=y%30; while (!this.isLunarLeap(yc)) { y++;yc++; } return y; } else { y=cyr; yc=y%19; while (!this.isLunarLeap(yc)) { y++;yc++; } return y; } } HxG_5.prototype.HxICal.prototype.isLunarLeap=function (c) { if (this.bIsHijiri) return (c==2 || c==5 || c==7 || c==10 || c==13 || c==15 || c==18 || c==21 || c==24 || c==26 || c==29); return (c==0 || c==3 || c==6 || c==8 || c==11 || c==14 || c==17); } HxG_5.prototype.HxICal.prototype.getDay=function (dt) { return (Math.abs((this.gregorianToJulian(dt)+1)%7)); } HxG_5.prototype.HxICal.prototype.getJulianDay=function (dt) { var i, d1, d2, m=dt.getMonth(), d=dt.getDate(), y=dt.getAdjYear(); if (this.bIsGregorian) { d1=this.gregorianToJulian(y,0,1); d2=this.gregorianToJulian(y,m,d); } else { var o=this.dateToCalendar(dt); d1=this.calendarToJulian(o.year, 0, 1); d2=this.calendarToJulian(o.year, o.month, o.date); } return (d2-d1+1); } HxG_5.prototype.HxICal.prototype.getDayOfWeekInMonth=function (dt) { var j=0, d=(this.bIsGregorian)?(dt.getDate()):((this.dateToCalendar(dt)).date); var k=Math.floor((d-1)/7)+1; while (d > 0) {j++; d -= 7;} return (j); } HxG_5.prototype.HxICal.prototype.getJulianWeek=function (dt, FDOW) { var ofd, off, fd, fdw=(FDOW!=null)?FDOW:0, o=this.dateToCalendar(dt), y=o.year, d=this.getJulianDay(dt)-1, yD=this.daysInYear(y)-1; if (d>=yD-6) { ofd=this.calendarToJulian(y+1,0,1), fd=(Math.abs((ofd+1)%7)) off=(fdw>fd)?((fd+7)-fdw):(fd-fdw); if (off > (yD-d)) return {yr:y+1, wk:1}; } ofd=this.calendarToJulian(y,0,1), fd=(Math.abs((ofd+1)%7)) off=(fdw>fd)?((fd+7)-fdw):(fd-fdw); d=d + off; if (d >= 0) return {yr:y, wk:(Math.floor(d/7)+1)}; else return {yr:-1, wk:-1}; } HxG_5.prototype.HxICal.prototype.getJulianWeekOfMonth=function (dt, FDOW) { var o=this.dateToCalendar(dt), ofd=this.calendarToJulian(o.year,o.month,1), fd=(Math.abs((ofd+1)%7)), f=(FDOW==0)?7:FDOW, d=o.date-1-(f-fd); return (Math.floor(d/7)+2); } HxG_5.prototype.HxICal.prototype.julianToMonthDay=function (cjd, cyr) { var m=0, d=cjd, dInM=this.daysInMonth(m,cyr); while (d > dInM) { d-=dInM; m++; dInM=this.daysInMonth(m,cyr); } return {month:m, date:d}; } HxG_5.prototype.HxICal.prototype.twoYearToFourYear=function (cyr, today, offset) { var y=cyr, o=this.dateToCalendar(today); y+=((Math.floor(o.year/100)*100)-100); if (y <= offset) y+=100; return y; } HxG_5.prototype.HxICal.prototype.adjustDate=function (dt, iYearInc, iMonthInc, iDayDif, iHourDif, iMinuteDif, iSecondDif) { var o, x, msDif=0, bResetTime=false, iOrigHour=dt.getHours(), iOrigMinute=dt.getMinutes(), iOrigSecond=dt.getSeconds(); if (!iHourDif && !iMinuteDif && !iSecondDif && iDayDif) { bResetTime=true; dt.setHours(dt.getTimezoneOffset < 0 ? 4 : 20); } if (iSecondDif) msDif+=iSecondDif * 1000; if (iMinuteDif) msDif+=iMinuteDif * 60000; if (iHourDif) msDif+=iHourDif * 3600000; if (iDayDif) msDif+=iDayDif * 86400000; if (msDif) dt.setTime(dt.getTime() + msDif); o=this.dateToCalendar(dt); if (iYearInc) o.year+=iYearInc; if (iMonthInc) o.month+=iMonthInc; x=this.monthsInYear(o.year); if (o.month >= x) { o.month=(o.month-x); o.year++; } else if (o.month < 0) { o.year--; x=this.monthsInYear(o.year); o.month=x+o.month; } x=this.daysInMonth(o.month, o.year); if (o.date > x) o.date=x; o=this.calendarToDatePc(o.year, o.month, o.date); dt.setFullYear(o.year); dt.setMonth(o.month); dt.setDate(o.date); dt.setFullYear(o.year); dt.setMonth(o.month); dt.setDate(o.date); if (bResetTime) { dt.setHours(iOrigHour); dt.setMinutes(iOrigMinute); dt.setSeconds(iOrigSecond); } return dt; } HxG_5.prototype.HxICal.prototype.calcRoshHaShannah=function (cyr) { var dow, lunarC=Math.floor((cyr-1)/19), y=Math.floor((cyr-1)%19), om=this.calcMoladOfLunarCycle(lunarC); om.moladHalakim+=765433 * this.hebrewAccumulatedMonthsPerCycle[y]; om.moladDay+=Math.floor(om.moladHalakim/25920); om.moladHalakim=om.moladHalakim%25920; dow=(om.moladDay%7); if /* Rule 2 */ ((om.moladHalakim >= 19440) || (!(y==2 || y==5 || y==7 || y==10 || y==13 || y==16 || y==18) && dow == 2 && om.moladHalakim >= 9924) || ((y==3 || y==6 || y==8 || y==11 || y==14 || y==17 || y==0) && dow==1 && om.moladHalakim >= 16789)) om.moladDay++; dow=(om.moladDay%7); if (dow == 3 || dow == 5 || dow == 0) om.moladDay++; return om.moladDay; } HxG_5.prototype.HxICal.prototype.calcMoladOfLunarCycle=function (lunarCycle) { var h=31524+(179876755*lunarCycle); return {moladDay:(Math.floor(h/25920)), moladHalakim:(h%25920)}; } Date.prototype.getAdjYear=function(dt) { var y=this.getFullYear(); return ((y<=0)?y-1:y); } Date.prototype.Hx4Clone=function(dt) { var r, y=this.getFullYear(); if (dt != null && dt >= 2) { r=new Date (this.getFullYear(), this.getMonth(), this.getDate(), this.getHours(), this.getMinutes(), this.getSeconds()); } else if (dt != null && dt == 1) r=new Date (this.getFullYear(), 0, 0, this.getHours(), this.getMinutes(), this.getSeconds()); else r=new Date (this.getFullYear(), this.getMonth(), this.getDate(), 12, 0, 0); r.setFullYear(y); return (r); } Date.prototype.Hx4CompareDate=function(oDate, bCompareTime) { var iDiff=this.getFullYear() - oDate.getFullYear(); if (iDiff==0) iDiff=this.getMonth() - oDate.getMonth(); if (iDiff==0) iDiff=this.getDate() - oDate.getDate(); if (bCompareTime && iDiff==0) { iDiff=this.getHours() - oDate.getHours(); if (iDiff==0) iDiff=this.getMinutes() - oDate.getMinutes(); if (iDiff==0) iDiff=this.getSeconds() - oDate.getSeconds(); } if (iDiff < 0) iDiff=-1; else if (iDiff > 0) iDiff=1; return iDiff; } HxG_5.prototype.addComponent=function(id, obj) { if (id && obj && this.brw.isW3C()) { var DOMobj=this.getElementById(id); if (DOMobj!=null && (this.Components[id]==undefined || this.Components[id]==null)) { this.Components[id]=obj; obj.id=id; obj.DOMobj=DOMobj; obj.HTMLrendered=false; obj.p=this; obj.r=hX_5.currentResource(); this.loadComponent(obj); return true; } } return false; } HxG_5.prototype.add=HxG_5.prototype.addComponent; HxG_5.prototype.removeComponent=function(obj) { if (obj && obj.DOMobj && obj.DOMobj.id && this.brw.isW3C()) { hX_5.removeAllEvents(obj.DOMobj, obj.DOMobj.id); hX_5.i.removeMonitor(obj.DOMobj); hX_5.i.removeResizeMonitor(obj.DOMobj); if (obj.destroy) obj.destroy(); this.Components[obj.DOMobj.id]=null; delete obj; } return true; } HxG_5.prototype.addSubComponent=function (parentId, iChildId, iObj, iPosition) { if (parentId && this.brw.isW3C()) { var theParent=this.getComponentById (parentId); theParent=(theParent == null) ? this.getSubComponentById (parentId) : theParent; if (theParent) { if (hX_5.isString(iChildId)) { if (iChildId && iObj) { this.SubComponents[iChildId]=iObj; iObj.id=iChildId; iObj.p=theParent; theParent.addSubComponent (iObj, iPosition); } } else if (iChildId.length) { var a=iChildId, childId, i; for (i=0; i10000) this.topicUnq=99; if (c!=null || hX_5.isFunction(handler)) if(!hX_5.Topics[eventName]) hX_5.Topics[eventName]=[[this.topicUnq,handler]]; else hX_5.Topics[eventName].push([this.topicUnq,handler]); return this.topicUnq; } else return null; } HxG_5.prototype.unsubscribe=function(id) { var varobj, i, done=false; for (varobj in this.Topics) { for (i=0; i< hX_5.Topics[varobj].length; i++) { if (hX_5.Topics[varobj][i][0]==id) { delete (hX_5.Topics[varobj][i]); hX_5.Topics[varobj][i]=null; done=true; break; } } if (done) { for (i=hX_5.Topics[varobj].length-1; i>0; i--) { if (hX_5.Topics[varobj][i]==null) hX_5.Topics[varobj].pop(); else break; } break; } } } HxG_5.prototype.broadcast=function(eventName, param) { if (hX_5.Topics[eventName]) { for (var i=0; i< hX_5.Topics[eventName].length; i++) { if (hX_5.Topics[eventName][i]!=null && hX_5.Topics[eventName][i][1]) hX_5.Topics[eventName][i][1](param); } if (eventName=="redraw") hX_5.redraw(param, true); } } HxG_5.prototype.redraw=function (param, noloop) { var varobj,i; for (varobj in this.Components) { if (this.Components[varobj] && this.Components[varobj].uirelease) this.Components[varobj].uirelease(); if (this.Components[varobj] && this.Components[varobj].redraw) this.Components[varobj].redraw(null, param); } for (varobj in this.Popups) if (this.Popups[varobj] && this.Popups[varobj].uirelease) this.Popups[varobj].uirelease(); if (!noloop && hX_5.Topics.length>0 && hX_5.Topics["redraw"]) { varobj=hX_5.Topics["redraw"]; for (var i=0; i< varobj.length; i++) if (varobj[i]!=null && varobj[i][1]) varobj[i][1](param); } if (hX_5.tabNav != null) { delete (hX_5.tabNav); hX_5.tabNav=null; } hX_5.CSSSelectors=null; if (!(this.isUnDef(typeof hX_1)) && (hX_1 != null) && (hX_1.redraw)) hX_1.redraw(); if (!(this.isUnDef(typeof hX_2)) && (hX_2 != null) && (hX_2.redraw)) hX_2.redraw(); if (!(this.isUnDef(typeof hX_3)) && (hX_3 != null) && (hX_3.redraw)) hX_3.redraw(); if (!(this.isUnDef(typeof hX_4)) && (hX_4 != null) && (hX_4.redraw)) hX_4.redraw(); return true; } HxG_5.prototype.uirelease=function (freeOnly) { this.popMgr.end(); this.mouser.killMouse(); if (hX_5.pendingPrompt != null) hX_5.pendingPrompt.uirelease(); if (freeOnly == null) { var o=this.uistate.getActiveComponent(); if (o) o.uirelease(); this.uistate.setActiveComponent (hX_5._E); } this.i.killAllTimers(); if (freeOnly == null) { for (varobj in this.Components) if (this.Components[varobj] && this.Components[varobj].uirelease) this.Components[varobj].uirelease(); } for (varobj in this.Popups) if (this.Popups[varobj] && this.Popups[varobj].uirelease) this.Popups[varobj].uirelease(); if (freeOnly == null) { if (!(this.isUnDef(typeof hX_1)) && (hX_1 != null) && (hX_1.uirelease)) hX_1.uirelease(); if (!(this.isUnDef(typeof hX_2)) && (hX_2 != null) && (hX_2.uirelease)) hX_2.uirelease() if (!(this.isUnDef(typeof hX_3)) && (hX_3 != null) && (hX_3.uirelease)) hX_3.uirelease() if (!(this.isUnDef(typeof hX_4)) && (hX_4 != null) && (hX_4.uirelease)) hX_4.uirelease() } return true; } HxG_5.prototype.getComponentById=function(obj) { return (obj != null && this.isString(obj)) ? ((this.Components[obj]==undefined)?null:this.Components[obj]) : obj; } HxG_5.prototype.getComponentsInId=function(inobj, a) { var c, obj=hX_5.getElementById(inobj), r=((a)?a:null); if (obj) { if (obj.id!=undefined && obj.id != null && obj.id.length > 0) { c=hX_5.getComponentById(obj.id); if (c) { if (r==null) r=[]; r.push(c.id); } } for (obj=obj.firstChild; obj != null; obj=obj.nextSibling) r=hX_5.getComponentsInId(obj, r); } return r; } HxG_5.prototype.getParentComponentOfId=function(inobj, type) { var c, t=type.toLowerCase(), obj=hX_5.getElementById(inobj); while (t && obj!=null) { if (obj.id!=undefined && obj.id != null && obj.id.length > 0) { c=hX_5.getComponentById(obj.id); if (c && c.type==t) return obj.id; } obj=obj.parentNode; } return null; } HxG_5.prototype.getSubComponentById=function(obj) { return (obj != null && this.isString(obj)) ? ((this.SubComponents[obj]==undefined)?null:this.SubComponents[obj]) : obj; } HxG_5.prototype.getSubComponentsInId=function(obj) { var v,x,p=hX_5.getComponentById(obj); p=(p==null)?hX_5.getSubComponentById(obj):p; if (p && p.id!=undefined) { var r=[]; for (v in hX_5.SubComponents) { x=hX_5.SubComponents[v]; if (x && x.p!=undefined && x.p.id!=undefined && x.p.id==p.id) { r.push(x.id); } } return ((r.length>0)?r:null); } return null; } HxG_5.prototype.getParentComponentById=function(obj) { return (obj != null && this.isString(obj)) ? ((this.SubComponents[obj].p==undefined)?null:this.SubComponents[obj].p) : obj; } HxG_5.prototype.getConverterById=function(obj) { return (obj != null && this.isString(obj)) ? ((this.Converters[obj]==undefined)?null:this.Converters[obj]) : obj; } HxG_5.prototype.getValidatorById=function(obj) { return (obj != null && this.isString(obj)) ? ((this.Validators[obj]==undefined)?null:this.Validators[obj]) : obj; } HxG_5.prototype.getBehaviorById=function(obj, behaviorname, eventname) { if (obj != null && this.isString(obj)) { var e=this.getBehaviorEvent(behaviorname, eventname),i=e.indexOf(hX_5._ON), thisid=obj + hX_5._HX + behaviorname + hX_5._U + ((i==0)?e.substr(2):e); return ((hX_5.Behaviors[thisid]==undefined)?null:hX_5.Behaviors[thisid]); } return (obj); } HxG_5.prototype.getBehaviorEvent=function(bname, ename) { return (ename); } HxG_5.prototype.getBehaviorsById=function(obj) { var behavior, r=[], o=(obj==null)?null:(this.isString(obj)?obj: ((obj.id!=undefined)?obj.id:null)); if (o!=null) for (behavior in hX_5.Behaviors) { if (hX_5.Behaviors[behavior] && hX_5.Behaviors[behavior].id==o) r.push(hX_5.Behaviors[behavior]); } return (r); } HxG_5.prototype.getPopupById=function(obj) { return (obj != null && this.isString(obj)) ? ((this.Popups[obj]==undefined)?null:this.Popups[obj]) : obj; } HxG_5.prototype.getElementById=function(obj) { var theObj=obj; if (obj != null && this.isString(obj)) { if (window.document.getElementById != null) theObj=window.document.getElementById(obj); else if (window.document.all != null) theObj=window.document.all(obj); } return theObj; } HxG_5.prototype.setPortalEncoding=function() { hX_5.isPortal=true; } HxG_5.prototype.attachComponentEvent=function (objid, eventname, position) { hX_5.attachEvent (objid, eventname, position, hX_5.i.dispatchComponent); } HxG_5.prototype.attachBehaviorEvent=function (objid, behaviorname, eventname, position, alias) { if (alias) hX_5.attachEvent(objid, eventname, position, "hX_5.i.dispatchBehavior(this, event, '" + behaviorname + "', '" + alias + "')"); else hX_5.attachEvent(objid, eventname, position, "hX_5.i.dispatchBehavior(this, event, '" + behaviorname + "')"); } HxG_5.prototype.attachInputStateEvent=function (objid, eventname) { hX_5.attachEvent(objid, eventname, hX_5._lF, hX_5.i.dispatchInputState); } HxG_5.prototype.attachEvent=function (objid, eventname, position, handler, handler1, args, MozDown) { if (objid && eventname && handler) { var rValue=null, obj=this.getElementById(objid); var mozD=(document.addEventListener!=undefined && (MozDown || eventname==hX_5._onPC)); if (obj) { var srcid=this.i.dispatchToID(obj), userObj=hX_5.lookupEvent (hX_5._uR, srcid, eventname), skip=false; if (userObj == null) userObj=hX_5.addNewEvent (srcid, obj, eventname, hX_5._uR, handler1, args, mozD); if (mozD) { skip=userObj.chkEvtL (MozDown, handler); rValue=userObj.addEvtL (MozDown, handler); } else if (position == hX_5._lF || position == "first") rValue=userObj.addPre (hX_5._lF, handler); else if (position == hX_5._lP || position == "previous")rValue=userObj.addPre (hX_5._lL, handler); else if (position == hX_5._lN || position == "next") rValue=userObj.addPost (hX_5._lF, handler); else rValue=userObj.addPost (hX_5._lL, handler); userObj.tgtObj=(srcid == hX_5._WDW)? window:((srcid == hX_5._BODY) ? document.body : obj); if (this.brw.isIE()) userObj.tgtObj.setAttribute(eventname, hX_5.runEvent); else { if (userObj.tgtObj!=window) userObj.tgtObj.setAttribute(eventname, "return(hX_5.runEvent(this, event));"); if (!skip) { if (eventname == hX_5._onPC) { userObj.tgtObj.addEventListener((args && args.length && args[0]==hX_5._VL)?hX_5._onDOMVPC:hX_5._onDOMPC, hX_5.runEvent1, false); } else if (MozDown) { var eName=(eventname.indexOf(hX_5._ON) == 0) ? eventname.substr(2) : eventname; userObj.tgtObj.addEventListener(eName, hX_5.runEvent2, true); } } } return rValue; } } return null; } HxG_5.prototype.removeEvent=function (objid, eventname, which, destroy) { if (objid && eventname) { var obj=this.getElementById(objid); if (obj) { var srcid=this.i.dispatchToID(obj), userObj=hX_5.lookupEvent (hX_5._uR, srcid, eventname); if (userObj != null) { if (arguments.length > 2 && which!=null) { if (hX_5.isNumber(which)) userObj.remove(which); } else { userObj.remove(0, destroy); } return true; } } } return false; } HxG_5.prototype.HxBrowserMgr=function () { this.m_browserLevel=3; this.m_browserName='Netscape'; this.m_browserVersion='Unknown'; this.m_clientPlatform='Unknown'; this.m_JSVersion=1.0; this.m_hasStyleSheet=false; this.m_hasActiveX=true; this.m_hasIECacheBug=false; this.m_hasDOM=false; this.m_hasDOM1=false; this.m_hasDOM2=false; this.m_hasLayers=false; this.m_hasPersistentStore= false; this.m_hasInnerHTML=true; this.m_isIE=false; this.m_isNavigator=false; this.m_isFirefox=false; this.m_isOpera=false; this.m_isKonqueror=false; this.m_isMozilla=false; this.m_isW3C=false; this.m_isW3C_STD=false; this.m_isIE6_CSS=false; this.m_isIE_XP=false; this.m_isIXP=false; this.isBrowserLevel=function(neededBrowserLevel) { return (neededBrowserLevel < (this.m_browserLevel+1)); } this.getRealAppVersion=function() { return this.m_realAppVersion; } this.hasIEZindexLimitation=function() { return (this.m_isIE && this.m_realAppVersion < 5.5); } this.getJSVersion=function() { return this.m_JSVersion; } this.hasActiveX=function() { return this.m_hasActiveX; } this.hasIECacheBug=function() { return this.m_hasIECacheBug; } this.hasStyleSheet=function() { return this.m_hasStyleSheet; } this.hasDOM=function() { this.m_isIE && this.isBrowserLevel(4); } this.hasDOM1=function() { return this.m_hasDOM1; } this.hasDOM2=function() { return this.m_hasDOM2; } this.hasInnerHTML=function() { return this.m_hasInnerHTML; } this.isIE=function() { return this.m_isIE; } this.isNetscape=function() { return this.m_isNavigator; } this.isFirefox=function() { return this.m_isFirefox; } this.isOpera=function() { return this.m_isOpera; } this.isKonqueror=function() { return this.m_isKonqueror; } this.isMozilla=function() { return this.m_isMozilla; } this.isNavOrMoz=function() { return (this.m_isMozilla || this.m_isNavigator); } this.isNetscape4=function() { return (this.m_isNavigator && this.m_realAppVersion >= 4.0); } this.hasLayers=function() { return this.m_hasLayers; } this.isIE5=function() { return (this.m_isIE && this.m_realAppVersion >= 5.0); } this.isIE5_5=function() { return (this.m_isIE && this.m_realAppVersion >= 5.5); } this.isIE6_CSS=function() { return (this.m_isIE6_CSS); } this.isW3C=function() { return (this.m_isW3C); } this.isW3Cstd=function() { return (this.m_isW3C_STD); } this.isPlatformMac=function() { return ((this.m_clientPlatform.indexOf("Mac") != -1) ? true : false); } this.isPlatformWin=function() { return ((this.m_clientPlatform.indexOf("Win") != -1) ? true : false); } this.isPlatformIEWinXP=function() { return (this.m_isIE_XP); } this.isPlatformWinXP=function() { return (this.m_isXP); } this.inited=false; } HxG_5.prototype.HxBrowserMgr.prototype.initClientBrowserObject=function (parent) { if (this.inited) return; this.p=parent; this.m_browserLevel=parseInt (navigator.appVersion.charAt(0), 10); if (navigator.appName!=undefined) this.m_browserName=navigator.appName; if (navigator.userAgent!=undefined) this.m_browserVersion=navigator.userAgent; if (navigator.platform!=undefined) this.m_clientPlatform=navigator.platform; this.m_isIE=(this.m_browserName == "Microsoft Internet Explorer"); this.m_isNavigator=(this.m_browserName == "Netscape"); this.m_isOpera=(this.m_browserName == "Opera"); this.m_isKonqueror=(this.m_browserName == "Konqueror"); this.m_isMozilla=(window.navigator != null) ? (window.navigator.userAgent.indexOf("ecko") != -1) : false; if (this.m_isMozilla) { this.m_isNavigator=false; this.m_isFirefox=(window.navigator != null) ? (window.navigator.userAgent.indexOf("irefox") != -1) : false; } this.m_realAppVersion=parseFloat(this.m_isIE ? navigator.appVersion.substr(navigator.appVersion.indexOf("MSIE") + 4) : navigator.appVersion); this.m_hasLayers=this.m_isNavigator && this.m_browserLevel >= 4 && this.m_browserLevel < 5; if(window.gCookie && gCookie.bs && gCookie.bs == hX_5._E) { this.m_isIE=true; this.m_isNavigator=false; this.m_browserLevel=5; this.m_realAppVersion=5.0; } if(window.gCookie && gCookie.bs && gCookie.bs == "_NN4") { this.m_isIE=false; this.m_isNavigator=true; this.m_browserLevel=4; this.m_realAppVersion=4.7; } this.m_hasIECacheBug=this.m_isIE; this.m_hasStyleSheet=this.isBrowserLevel(4); this.m_hasActiveX=this.m_isIE && (navigator.appVersion.indexOf("Win") != -1); this.m_hasPersistentStore=this.m_isIE && this.m_realAppVersion > 5 && this.isPlatformWin(); if (window.document.implementation != null) { this.m_hasDOM1=window.document.implementation.hasFeature("HTML","1.0"); this.m_hasDOM2=window.document.implementation.hasFeature("HTML","2.0") && window.document.implementation.hasFeature("Events","2.0") && window.document.implementation.hasFeature("Core","2.0") && window.document.implementation.hasFeature("CSS2","2.0"); } if (!this.isIE()) { var testIH=document.createElement("span"); if (testIH && testIH.innerHTML!=undefined) { try { testIH.innerHTML="foo"; this.m_hasInnerHTML=(testIH.innerHTML == "foo"); } catch (e) { this.m_hasInnerHTML=false; } } else this.m_hasInnerHTML=false; } if (this.isPlatformWin() && (navigator.appVersion!=undefined) && (navigator.userAgent!=undefined)) { var str=((this.m_isIE) ? navigator.appVersion : navigator.userAgent), ix=str.indexOf("Windows NT "); if (ix >= 0 && ix+11 < str.length) { str=str.substr(ix+11,3); if (str.length > 0) { var snum=new Number(str); this.m_isXP=(snum >= 5.1); this.m_isIE_XP=(this.m_isIE && this.m_isXP); } } } if (document.images) { this.m_isW3C=(document.body && document.body.style && document.getElementById) ? true : false; if (this.m_isW3C) { this.m_isW3C_STD=(this.isNavOrMoz()) ? true : ((document.compatMode && document.compatMode.indexOf("CSS1") >= 0) ? true : false); this.m_isIE6_CSS=(this.m_isIE && document.compatMode && document.compatMode.indexOf("CSS1") >= 0)? true : false; } } } HxG_5.prototype.HxGeometryMgr=function (thisparent) { this.p=thisparent; this.p.geo=this; } HxG_5.prototype.HxGeometryMgr.prototype.getAbsPosTop=function(obj) { var rValue=0, elem=this.p.getElementById(obj); if (hX_5.brw.isIE6_CSS()) { while (elem) { rValue+=elem.offsetTop; if (elem.tagName!=hX_5._BBODY && elem.tagName!=hX_5._HHTML) rValue -= elem.scrollTop; elem=elem.offsetParent; } } else if (elem.offsetParent) { while(elem.offsetParent) { rValue+=elem.offsetTop; if (hX_5.brw.isNavOrMoz) { if (elem.parentNode != elem.offsetParent && elem.parentNode.scrollTop!=0) rValue -= elem.parentNode.scrollTop; else rValue -= elem.scrollTop; } else rValue -= elem.scrollTop; elem=elem.offsetParent; } } else if (elem.y) rValue+=elem.y; return rValue; } HxG_5.prototype.HxGeometryMgr.prototype.getAbsPosLeft=function(obj) { var rValue=0, elem=this.p.getElementById(obj); if (hX_5.brw.isIE6_CSS()) { while (elem) { rValue+=elem.offsetLeft; if (elem.tagName!=hX_5._BBODY && elem.tagName!=hX_5._HHTML) rValue -= elem.scrollLeft; elem=elem.offsetParent; } } else if (elem.offsetParent) { while(elem.offsetParent) { rValue+=elem.offsetLeft; if (hX_5.brw.isNavOrMoz) { if (elem.parentNode != elem.offsetParent && elem.parentNode.scrollLeft!=0) rValue -= elem.parentNode.scrollLeft; else rValue -= elem.scrollLeft; } else { rValue -= elem.scrollLeft; } elem=elem.offsetParent; } } else if (elem.x) rValue+=elem.x; return rValue; } HxG_5.prototype.HxGeometryMgr.prototype.getRelPos=function(obj) { return ((obj.offsetParent)?obj.offsetParent:null); } HxG_5.prototype.HxGeometryMgr.prototype.getRelPosLeft=function(obj) { var elem=this.p.getElementById(obj); return (elem.offsetLeft); } HxG_5.prototype.HxGeometryMgr.prototype.getRelPosTop=function(obj) { var elem=this.p.getElementById(obj); return (elem.offsetTop); } HxG_5.prototype.HxGeometryMgr.prototype.getRendHeight=function (obj) { var elem=this.p.getElementById(obj); return parseInt(elem.offsetHeight, 10); } HxG_5.prototype.HxGeometryMgr.prototype.getRendWidth=function (obj) { var elem=this.p.getElementById(obj); return parseInt(elem.offsetWidth, 10); } HxG_5.prototype.HxGeometryMgr.prototype.parseBorder=function (obj, which, defwidth) { var width=defwidth, bname="border-" + which + "-style"; if ((this.getP(obj, bname)) == hX_5._NO) { width=0; } else { bname="border-" + which + "-width"; var value=this.getP(obj, bname); width=(value == hX_5._E) ? defwidth : ((value == "thin") ? 2 : ((value == "medium") ? 3 : ((value == "thick") ? 4 : hX_5.toPixels(obj,value)))); } return width; } HxG_5.prototype.HxGeometryMgr.prototype.testIEXPBorder=function (obj) { return ((hX_5.brw.isPlatformIEWinXP())?((hX_5.g.getP(obj, hX_5._BRSTY) == hX_5._NO && hX_5.g.getP(obj, hX_5._BRWID) == hX_5._2PX)):false); } HxG_5.prototype.HxGeometryMgr.prototype.testXPBorder=function (obj, style) { var rvalue=false; if (hX_5.brw.isPlatformWinXP()) { if (hX_5.brw.isIE()) { rvalue=(hX_5.g.getP(obj, hX_5._BRSTY) == hX_5._NO && hX_5.g.getP(obj, hX_5._BRWID) == hX_5._2PX); } else { var a=hX_5.g.getP(obj,hX_5._BRLSY), b=hX_5.g.getP(obj,hX_5._BRRSY), c=hX_5.g.getP(obj,hX_5._BRTSY), d=hX_5.g.getP(obj,hX_5._BRBSY); rvalue=(a==b && b==c && c==d && a==style); if (rvalue) { a=hX_5.g.getP(obj,hX_5._BRLWD); b=hX_5.g.getP(obj,hX_5._BRRWD); c=hX_5.g.getP(obj,hX_5._BRTWD); d=hX_5.g.getP(obj,hX_5._BRBWD); rvalue=(a==b && b==c && c==d && a==hX_5._2PX); } if (rvalue) { a=hX_5.g.getP(obj,hX_5._BRLCL); b=hX_5.g.getP(obj,hX_5._BRRCL); c=hX_5.g.getP(obj,hX_5._BRTCL); d=hX_5.g.getP(obj,hX_5._BRBCL); var e=hX_5.getEvalStyle(obj,hX_5._COR,hX_5.CLR_BTN); rvalue=(a==b && b==c && c==d && a==e); } } } return rvalue; } HxG_5.prototype.HxGeometryMgr.prototype.getWindowClientWidth=function () { if (window.innerWidth) return Math.min(window.innerWidth,document.body.clientWidth); else if (this.p.brw.isIE6_CSS()) return document.body.parentElement.clientWidth; else if (document.body && document.body.clientWidth) return document.body.clientWidth; return 0; } HxG_5.prototype.HxGeometryMgr.prototype.getWindowClientHeight=function () { if (window.innerHeight) return Math.min(window.innerHeight,document.body.clientHeight); else if (this.p.brw.isIE6_CSS()) return document.body.parentElement.clientHeight; else if (document.body && document.body.clientHeight) return document.body.clientHeight; return 0; } HxG_5.prototype.HxGeometryMgr.prototype.getP=function (obj, prop1, prop2) { var p, s, r=null, o=this.p.getElementById(obj); if (o) { if (o.currentStyle) { p=(prop2) ? prop2 : this.CSStagToDOMtag (prop1); r=o.currentStyle.getAttribute(p); } else if (window.getComputedStyle) { s=window.getComputedStyle(o, hX_5._E); r=s.getPropertyValue(prop1); } } return (r); } HxG_5.prototype.HxGeometryMgr.prototype.setP=function (obj, prop, newV) { var p, o=hX_5.getElementById(obj); if (o) { if (o.currentStyle) { p=this.CSStagToDOMtag(prop); if (o.style.getAttribute(p) != newV) o.style.setAttribute(p, newV); } else { if (o.style.getPropertyValue(prop) != newV) o.style.setProperty(prop, newV, hX_5._E); } } } HxG_5.prototype.HxGeometryMgr.prototype.copyP=function (src, dst, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) { var x, s, l=arguments.length; for (x=2; x= 0) { w=w.substring(0, q) + (w.substring(q+1, q+2)).toUpperCase() + w.substring(q+2); q=w.indexOf(hX_5._Y); } return w; } HxG_5.prototype.HxGeometryMgr.prototype.findContainer=function (obj, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9) { var i, p=obj; while (p && p.tagName && p.tagName.toLowerCase() != p0.toLowerCase()) p=(p.parentNode) ? p.parentNode : null; while (i <= arguments.length-2 && p && p.tagName && p.tagName.toLowerCase() == arguments[i].toLowerCase()) { p=(p.parentNode) ? p.parentNode : null; i++; } p=(p && p.tagName && p.tagName.toLowerCase() == arguments[arguments.length-1].toLowerCase()) ? p : null; return p; } HxG_5.prototype.HxGeometryMgr.prototype.isDisabled=function (obj) { var o=hX_5.getElementById(obj), p=o.parentNode, r=o.disabled; if (o.isDisabled!=undefined) r=o.isDisabled; else { while (!r && p!=null) { r=(p.disabled!=undefined)?p.disabled:false; p=p.parentNode; } } return r; } HxG_5.prototype.HxCache=function () { this.MAX_STR_DATE_MONTHS=[]; this.MAX_STR_DATE_SHMONTHS=[]; this.MAX_STR_DATE_DAYS=[]; this.MAX_STR_DATE_SHDAYS=[]; this.BIGNUM_converter=null; } HxG_5.prototype.HxCache.prototype.strInit=function() { if (this.MAX_STR_DATE_MONTHS.length==0) { var i,j,k; for (i=0;i<3;i++) { hX_5.c.MAX_STR_DATE_SHDAYS[i]=hX_5.c.MAX_STR_DATE_DAYS[i]=hX_5.c.MAX_STR_DATE_SHMONTHS[i]=hX_5.c.MAX_STR_DATE_MONTHS[i]=0; for (j=0;j= 0; i--) { if (sLocation.charAt(i) == sl) { bFoundProjectDir=true; break; } } if (bFoundProjectDir == true) { sPathPrefix=sLocation.substring(i, i + (iCursor - i) + 1 + 1); } } return sPathPrefix; } HxG_5.prototype.HxUIState=function () { this.activecomponent=null; this.activecomponentkind=""; } HxG_5.prototype.HxUIState.prototype.setActiveComponent=function(obj) { this.activecomponent=(obj) ? obj : ""; return true; } HxG_5.prototype.HxUIState.prototype.getActiveComponent=function(kind) { return (this.activecomponent && hX_5.isObject(this.activecomponent))?this.activecomponent:null; } HxG_5.prototype.JSFargument=function (s) { this.value=this.attribute=hX_5._E; if (s && (hX_5.isString(s))) { var q=s.indexOf(hX_5._CL); q=(q < 0) ? s.indexOf(hX_5._EQ) : q; if (q > 0) { this.attribute=s.substring(0,q); this.value=s.substring(q+1); } else { this.attribute=s; } this.attribute=hX_5.Trim(this.attribute); this.attribute=this.attribute.toLowerCase(); } } HxG_5.prototype.ARG_IS_TRUE=1; HxG_5.prototype.ARG_TO_NUM=2; HxG_5.prototype.ARG_TO_NAN=3; HxG_5.prototype.ARG_TO_FCN=4; HxG_5.prototype.ARG_TO_FCNS= 5; HxG_5.prototype.ARG_TO_NAS=6; HxG_5.prototype.ARG_IS_TRUEV=7; HxG_5.prototype.ARG_TO_BIGNUM=8; HxG_5.prototype.ARG_TO_NAU=9; HxG_5.prototype.ARG_TO_NAB=10; HxG_5.prototype.JSFargument.prototype.parseArg=function (thisp, type, arg1, arg2) { if (type != hX_5.ARG_TO_NAS) this.value=hX_5.Trim(this.value); if (type == hX_5.ARG_IS_TRUE) return (!(this.value == hX_5._FLS || this.value == hX_5._OFF || this.value == hX_5._Z)); else if (type == hX_5.ARG_IS_TRUEV) return ((this.value == hX_5._FLS || this.value == hX_5._OFF || this.value == hX_5._Z || this.value == hX_5._NO) ? hX_5._NO:hX_5._VS); else if (type == hX_5.ARG_TO_NUM || type == hX_5.ARG_TO_BIGNUM) { var num; if (hX_5.isString(this.value)) { if (type == hX_5.ARG_TO_NUM) num=new Number(this.value); else { if (hX_5.c.BIGNUM_converter == null) hX_5.c.BIGNUM_converter=new hX_5.NumberConverter(); num=hX_5.c.BIGNUM_converter.constantToValue(this.value); } } else num=this.value; num=Math.min(Math.max(arg1, num), arg2); return num; } else if (type == hX_5.ARG_TO_NAN || type == hX_5.ARG_TO_NAU ||type == hX_5.ARG_TO_NAS) return ((this.value.length <= 0)?null:((type==hX_5.ARG_TO_NAU) ? this.value.toUpperCase():this.value)); else if (type == hX_5._ARG_TO_NAB) return (this.value.length <= 0)?hX_5._E:this.value; else if (type == hX_5.ARG_TO_FCN) return eval(this.value); else if (type == hX_5.ARG_TO_FCNS) return (new Function ("event", this.value)); else return this.value; } HxG_5.prototype.parseArg=function (attributeTable, thisp, a) { var i, j, v, v1, arg, desc, b=(hX_5.isString(a)) ? [a] : a; for (i=0; i= 0) { desc=attributeTable[arg.attribute]; if (desc) { if (!(desc[2]) || (desc[2] && !thisp.HTMLrendered)) { v=(desc[1] == null) ? (arg.value) : (arg.parseArg(thisp, desc[1], desc[3], desc[4])); if (thisp[desc[0]]!=null && hX_5.isArray(thisp[desc[0]])) { while ((thisp[desc[0]]).length>0) (thisp[desc[0]]).pop(); j=(v==null) ? -1 : v.indexOf(hX_5._SM); while (j >= 0) { v1=v.substr(0,j); v=v.substr(j+1); (thisp[desc[0]]).push(v1); j=(v==null) ? -1 : v.indexOf(hX_5._SM); } (thisp[desc[0]]).push(v); } else thisp[desc[0]]=v; } } } } } HxG_5.prototype.getArg=function (attributeTable, thisp, arg) { var i, r=null; if (arg.length >= 0) { var argdesc=attributeTable[arg]; if (argdesc) r=thisp[argdesc[0]]; if (r!=null) { if (argdesc[1]==hX_5.ARG_TO_FCNS) { r=r+hX_5._E; i=r.indexOf("{"); r=r.substr(i+1); i=r.lastIndexOf("}"); r=r.substring(0,i-1); } else if (hX_5.isArray(r)) { var r1=hX_5._E; for (i=0; i0)?hX_5._SM:hX_5._E)+r[i]; r=r1; } } } return r; } HxG_5.prototype.HxCompImpMgr=function (thisparent) { this.p=thisparent; this.p.imp=this; this.deferSetFocus=this.deferSetSelect=this.deferSetSelect1=null; this.deferNSRedraw=[]; } HxG_5.prototype.HxCompImpMgr.prototype.dispatchID=function(obj) { var src=null; if (obj && obj.id) { src=(obj.nodeType == hX_5.ELEMENT_NODE || obj.nodeType == hX_5.DOCUMENT_NODE) ? obj : obj.parentNode; src=src.id; } else if (obj == document || obj == document.body) src=hX_5._BODY; return src; } HxG_5.prototype.HxCompImpMgr.prototype.dispatchToID=function(obj) { return (obj.navigator) ? hX_5._WDW : (((obj.nodeName == hX_5._DDOC || obj.nodeName == hX_5._BBODY || obj.nodeName.toLowerCase() == hX_5._BODY || obj.nodeName.toLowerCase() == hX_5._DOC) ? hX_5._BODY : obj.id)); } HxG_5.prototype.HxCompImpMgr.prototype.dispatchComponent=function(evt) { if ((typeof hX_5)=="undefined") return true; evt=(evt) ? evt : ((event) ? event: null); var src=hX_5.i.dispatchID(this); if (evt && src) { var obj=hX_5.getComponentById(src); if (obj) { var item=obj.DOMobj.tagName.toLowerCase(); return (obj.dispatchComponent (item, evt, evt.type, ((evt.keyCode)?evt.keyCode:null))); } } return true; } HxG_5.prototype.HxCompImpMgr.prototype.dispatchBehavior=function(thisp, evt, name, alias) { if ((typeof hX_5)=="undefined") return true; evt=(evt) ? evt : ((event) ? event: null); var o,x,src=hX_5.i.dispatchID(thisp); if (evt && name && src) { if (alias && alias == "oninput_FORM") { x=document.getElementById(src); if (x && x.form) { src=x.form.id; alias=hX_5._onIN; } } o=hX_5.getBehaviorById(src,name,((alias!=null)?alias:evt.type)); if (o!=null) return(o.dispatchBehavior (thisp, evt)); } return true; } HxG_5.prototype.HxCompImpMgr.prototype.dispatchInputState=function(evt) { if ((typeof hX_5)=="undefined") return true; evt=(evt) ? evt : ((event) ? event: null); var src=hX_5.i.dispatchID(this); if (evt && src) { var obj=hX_5.getBehaviorById(src, hX_5.BHR_assist, hX_5._onIN); if (obj != null && obj.state) return obj.state.dispatch(evt); } return true; } HxG_5.prototype.HxCompImpMgr.prototype.attachMonitor=function(obj, monitor, property1, property2) { var x, proparray=[]; for (x=2; x < arguments.length; x++) proparray.push(arguments[x]); return this.p.attachEvent (obj, hX_5._onPC, hX_5._lL, this.dispatchMonitor, monitor, proparray); } HxG_5.prototype.HxCompImpMgr.prototype.removeMonitor=function(obj, which) { this.p.removeEvent(obj, hX_5._onPC, which, true); } HxG_5.prototype.HxCompImpMgr.prototype.dispatchMonitor=function(evt) { if ((typeof hX_5)=="undefined") return; evt=(evt) ? evt : ((event) ? event: null); if (evt && this) { var src=((this.nodeType == hX_5.ELEMENT_NODE || this.nodeType == hX_5.DOCUMENT_NODE) ? this : this.parentNode); if (src) { var srcid=hX_5.i.dispatchToID(src), obj=hX_5.getComponentById(srcid), prop=(hX_5.brw.isIE()) ? ((evt.propertyName) ? evt.propertyName:null) : ((evt.type==hX_5._onDOMVPC)?hX_5._VL:((evt.attrName) ? evt.attrName : null)); var j, userObj=hX_5.lookupEvent (hX_5._uR, srcid, hX_5._onPC); if (userObj != null && userObj.args && userObj.args.length) { for (j=0; j < userObj.args.length; j++) { if (userObj.args[j] == prop) { if (hX_5.isString(userObj.handler1) && ((userObj.handler1 == "standard") || (userObj.handler1 == "standard1"))) { if (hX_5.brw.isIE() || userObj.handler1 == "standard1") { obj.redraw(); } else { hX_5.i.deferNSRedraw.push(obj); hX_5.i.startDspTimerTimed("hX_5.i.NSRedraw", 10); } } else userObj.handler1.call (this, obj, evt, userObj.args); break; } } } } } return } HxG_5.prototype.HxCompImpMgr.prototype.NSRedraw=function (unq) { if ((typeof hX_5)=="undefined") return; hX_5.i.qKillTimer(unq); while (hX_5.i.deferNSRedraw.length > 0) { hX_5.i.deferNSRedraw[hX_5.i.deferNSRedraw.length-1].redraw(); hX_5.i.deferNSRedraw.pop(); } } HxG_5.prototype.HxCompImpMgr.prototype.attachResizeMonitor=function(obj, type) { if (this.p.brw.isIE()) { obj.onresize=(!type) ? this.dispatchMonitorResize : type; } else { if (!hX_5.globalResize) { this.p.attachEvent(document, hX_5._onR, hX_5._lL, ((!type) ? this.dispatchMonitorResize : type)); hX_5.globalResize=true; } } } HxG_5.prototype.HxCompImpMgr.prototype.removeResizeMonitor=function(obj) { if (this.p.brw.isIE()) { obj.onresize=null; } else { } } HxG_5.prototype.HxCompImpMgr.prototype.dispatchMonitorResize=function(evt) { if ((typeof hX_5)=="undefined") return; evt=(evt) ? evt : ((event) ? event: null); if (evt) { if (hX_5.brw.isIE()) { if (this) { var src=((this.nodeType == hX_5.ELEMENT_NODE || this.nodeType == hX_5.DOCUMENT_NODE) ? this : this.parentNode); if (src) { var srcid=hX_5.i.dispatchToID(src); var obj=hX_5.getComponentById(srcid); if (obj) obj.redraw(); } } } else { hX_5.redraw(); } } return } HxG_5.prototype.HxCompImpMgr.prototype.cancelAction=function(evt, preventDefault) { if (evt!=null) { evt.cancelBubble=true; if (preventDefault) { if (evt.preventDefault) evt.preventDefault(); else if (evt.returnValue) evt.returnValue=false; } } } HxG_5.prototype.HxCompImpMgr.prototype.fireEvent=function(obj, evtname, evttag) { var elem=this.p.getElementById(obj), ename=evtname.toLowerCase(); if (elem) { if (elem.fireEvent) { return (elem.fireEvent(ename)); } else if (elem.dispatchEvent) { var newEvt, shName=((ename.indexOf(hX_5._ON)==0)?ename.substr(2):ename), eType=hX_5.i.typeEvent(shName); newEvt=document.createEvent(eType); newEvt.initEvent(shName, true, true); return (elem.dispatchEvent(newEvt)); } } return false; } HxG_5.prototype.HxCompImpMgr.prototype.typeEvent=function(eName) { r="HTMLEvents"; if (eName == hX_5._evMD || eName == hX_5._evMU || eName == hX_5._evMC || eName == hX_5._evMCC || eName == hX_5._evMM || eName == hX_5._evMO || eName == hX_5._evMV) r="MouseEvents"; return r; } HxG_5.prototype.HxCompImpMgr.prototype.markEvent=function(obj, evtname) { if (hX_5.cursorTracking && evtname==hX_5._evF) { for (var c=0; c < hX_5.cursorTracking.length; c++) hX_5.cursorTracking[c].markFocus(obj,hX_5._evF); return true; } return false; } HxG_5.prototype.HxCompImpMgr.prototype.duplicateEvent=function (evt) { var newEvt=null; if (evt!=null) { if (document.createEventObject!=undefined) newEvt=document.createEventObject(evt); else { var varobj, f="function", s; newEvt=new Object(); newEvt=document.createEvent(hX_5.i.typeEvent(evt.type)); newEvt.initEvent(evt.type, true, true); for (varobj in evt) { if (varobj.charAt(0)==varobj.charAt(0).toLowerCase() && typeof(evt[varobj])!=f) try { newEvt[varobj]=evt[varobj]; } catch (e) { s=newEvt[varobj]; } } } } return newEvt; } HxG_5.prototype.HxCompImpMgr.prototype.setFocus=function(obj, select, defer) { var c, o=hX_5.getElementById(obj); if (o && o.tagName && o.tagName == hX_5._TAB && o.rows && o.rows.length > 0) { if (o.rows[0].cells && o.rows[0].cells.length > 0) { c=hX_5.getFirstChildInCell(o.rows[0].cells[0]); if (c && c.tagName && c.tagName == hX_5._LAB) { c=c.firstChild; if (c && c.tagName && c.tagName == hX_5._INP && (c.type.toLowerCase() == hX_5._RAD || c.type.toLowerCase() == hX_5._CHK)) o=c; } } } hX_5.imp.markEvent(o, hX_5._evF); hX_5.i.deferSetFocus=o; if (hX_5.i.deferSetFocus && this.isFocusable(hX_5.i.deferSetFocus)) { hX_5.i.deferSetSelect=((arguments.length > 1) && select); if (arguments.length > 2 && defer) hX_5.i.startDspTimerTimed("hX_5.i.focusSetter", 10); else hX_5.i.focusSetter(); return true; } return false; } HxG_5.prototype.HxCompImpMgr.prototype.focusSetter=function(unq) { if ((typeof hX_5)=="undefined") return; hX_5.i.qKillTimer(unq); if (document.hasFocus && document.hasFocus() && document.activeElement && document.activeElement.id) { if (hX_5.sel.hasSelection(document.activeElement)) { var was=document.activeElement, to=hX_5.i.deferSetFocus; if (to.id == null || to.id != was.id) hX_5.sel.setSelection(was, 0, 0); } } if (hX_5.i.deferSetFocus && hX_5.i.deferSetFocus.focus) hX_5.i.deferSetFocus.focus(); if (hX_5.i.deferSetSelect && hX_5.i.deferSetFocus.select!=undefined) hX_5.i.deferSetFocus.select(); } HxG_5.prototype.HxCompImpMgr.prototype.isFocusable=function(obj) { if ((obj.type && obj.type.toLowerCase()==hX_5._HI) || obj.disabled) return false; var root=obj; while (root != null && root.tagName != hX_5._BBODY) { if (root.nodeType == hX_5.ELEMENT_NODE) { if (hX_5.g.getP (root, hX_5._VIS) == hX_5._HI || hX_5.g.getP (root, hX_5._DSP) == hX_5._NO) return false; } root=root.parentNode; } return (obj.focus != null); } HxG_5.prototype.HxCompImpMgr.prototype.guessFocus=function() { if (document.hasFocus && document.hasFocus() && document.activeElement && document.activeElement.tagName!=hX_5._BBODY) return document.activeElement; return null; } HxG_5.prototype.HxCompImpMgr.prototype.startTimerTimed=function(id, item, action, period, bname, ename) { hX_5.timerUnq=(hX_5.timerUnq < 32000)?(hX_5.timerUnq+1):1; var d=(bname != null) ? "hX_5.i.dispatchTimerBehavior('" : "hX_5.i.dispatchTimer('"; var t=window.setTimeout(d + hX_5.timerUnq + "', '" + id + "', '" + item + "', '" + action + ((bname==null)?"":("', '" + bname)) + ((ename==null)?"":("', '" + ename)) + "')", period); this.addTimer(t, "t", hX_5.timerUnq); return t; } HxG_5.prototype.HxCompImpMgr.prototype.startTimerInterval=function(id, item, action, period) { hX_5.timerUnq=(hX_5.timerUnq < 32000)?(hX_5.timerUnq+1):1; var t=window.setInterval("hX_5.i.dispatchITimer('" + hX_5.timerUnq + "', '" + id + "', '" + item + "', '" + action + "')", period); this.addTimer(t, "i", hX_5.timerUnq); return t; } HxG_5.prototype.HxCompImpMgr.prototype.startObjTimerTimed=function(obj, param, period) { hX_5.timerUnq=(hX_5.timerUnq < 32000)?(hX_5.timerUnq+1):1; var t=window.setTimeout("hX_5.i.dispatchOTimer('" + hX_5.timerUnq + "', '" + param + "')", period); this.addTimer(t, "t", hX_5.timerUnq, obj); return t; } HxG_5.prototype.HxCompImpMgr.prototype.startDspTimerTimed=function(strBack, period, arg0) { hX_5.timerUnq=(hX_5.timerUnq < 32000)?(hX_5.timerUnq+1):1; var t=window.setTimeout(strBack + "('" + hX_5.timerUnq + ((arg0==null)?hX_5._E:("'"+hX_5._C+"'"+arg0)) + "')", period); this.addTimer(t, "t", hX_5.timerUnq); return t; } HxG_5.prototype.HxCompImpMgr.prototype.killAllTimers=function() { var i, timerid, iS="i", l=hX_5.Timers.length; for (i=0; i=0; i--) if (hX_5.DialogStack[i]!=null && hX_5.DialogStack[i].isModal) lastModal=hX_5.DialogStack[i]; if (hX_5.dialogIframeStack==null) hX_5.dialogIframeStack=[]; while (hX_5.dialogIframeStack.length < hX_5.DialogStack.length) { o=document.createElement(hX_5._DIV); o.setAttribute (hX_5._ID, "HX_DLG_SCRATCH_"+hX_5.dialogIframeStack.length); o.setAttribute (hX_5._NAM, o.id); o.style.display=hX_5._NO; o.style.zIndex=hX_5.BIG_ZINDEX-1; o.style.position=hX_5._ABS; o.style.top=hX_5._ZPX; o.style.left=hX_5._ZPX; o.style.width=hX_5._ZPX; o.style.height=hX_5._ZPX; o.style.borderWidth=hX_5._ZPX; o.style.borderStyle=hX_5._NO; document.body.appendChild(o); hX_5.dialogIframeStack.push(o); } o=e.iframe=hX_5.dialogIframeStack[hX_5.DialogStack.length-1]; if (firstModal) { document.body.appendChild(o); hX_5.g.setP(o, hX_5._ZND, (z-2)+hX_5._E); hX_5.g.setP(o, hX_5._WD, Math.max(hX_5.g.getWindowClientWidth(),document.body.scrollWidth)); hX_5.g.setP(o, hX_5._HT, Math.max(hX_5.g.getWindowClientHeight(),document.body.scrollHeight)); e.resize=hX_5.attachEvent(document.body, hX_5._onR, hX_5._lF, hX_5.dispatchDlgSkip); } else { d=lastModal.dlg.DOMobj; d.insertBefore(o, d.firstChild); hX_5.g.setP(o, hX_5._ZND, (z-2)+hX_5._E); hX_5.g.setP(o, hX_5._WD, hX_5.g.getRendWidth(d)+hX_5._PX); hX_5.g.setP(o, hX_5._HT, hX_5.g.getRendHeight(d)+hX_5._PX); } hX_5.g.setP(o, hX_5._DSP, hX_5._E); hX_5.g.setP(o, hX_5._BCOR, "#E2E2E2"); if (o.filters) { o.style.filter="progid:DXImageTransform.Microsoft.Alpha(enabled=false)"; o.filters.item("DXImageTransform.Microsoft.Alpha").opacity=50; o.filters.item("DXImageTransform.Microsoft.Alpha").enabled=true; } else if (o.style) { o.style.MozOpacity=.4; } for (i=0; firstModal && i0 && hX_5.DialogStack[hX_5.DialogStack.length-1]==null) hX_5.DialogStack.pop(); if (e.isModal) { for (i=hX_5.DialogStack.length-1; lastModal==null && i>=0; i--) if (hX_5.DialogStack[i]!=null && hX_5.DialogStack[i].isModal) lastModal=hX_5.DialogStack[i]; if (hX_5.brw.isIE() && e.saveDisabledSelects!=null && e.saveDisabledSelects.length>0) for (i=0; i0) for (i=0; i=0 && !hX_5.DialogStack[d].isModal) d--; if (d>=0) { d=hX_5.DialogStack[d]; if (evt.type==hX_5._evKD) { if (evt.keyCode == hX_5.KEY_TAB) { if (hX_5.tabNav == null) hX_5.tabNav=new hX_5.tabNavigator(); if (tgt==hX_5.tabNav.getLast(d.dlg.DOMobj)) { if (!evt.shiftKey) obj=hX_5.tabNav.getFirst(d.dlg.DOMobj); } else { if (evt.shiftKey) obj=hX_5.tabNav.getLast(d.dlg.DOMobj); } if (obj) { hX_5.i.setFocus(obj); r=false; } } } else if (evt.type==hX_5._evR) { d=0; while (d < hX_5.DialogStack.length && !hX_5.DialogStack[d].isModal) d++; hX_5.g.setP(hX_5.DialogStack[d].iframe, hX_5._WD, hX_5.g.getWindowClientWidth()); hX_5.g.setP(hX_5.DialogStack[d].iframe, hX_5._HT, hX_5.g.getWindowClientHeight()); hX_5.g.setP(hX_5.DialogStack[d].iframe, hX_5._WD, Math.max(hX_5.g.getWindowClientWidth(),document.body.scrollWidth)); hX_5.g.setP(hX_5.DialogStack[d].iframe, hX_5._HT, Math.max(hX_5.g.getWindowClientHeight(),document.body.scrollHeight)); } else if (evt.type==hX_5._evMD) { r=false; } else { if (!hX_5.isChildTag(tgt, d.dlg.DOMobj, "_HXPOPUP")) { if (hX_5.tabNav == null) hX_5.tabNav=new hX_5.tabNavigator(); obj=(evt.shiftKey) ? hX_5.tabNav.getLast(d.dlg.DOMobj) : hX_5.tabNav.getFirst(d.dlg.DOMobj); if (obj) hX_5.i.setFocus(obj, false, true); r=false; } } } if (!r) hX_5.i.cancelAction(evt,true); return r; } HxG_5.prototype.popEvents=null; HxG_5.prototype.HxPopMgr=function (thisparent) { this.p=thisparent; this.popObj=this.ownObj=null; this.setEvents=this.popswap=this.popcap=this.buttondown=false; this.timerid=0; this.rect=null; this.overrideESC=false; } HxG_5.prototype.HxPopMgr.prototype.start=function (popObject, ownObject, noMouseCapture) { if (popObject && ownObject) { this.popObj=popObject; this.ownObj=ownObject; this.overrideESC=this.popswap=this.popcap=this.buttondown=false; if (this.rect!=null) delete this.rect; this.rect=new hX_5.HxRect(this.popObj); if (hX_5.popEvents==null) hX_5.popEvents=hX_5.brw.isIE() ? [hX_5._onMD, hX_5._onMU, hX_5._onMM, hX_5._onKP, hX_5._onKD, hX_5._onKU, hX_5._onMC, hX_5.onSC, hX_5._onCM] : [hX_5._evMD, hX_5._evMU, hX_5._evMM, hX_5._evKP, hX_5._evKD, hX_5._evKU, hX_5._evMC, hX_5._evSC]; if (!this.setEvents) for (var j=0; j b.X+b.width) b.width=r.X-b.X; else if (r.X+r.width < b.X) { b.width+=((r.X+r.width)-b.X); b.X=r.X+r.width; } if (r.Y > b.Y+b.height) b.height=r.Y-b.Y; else if (r.Y+r.height < b.Y) { b.height+=((r.y+r.height)-b.Y); b.Y=r.Y+r.height; } } } HxG_5.prototype.HxMouseMgr.prototype.trackMouse=function () { if (!this.popswap) { hX_5.mouserMouseEvents=hX_5.brw.isIE() ? [hX_5._onMD, hX_5._onMU, hX_5._onMM, hX_5._onMV, hX_5._onMO, hX_5._onKD, hX_5._onKU, hX_5._onCM] : [hX_5._evMD, hX_5._evMU, hX_5._evMM, hX_5._evMC, hX_5._evMV, hX_5._evMO, hX_5._evKD, hX_5._evKU, hX_5._evKP, hX_5._evSC]; hX_5.swapPopEvent(true, hX_5.mouser, hX_5.mouserMouseEvents); this.popswap=true; } } HxG_5.prototype.HxMouseMgr.prototype.killMouse=function () { if (this.timerid != 0) hX_5.i.killTimerTimed (this.timerid); if (this.popswap) hX_5.swapPopEvent(false, hX_5.mouser, hX_5.mouserMouseEvents); this.popswap=false; this.timerid=0; while (this.hotspots.length > 0) this.hotspots.pop(); this.basespot=null; } HxG_5.prototype.HxMouseMgr.prototype.dispatchPopEvent=function(evt) { if ((typeof hX_5)=="undefined") return true; var r=false; evt=(evt) ? evt : ((event) ? event: null); if (evt) { var src=(evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : (hX_5.brw.isIE() ? document.body : null)); if (src) { src=(src.nodeType == hX_5.ELEMENT_NODE || src.nodeType == hX_5.DOCUMENT_NODE) ? src : src.parentNode; if (evt.type==hX_5._evKD || evt.type==hX_5._evKU || evt.type==hX_5._evKP) { if (hX_5.mouser.timerid != 0) { hX_5.i.killTimerTimed (hX_5.mouser.timerid); hX_5.mouser.timerid=0; } if (hX_5.mouser.root && hX_5.mouser.root.dispatchPopEvent) r=hX_5.mouser.root.dispatchPopEvent(src, evt); } else if (evt.type==hX_5._evMO || evt.type==hX_5._evMV) { r=true; if (hX_5.brw.isIE() && src.tagName!=undefined && src.id!=undefined && src.tagName==hX_5._INP) { var obj=hX_5.getComponentById(src.id); r=(obj && obj.dispatchComponent) ? (obj.dispatchComponent(src, evt, evt.type, null)):true; } } else if (evt.type==hX_5._evMD || evt.type==hX_5._evMU || evt.type==hX_5._evMM) { var i, isBase=false, point=hX_5.g.toPoint(evt), isInPopup=hX_5.mouser.basehotrect.hitTest(point); if (isInPopup) isBase=true; else { for (i=0; (!isInPopup) && (i 0) { evtObj=eObj.events.pop(); evtObj.remove(0,true); delete evtObj; } delete eObj; this.userEvents[id]=null; } } HxG_5.prototype.JSFEventObject=function (id) { this.id=id; this.events=[]; } HxG_5.prototype.JSFEvent=function (obj, eventname, etype, handler1, args, MozDown) { if (obj && eventname) { this.eventCounter=0; this.eventname=eventname; this.User=null; this.preUser= []; this.postUser= []; this.eventL=[]; this.etype=etype; this.obj=obj; this.tgtObj=null; this.args=args; this.handler1= handler1; this.id=null; var f=null; if (etype == hX_5._uR) { if (MozDown) this.id=(hX_5._WDW == hX_5.i.dispatchToID(obj)) ? hX_5._WDW : obj.id; else if ((hX_5._BODY == hX_5.i.dispatchToID(obj))) { f=document.body.getAttribute(eventname); this.id=hX_5._BODY; } else { f=obj.getAttribute(eventname); this.id=obj.id; } } else this.id=obj; if (f != null) this.User=(hX_5.isFunction(f)) ? f : new Function("event", f); } } HxG_5.prototype.JSFEventEntry=function (id, handler, moz) { this.id=id; this.moz=moz; if (hX_5.isFunction(handler)) this.handler=handler; else if (hX_5.isString(handler)) this.handler=new Function("event", "return " + handler + ";"); else this.handler=hX_5.JSFNoOp; } HxG_5.prototype.JSFNoOp=function (event) { return; } HxG_5.prototype.JSFEvent.prototype.addPost=function (pos, handler) { this.eventCounter++; var entry=new hX_5.JSFEventEntry(this.eventCounter, handler); if (pos == hX_5._lF || pos == "first") this.postUser.unshift (entry); else this.postUser.push (entry); return (this.eventCounter); } HxG_5.prototype.JSFEvent.prototype.addPre=function(pos, handler) { this.eventCounter++; var entry=new hX_5.JSFEventEntry(this.eventCounter, handler); if (pos == hX_5._lF || pos == "first") this.preUser.unshift (entry); else this.preUser.push (entry); return (this.eventCounter); } HxG_5.prototype.JSFEvent.prototype.chkEvtL=function(pos, handler) { if (this.eventL.length>0) { for (var i=0; i< this.eventL.length; i++) if (this.eventL[i]!=null && this.eventL[i].moz!=null && this.eventL[i].moz==pos) return true; } return false; } HxG_5.prototype.JSFEvent.prototype.addEvtL=function(pos, handler) { this.eventCounter++; var entry=new hX_5.JSFEventEntry(this.eventCounter, handler, pos); this.eventL.push(entry); return (this.eventCounter); } HxG_5.prototype.JSFEvent.prototype.remove=function (id, destroy) { var i, e, removed=false, l=this.postUser.length, moz1=false, moz2=false, rmoz=null, ename; if (id <= 0) { while (this.postUser.length > 0) { e=this.postUser.pop(); if (destroy) delete (e); } while (this.preUser.length > 0) { e=this.preUser.pop(); if (destroy) delete (e); } while (this.eventL.length > 0) { e=this.eventL.pop(); if (e.moz) moz1=true; else moz2=true; if (destroy) delete (e); } if (destroy) { this.tgtObj.setAttribute(this.eventname, null); if (document.addEventListener && (moz1||moz2)) { eName=(this.eventname.indexOf(hX_5._ON) == 0) ? this.eventname.substr(2) : this.eventname; if (moz1) this.tgtObj.removeEventListener(eName, hX_5.runEvent2, true); if (moz2) this.tgtObj.removeEventListener((this.args && this.args.length && this.args[0]==hX_5._VL)?hX_5._onDOMVPC:hX_5._onDOMPC, hX_5.runEvent1, false); } } } else { for (i=0; ((i < l) && (!removed)); i++) { if (this.postUser[i] && this.postUser[i].id == id) { this.postUser[i]=null; removed=true; while (this.postUser.length>0 && this.postUser[this.postUser.length-1]==null) this.postUser.pop(); } } l=this.preUser.length; for (i=0; ((i < l) && (!removed)); i++) { if (this.preUser[i] && this.preUser[i].id == id) { this.preUser[i]=null; removed=true; while (this.preUser.length>0 && this.preUser[this.preUser.length-1]==null) this.preUser.pop(); } } if (!removed) { l=this.eventL.length; moz1=0; moz2=0; for (i=0; (i < l); i++) { if (this.eventL[i]) { if (!removed && this.eventL[i].id == id) { rmoz=this.eventL[i].moz; this.eventL[i]=null; removed=true; while (this.eventL.length>0 && this.eventL[this.eventL.length-1]==null) this.eventL.pop(); } else { if (this.eventL[i].moz) moz1++; else moz2++; } } } if (rmoz!=null) { eName=(this.eventname.indexOf(hX_5._ON) == 0) ? this.eventname.substr(2) : this.eventname; if (rmoz && moz1==0) this.tgtObj.removeEventListener(eName, hX_5.runEvent2, true); if (!rmoz && mox2==0) this.tgtObj.removeEventListener((this.args && this.args.length && this.args[0]==hX_5._VL)?hX_5._onDOMVPC:hX_5._onDOMPC, hX_5.runEvent1, false); } } } } HxG_5.prototype.swapPopEvent=function (addevent, iHandler, mouseEvents, noCapture) { var d=(iHandler) ? iHandler: hX_5.popMgr; var userObj, j, l=mouseEvents.length, dd="#docdrag", ff, ss="S"; for (j=0; j < l; j++) { userObj=hX_5.lookupEvent (ss, dd, mouseEvents[j]); if (!addevent) { if (userObj) { if (this.brw.isIE()) { document.body.parentNode.setAttribute(mouseEvents[j], userObj.User); } else { ff=hX_5._ON + mouseEvents[j]; window.removeEventListener(mouseEvents[j], d.dispatchPopEvent, true); window[ff]=userObj.User; } } } else { if (userObj == null) userObj=hX_5.addNewEvent (dd, dd, mouseEvents[j], ss); if (this.brw.isIE()) { userObj.User=document.body.parentNode.getAttribute(mouseEvents[j]); document.body.parentNode.setAttribute(mouseEvents[j], d.dispatchPopEvent); } else { ff=hX_5._ON + mouseEvents[j]; userObj.User=window[ff]; window.addEventListener(mouseEvents[j], d.dispatchPopEvent, true); } } } if (this.brw.isIE() && noCapture==null) { if (addevent) document.body.parentNode.setCapture(); else document.body.parentNode.releaseCapture(); } return true; } HxG_5.prototype.runEvent1=function (evt) { hX_5.runEvent(this, evt); } HxG_5.prototype.runEvent2=function (evt) { hX_5.runEvent(this, evt, true); } HxG_5.prototype.runEvent=function (ethis, evt, MozDown) { evt=(evt) ? evt : ((event) ? event: null); if (evt.returnValue!=undefined && evt.returnValue==false) evt.returnValue=true; ethis=(!ethis) ? this : ethis; ethis=(ethis == window || ethis == document.window) ? ((MozDown)?window:window.document.body) : ethis; if (ethis && evt) { var srcid, userObj, evtname=(evt.type==hX_5._onDOMPC || evt.type==hX_5._onDOMVPC) ? hX_5._onPC : (hX_5._ON + evt.type); srcid=(ethis == window) ? hX_5._WDW : ((ethis == document || ethis == document.body) ? hX_5._BODY : ethis.id); userObj=hX_5.lookupEvent (hX_5._uR, srcid, evtname); if (userObj != null) return ((hX_5.brw.isIE()) ? (userObj.run(ethis)) : (userObj.run(ethis, evt))); } return true; } HxG_5.prototype.JSFEvent.prototype.run=function (ethis, evt) { var i, r=true; evt=(evt) ? evt : ((event) ? event: null); for (i=0; r && i < this.eventL.length; i++) { if (this.eventL[i] != null) { r=(hX_5.brw.isIE()) ? ((this.eventL[i]).handler.call(ethis)) : ((this.eventL[i]).handler.call(ethis, evt)); r=(r == false) ? false: true; if (evt.returnValue!=undefined && evt.returnValue == false) r=false; else if (evt.getPreventDefault && evt.type!=hX_5._onDOMPC && evt.type!=hX_5._onDOMVPC && evt.getPreventDefault()) r=false; } } for (i=0; r && i < this.preUser.length; i++) { if (this.preUser[i] != null) { r=(hX_5.brw.isIE()) ? ((this.preUser[i]).handler.call(ethis)) : ((this.preUser[i]).handler.call(ethis, evt)); r=(r == false) ? false: true; if (evt.returnValue!=undefined && evt.returnValue == false) r=false; else if (evt.getPreventDefault && evt.getPreventDefault()) r=false; } } if (r && this.User != null) { r=(hX_5.brw.isIE()) ? (this.User.call(ethis)) : (this.User.call(ethis, evt)); r=(r == false) ? false: true; if (evt.returnValue!=undefined && evt.returnValue == false) r=false; else if (evt.getPreventDefault && evt.getPreventDefault()) r=false; } for (i=0; r && i < this.postUser.length; i++) { if (this.postUser[i] != null) { r=(hX_5.brw.isIE()) ? ((this.postUser[i]).handler.call(ethis)) : ((this.postUser[i]).handler.call(ethis, evt)); r=(r == false) ? false: true; if (evt.returnValue!=undefined && evt.returnValue == false) r=false; else if (evt.getPreventDefault && evt.getPreventDefault()) r=false; } } return r; } HxG_5.prototype.HxConstraints=function () { this.regexp=[]; this.ELexp=[]; this.regexpstr=[]; this.ELexpstr=[]; this.staticConstraint("AlphabetExOnly","^[A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]+$"); this.staticConstraint("AlphabetOnly", "^[A-Za-z]+$"); this.staticConstraint("DigitOnly", "^[0-9]+$"); this.staticConstraint("AlnumExOnly", "^[A-Za-z0-9\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]+$"); this.staticConstraint("AlnumOnly", "^[A-Za-z0-9]+$"); this.staticConstraint("UpperCaseOnly", "^[A-Z]+$"); this.staticConstraint("LowerCaseOnly", "^[a-z]+$"); } HxG_5.prototype.HxConstraints.prototype.getRegExpByName=function (name) { return this.regexp[name]; } HxG_5.prototype.HxConstraints.prototype.testRegExp=function (test, exp) { return ((test.length==0) ? true : (!(test.match(exp) == null))); } HxG_5.prototype.HxConstraints.prototype.staticConstraint=function (name, x) { try { this.regexp[name]= new RegExp(x); this.regexp[name].compile(x); } catch (e) { window.status=hX_5.INTERR_Constraint; } } HxG_5.prototype.HxConstraints.prototype.registerConstraint=function (x) { var name, i, hxc="hxConstraint"; for (i=0; i < this.regexpstr.length; i++) { if (this.regexpstr[i] == x) { name=hxc + i; return this.regexp[name]; } } name=hxc + this.regexpstr.length; this.regexpstr.push(x); try { this.regexp[name]= new RegExp(x); this.regexp[name].compile(x); return this.regexp[name]; } catch (e) { window.status=hX_5.INTERR_Constraint; } return null; } HxG_5.prototype.HxConstraints.prototype.registerELConstraint=function (x, type) { var name, i, hxe="hxExpression"; for (i=0; i < this.ELexpstr.length; i++) { if (this.ELexpstr[i] == x) { name=hxe + i; return this.ELexp[name]; } } name=hxe + this.ELexpstr.length; this.ELexpstr.push(x); try { var exp=hX_5.replaceAll(x, "@testValue", "testValue"); if (type=="date") { exp=hX_5.replaceAll(exp, "testValue.date", "testValue.getDate()"); exp=hX_5.replaceAll(exp, "testValue.day", "testValue.getDay()"); exp=hX_5.replaceAll(exp, "testValue.hours", "testValue.getHours()"); exp=hX_5.replaceAll(exp, "testValue.minutes", "testValue.getMinutes()"); exp=hX_5.replaceAll(exp, "testValue.month", "testValue.getMonth()"); exp=hX_5.replaceAll(exp, "testValue.seconds", "testValue.getSeconds()"); exp=hX_5.replaceAll(exp, "testValue.timezoneOffset", "testValue.getTimezoneOffset()"); exp=hX_5.replaceAll(exp, "testValue.time", "testValue.getTime()"); exp=hX_5.replaceAll(exp, "testValue.year", "(testValue.getFullYear()-1900)"); } exp=" return (" + exp + "); "; this.ELexp[name]=new Function("testValue", exp); return this.ELexp[name]; } catch (e) { window.status=hX_5.INTERR_Constraint; } return null; } HxG_5.prototype.HxConstraints.prototype.testELExp=function (test, exp) { return (exp.call(this, test)); } HxG_5.prototype.processBehavior=function (id, evt, actions, targets) { var obj=hX_5.getElementById(id); if (obj && evt && (actions!=null || fcn!=null)) { action=[]; target=[]; var i, j, z, t=actions; for (j=0; j<2; j++) { if (j==0) {t=actions; z=action;} else {t=targets; z=target;} while (t.length > 0) { i=t.indexOf(hX_5._SM); if (i>=0) { z.push(t.substring(0,i)); t=t.substr(i+1); } else { z.push(t); t=hX_5._E; } } } hX_5.action.processAction(obj, evt, null, action, true, target, null, null, null, null); } } HxG_5.prototype.HxAction=function () { this.processAction=processAction; this.processActionEx=processActionEx; this.processFunction=processFunction; this.positionLabels=positionLabels; this.doClick=doClick; this.doHideShow=doHideShow; this.doHideShowCB=doHideShowCB; this.doContinueActions=doContinueActions; this.pauseActions=pauseActions; this.unPauseActions=unPauseActions; this.isPaused=isPaused; this.pauseBlock=pauseBlock; this.pauseStateBlock=pauseStateBlock; this.pActions=[]; this.pBlocks=[]; this.sBlocks=[]; this.pRunningCount=0; function pauseActions() { var i, empty=null, p; p=new this.pauseBlock(); for (i=0; empty==null && i 0 && this.pActions[this.pActions.length-1]==null) this.pActions.pop(); } } function isPaused(ID) { for (var i=0; i 0 && hX_5.action.pActions[hX_5.action.pActions.length-1]==null) hX_5.action.pActions.pop(); } p=null; for (i=0; p==null && i 0 && hX_5.action.pBlocks[hX_5.action.pBlocks.length-1]==null) hX_5.action.pBlocks.pop(); } } } else { for (i=0; p==null && i 0 && hX_5.action.pBlocks[hX_5.action.pBlocks.length-1]==null) hX_5.action.pBlocks.pop(); } } return false; } function doCssStyleClass (inobj, styleClass, inlabel, styleLabelClass) { var obj=hX_5.getElementById(inobj); if ((obj != null) && (styleClass != null) && (obj.className != styleClass)) obj.className=styleClass; obj=(inlabel!=null) ? hX_5.getElementById(inlabel) : null; if ((obj != null) && (styleLabelClass != null) && (obj.className != styleLabelClass)) obj.className=styleLabelClass; } function doHideShowLabels (pop, infoSpan, infoShow, errorSpan, errorShow, error) { var d, dsp=((pop==null)?hX_5._E:hX_5._BLK), obj=(infoSpan!=null)?hX_5.getElementById(infoSpan):null; if (obj != null) { d=hX_5.g.getP(obj, hX_5._DSP); if (infoShow && d==hX_5._NO) hX_5.g.setP(obj, hX_5._DSP, dsp); if (!infoShow && d!=hX_5._NO) hX_5.g.setP(obj, hX_5._DSP, hX_5._NO); } obj=(errorSpan!=null)?hX_5.getElementById(errorSpan) : null; if (obj != null) { d=hX_5.g.getP(obj, hX_5._DSP); if (errorShow) { if (error!=hX_5.getIHTML(obj)) hX_5.setIHTML(obj,error); if (errorShow && d==hX_5._NO) hX_5.g.setP(obj, hX_5._DSP, dsp); } if (!errorShow && d!=hX_5._NO) hX_5.g.setP(obj, hX_5._DSP, hX_5._NO); } } function positionLabels (o, pop, spInfo, spError) { if (o && (spInfo || spError)) { var d, p,l,t,h, rel=false, top=hX_5.g.getAbsPosTop(o), left=hX_5.g.getAbsPosLeft(o), sTop=top, sLeft=left; if (pop=="RIGHT") left+=hX_5.g.getRendWidth(o); else if (pop=="UNDER") top+=hX_5.g.getRendHeight(o); else rel=true; sLeft=left; sTop=top; if (spError) { l=hX_5.g.getAbsPosLeft(spError); t=hX_5.g.getAbsPosTop(spError); if (rel) { d=hX_5.g.getP(spError, hX_5._DSP); if (d==hX_5._NO) hX_5.g.setP(spError, hX_5._DSP, hX_5._BLK); if (pop=="LEFT") left -= hX_5.g.getRendWidth(spError); else top -= hX_5.g.getRendHeight(spError); if (d!=hX_5.g.getP(spError, hX_5._DSP)) hX_5.g.setP(spError, hX_5._DSP, d); } if (l!= left) hX_5.g.setP(spError, hX_5._LFT, left+hX_5._PX); if (t!= top) hX_5.g.setP(spError, hX_5._TOP, top+hX_5._PX); } if (spInfo) { l=hX_5.g.getAbsPosLeft(spInfo); t=hX_5.g.getAbsPosTop(spInfo); if (rel) { d=hX_5.g.getP(spInfo, hX_5._DSP); if (d==hX_5._NO) hX_5.g.setP(spInfo, hX_5._DSP, hX_5._BLK); if (pop=="LEFT") sLeft -= hX_5.g.getRendWidth(spInfo); else sTop -= hX_5.g.getRendHeight(spInfo); if (d!=hX_5.g.getP(spInfo, hX_5._DSP)) hX_5.g.setP(spInfo, hX_5._DSP, d); } if (l!= sLeft) hX_5.g.setP(spInfo, hX_5._LFT, sLeft+hX_5._PX); if (t!= sTop) hX_5.g.setP(spInfo, hX_5._TOP, sTop+hX_5._PX); } } } function doHideShowCB (unq) { if ((typeof hX_5)=="undefined") return true; var i,blk,r=false,tid=hX_5.i.timerUnqToId(unq); hX_5.i.qKillTimer(unq); for (i=0; i0 && hX_5.action.sBlocks[hX_5.action.sBlocks.length-1]==null) hX_5.action.sBlocks.pop(); return r; } function doHideShow (doload, t, evt, pended) { var r=true, s, i=true, once=false; if (pended && (hX_5.pendingBlurRefocus!=null || hX_5.pendingFocusReturn!=null)) r=false; else { s=(t.id!=undefined)?hX_5.getComponentById(t.id):null; if (s && s.onPreLoad!=undefined) i=s.onPreLoad(s.DOMobj, evt); if (!i) r=false; else { if (doload==1) t.style.display=hX_5._E; else if (doload==2) t.style.display=hX_5._NO; else if (doload==3) hX_5.applyNestedProperty(t, hX_5._VIS, hX_5._VS); else hX_5.applyNestedProperty(t, hX_5._VIS, hX_5._HI); a=hX_5.getComponentsInId(t); for (i=0; a!=null && i 0 && (obj.tagName == hX_5._TXT || (obj.tagName == hX_5._INP && (obj.type.toLowerCase() == hX_5._XT ||obj.type.toLowerCase()==hX_5._PWD)))) { var p=hX_5.sel.getCaretPos(obj); if (p>=0 && p 0) for (i=0; i 0) { if (hX_5.brw.isIE()) hX_5.skipVCMonitor=true; t.value=hX_5.padL(t.value, domMaxLen, hX_5._B); } } break; case hX_5.ACT_PADRIGHT: if (t && t.value && t.maxLength) { domMaxLen=(t.maxLength == -1 || t.maxLength == 0x7fffffff || t.maxLength == void(0)) ? 0 : t.maxLength; if (domMaxLen > 0) { if (hX_5.brw.isIE()) hX_5.skipVCMonitor=true; t.value=hX_5.padR(t.value, domMaxLen, hX_5._B); } } break; case hX_5.ACT_TRIM: if (t && t.value) { if (hX_5.brw.isIE()) hX_5.skipVCMonitor=true; t.value=hX_5.Trim(t.value); } break; case hX_5.ACT_MOVE: if (evt && evt.keyCode!=undefined && t) { if (evt.keyCode==hX_5.KEY_LTARROW || evt.keyCode==hX_5.KEY_RTARROW) { s=hX_5.g.getAbsPosLeft(t)+((evt.keyCode==hX_5.KEY_LTARROW)?-5:5); i=hX_5.g.getWindowClientWidth()-hX_5.g.getRendWidth(t); s=(s<0)?0:((s>i)?i:s); if (hX_5.g.getRelPos(t)) s=s - hX_5.g.getAbsPosLeft(hX_5.g.getRelPos(t)); t.style.left=s+hX_5._PX; } else if (evt.keyCode==hX_5.KEY_UPARROW || evt.keyCode==hX_5.KEY_DNARROW) { s=hX_5.g.getAbsPosTop(t)+((evt.keyCode==hX_5.KEY_UPARROW)?-5:5); i=hX_5.g.getWindowClientHeight()-hX_5.g.getRendHeight(t); s=(s<0)?0:((s>i)?i:s); if (hX_5.g.getRelPos(t)) s=s - hX_5.g.getAbsPosTop(hX_5.g.getRelPos(t)); t.style.top=s+hX_5._PX; } } break; case hX_5.ACT_DLG_OK: redrawHS=true; doload=2; evt.submitFlag=hX_5.ACT_DLG_OK; break; case hX_5.ACT_DLG_CANCEL: redrawHS=true; doload=2; evt.submitFlag=hX_5.ACT_DLG_CANCEL; break; case hX_5.ACT_FOCUS: case hX_5.ACT_SELECTED: case hX_5.ACT_UNSELECTED: r=false; if (evt && evt.type==hX_5._evF && t.id==srcobj.id) { if (a == hX_5.ACT_SELECTED) hX_5.sel.setCaretPos(srcobj, 0, srcobj.value.length, hX_5.brw.isNavOrMoz()); else { var bev=hX_5.getBehaviorById(srcobj.id, hX_5.BHR_assist, hX_5._onIN); if ((a==hX_5.ACT_UNSELECTED) || (bev==null) || (bev!=null && bev.assist==null)) hX_5.sel.setCaretPos(srcobj, 0, 0, hX_5.brw.isNavOrMoz()); } break; } hX_5.i.setFocus(t, (a==hX_5.ACT_SELECTED), true); if (evt && evt.type==hX_5._evB) hX_5.pendingBlurRefocus=t.id; if (!globalAction) { hX_5.pendingFocusReturn=t.id; hX_5.pendingSelect=(a==hX_5.ACT_SELECTED); } break; default: break; } } if (redrawHS) { s=(t.id!=undefined)?hX_5.getComponentById(t.id):null; if (s && globalAction && (s.onLoad || s.onPreLoad)) { var se,tid; if (document.createEventObject!=undefined) se=document.createEventObject(evt); else se=new dummyEvent(evt.type, evt.target, evt); if (evt.submitFlag) se.submitFlag=evt.submitFlag; tid=hX_5.i.startDspTimerTimed("hX_5.action.doHideShowCB", 1); hX_5.action.sBlocks.push([tid,doload,t,se]); r=true; } else { r=doHideShow (doload, t, evt, false); } } if (redraw) { a=hX_5.getComponentsInId(t); for (s=0; a!=null && s 10000) this.pRunningCount=1; } var id=this.pRunningCount; var r=(reEntry!=null)?true:this.processFunction(obj,evt,fcn); var k, t, a, initialr=r, pause=null; if (r && action != null) { for (k=((reEntry!=null)?reEntry:0); r && pause==null && k < action.length; k++) { a=action[k].toUpperCase(); t=target[k]; if (!(a==hX_5.ACT_CONFIRM || a==hX_5.ACT_ALERT)) { if (hX_5.isDef(typeof t) && t != null) { if (t.toLowerCase() == hX_5._NO) t=document.body; else if (t.substr(0,4).toLowerCase() == hX_5._URL || t.substr(0,4).toLowerCase() == hX_5._URI) t=hX_5.stripURL(t); else t=hX_5.getElementById(t); } else if (evt != null) t=hX_5.evtGetTarget(evt); } r=doAction (obj, a, globalAction, t, evt); r=(hX_5.isUnDef(typeof r)) ? true : ((r == false) ? false: true); if (evt && evt.returnValue!=undefined && evt.returnValue == false) r=false; else if (evt && evt.getPreventDefault && evt.getPreventDefault()) r=false; if (r && a==hX_5.ACT_GET) { pause=this.isPaused(id); if (pause!=null) pause.defer (obj, evt, fcn, action, globalAction, target, cssStyle, cancelBubble, retainFocus, isError, error, label, cssLabelStyle, popLabels, infoSpan, infoShow, errorSpan, errorShow, k+1); r=false; } } } if (!pause) { if (initialr) { doCssStyleClass (obj, cssStyle, label, cssLabelStyle); if (popLabels!=null) this.positionLabels(obj, popLabels, infoSpan, errorSpan); doHideShowLabels (popLabels, infoSpan, infoShow, errorSpan, errorShow, error); if (popLabels!=null) this.positionLabels(obj, popLabels, infoSpan, errorSpan); } if (cancelBubble != null || (isError && !r)) { if (evt) { if (evt.preventDefault) { evt.stopPropagation(); evt.preventDefault(); } else { if (hX_5.brw.isIE() && evt.type==hX_5._evKD) { var code=(evt.keyCode && (evt.keyCode != 0)) ? evt.keyCode : -1; if ((code >= 91 && code <= 93) || (code >= 112 && code <= 123)) try { evt.keyCode=0; } catch (e) { } } evt.cancelBubble=true; evt.returnValue=false; } } r=false; } if (retainFocus) hX_5.i.setFocus(t, false, true); } return r; } function processFunction (obj, evt, fcn, arg0) { var r=true; if (fcn != null && obj!=null) { try { var realfcn=(hX_5.isFunction(fcn)) ? fcn : new Function ("event", fcn); r=(arg0==null) ? realfcn.call(obj, evt) : realfcn.call(obj, arg0, evt); r=(hX_5.isUnDef(typeof r)) ? true : ((r == false) ? false: true); if (evt) { if (evt.returnValue!=undefined && evt.returnValue == false) r=false; else if (evt.getPreventDefault && evt.getPreventDefault()) r=false; } } catch (e) { window.status=hX_5.INTERR_Dispatcher; if (evt && evt.errorMsg) evt.errorMsg=null; } } return r; } } HxG_5.prototype.HxCaretSelection=function () { } HxG_5.prototype.HxCaretSelection.prototype.getSelection=function (obj) { var r, sel=null; if (obj.selectionEnd) { sel=obj.value.substring(obj.selectionStart,obj.selectionEnd); } else if (document.selection) { r=document.selection.createRange(); sel=r.text; } return sel; } HxG_5.prototype.HxCaretSelection.prototype.getSelectionR=function (obj) { var s=0, e=0, l; if (obj.selectionEnd) { s=obj.selectionStart; e=obj.selectionEnd; } else if (document.selection) { s=this.getCaretPos(obj); l=this.getSelection(obj); e=s+l.length; } s=(s < 0) ? 0 : s; e=(e > obj.value.length) ? obj.value.length : e; return{start: s, end: e}; } HxG_5.prototype.HxCaretSelection.prototype.hasSelection=function (obj) { var sel=hX_5.sel.getSelection(obj); return (sel != null && sel.length > 0); } HxG_5.prototype.HxCaretSelection.prototype.setSelection=function (obj, start, end) { if (obj.createTextRange) { var t=((obj.tagName) ? obj.tagName : hX_5._E), y=((obj.type) ? obj.type.toLowerCase() : hX_5._E); if (t==hX_5._BBODY || t==hX_5.TXT || t==hX_5.__BTN || (t==hX_5._INP && (y==hX_5._TBTN || y==hX_5._HI || y==hX_5._PWD || y==hX_5._RES || y==hX_5._SBM || y==hX_5._XT))) { var r=obj.createTextRange(); r.collapse(true); r.moveEnd('character', end); r.moveStart('character', start); r.select(); } } else if (obj.setSelectionRange) { try { obj.setSelectionRange(start, (end==null)?start:end); } catch (e) { } } } HxG_5.prototype.HxCaretSelection.prototype.getCaretPos=function (obj, hasFocus) { if (hasFocus != null && !hasFocus) if (obj.focus) obj.focus(); if (obj.selectionStart) { return obj.selectionStart; } else if (document.selection) { var n, r=document.selection.createRange(); r.moveEnd("textedit"); if (obj != r.parentElement()) n=-1; else n=obj.value.length - r.text.length; return n; } return 0; } HxG_5.prototype.HxCaretSelection.prototype.setCaretPos=function (obj, pos, pos1, defer) { if (arguments.length > 3 && defer != null && defer) { hX_5.i.deferSetFocus=obj; hX_5.i.deferSetSelect=pos; hX_5.i.deferSetSelect1=(arguments.length > 2 && pos1 != null) ? pos1 : null; hX_5.i.startDspTimerTimed("hX_5.i.selSetter", 1); } else hX_5.sel.setSelection(obj, pos, pos1); } HxG_5.prototype.HxCompImpMgr.prototype.selSetter=function(unq) { if ((typeof hX_5)=="undefined") return; hX_5.i.qKillTimer(unq); hX_5.sel.setSelection(hX_5.i.deferSetFocus, hX_5.i.deferSetSelect, ((hX_5.i.deferSetSelect1 != null)?hX_5.i.deferSetSelect1:hX_5.i.deferSetSelect)); } HxG_5.prototype.HxRect=function (obj) { this.X=this.Y=this.width=this.height=null; if (arguments.length > 0) this.setRect(obj); } HxG_5.prototype.HxRect.prototype.setRect=function (obj) { if (obj) { this.X=hX_5.g.getAbsPosLeft(obj); this.Y=hX_5.g.getAbsPosTop(obj); this.width=hX_5.g.getRendWidth(obj); this.height=hX_5.g.getRendHeight(obj); } } HxG_5.prototype.HxRect.prototype.setRectR=function (r) { if (r) { this.X=r.X; this.Y=r.Y; this.width=r.width; this.height=r.height; } } HxG_5.prototype.HxRect.prototype.incRect=function (i) { this.X+=i; this.Y+=i; this.width+=(i*2); this.height+=(i*2); } HxG_5.prototype.HxRect.prototype.hitTest=function (iX, iY) { if (this.X == null || this.Y == null || this.width == null || this.height == null) return false; var x, y; if (arguments.length == 1) { x=iX.X; y=iX.Y; } else { x=iX; y=iY; } return ((x >= this.X) && (x < (this.X+this.width)) && (y >= this.Y) && (y < (this.Y+this.height))); } HxG_5.prototype.HxGeometryMgr.prototype.toPoint=function (evt) { var cX, cY; if (hX_5.brw.isIE()) { var sBase=(hX_5.brw.isIE6_CSS()) ? document.body.parentNode : document.body; cX=evt.clientX; cY=evt.clientY; cX=cX + sBase.scrollLeft; cY=cY + sBase.scrollTop; } else { cX=evt.pageX; cY=evt.pageY; } return {X: cX, Y: cY}; } HxG_5.prototype.pseudoClipboard=function () { this.valueAsString=null; this.valueAsNumber=null; } HxG_5.prototype.HxIFrameMgr=function (thisparent) { this.p=thisparent; } HxG_5.prototype.HxIFrameMgr.prototype.create=function (doc, id, invisible, transparent) { var o=null, d; if (id && doc.createElement) { o=doc.createElement(hX_5._IFRM); o.setAttribute (hX_5._ID, id); o.setAttribute (hX_5._NAM, id); if (invisible) { o.style.position=hX_5._ABS; o.style.top=hX_5._ZPX; o.style.left=hX_5._ZPX; o.style.width=hX_5._1PX; o.style.height=hX_5._1PX; o.style.borderWidth=hX_5._ZPX; o.style.borderStyle=hX_5._NO; o.style.display=hX_5._NO; } else { o.frameBorder=hX_5._Z; o.style.display=hX_5._NO; o.style.zIndex=hX_5.BIG_ZINDEX-1; o.style.position=hX_5._ABS; o.style.top=hX_5._ZPX; o.style.left=hX_5._ZPX; o.style.borderWidth=hX_5._ZPX; o.style.borderStyle=hX_5._NO; } doc.body.appendChild(o); if (transparent) o.allowTransparency=true; d=(o.contentDocument) ? o.contentDocument : o.Document; if (d.body==undefined || d.body==null) d.write(""); } return o; } HxG_5.prototype.HxIFrameMgr.prototype.getDoc=function (obj) { return ((obj==null) ? null : ((obj.contentDocument) ? obj.contentDocument : ((obj.Document)? obj.Document: null))); } HxG_5.prototype.HxIFrameMgr.prototype.getWin=function (obj) { var d=hX_5.ifr.getDoc(obj); return ((d==null) ? null : ((d.defaultView) ? d.defaultview : ((d.parentWindow) ? d.parentWindow : null))); } HxG_5.prototype.padL=function (theNumber, toFill, pad) { var s=theNumber.toString(), i, n=toFill - s.length; for (i=0; i < n; i++) s=((pad) ? pad:hX_5._Z) + s; return s; } HxG_5.prototype.padR=function (theNumber, toFill, pad) { var s=theNumber.toString(), i, n=toFill - s.length; for (i=0; i chars) { var tstr=ostr.substr(chars); ostr=ostr.substr(0, chars); var r=(tstr.length > 2) ? (new Number(tstr.substr(0,3))) : ((tstr.length > 1) ? (new Number(tstr.substr(0,2))*10) : (new Number(tstr.charAt(0))*100)); var r1=new Number (ostr.charAt(ostr.length-1)); if (r > 500 || (r == 500 && ((Math.floor(r1/2)*2) != r1))) { if (r1+1 == 10) { var n=new Number(ostr) +1, nn=new Number(ostr); n=n.toString(); nn=nn.toString(); if (n.length > nn.length && str.charAt(0) != hX_5._Z) { ostr=hX_5._Z; oflow=true; } else { ostr=hX_5.padL(n, chars); } } else ostr=ostr.substr(0,ostr.length-1) + (r1+1); } } return {value: ostr, overflow: oflow}; } HxG_5.prototype.replaceAll=function (s, ch1, ch2) { if(ch1==ch2)return s; var o=s, t=ch1.length, i=o.indexOf(ch1); while (i >= 0 && o.length > 0) { o=(i==0) ? (ch2 + o.substr(ch1.length)) : (o.substr(0,i) + ch2 + o.substr(i+t)); i=o.indexOf(ch1); } return o; } HxG_5.prototype.rplOne=function (s, pos, ch1) { return (pos < s.length)?(s.substr(0,pos)+ch1+s.substr(pos+1)):s; } HxG_5.prototype.allTrim=function (s) { var o=hX_5.replaceAll(s, " ", hX_5._B); if (o.charAt(0) == hX_5._B) o=o.substr(1); if (o.charAt(o.length-1) == hX_5._B) o=o.substr(0,o.length-1); return o; } HxG_5.prototype.Trim=function (s) { if (null == s || 0 == s.length || !hX_5.isString(s)) return s; var o, q=0; while (q < s.length && s.substr(q,1) == hX_5._B) q++; o=s.substr(q); q=o.length-1; while (q >= 0 && o.substr(q,1) == hX_5._B) q--; return (o.slice(0,q+1)); } HxG_5.prototype.trimL=function (s, iChar) { if (null==s || 0==s.length) return s; var q=0, ch=(iChar == null) ? hX_5._B:iChar; while (q < s.length && s.substr(q,1) == ch) q++; return (s.substr(q)); } HxG_5.prototype.trimR=function (s, iChar) { if (null==s || 0==s.length) return s; var q=s.length-1, ch=(iChar == null) ? hX_5._B:iChar; while (q >= 0 && s.substr(q,1) == ch) q--; return (s.substr(0,q+1)); } HxG_5.prototype.isChar=function (c, set) { return (set.indexOf(c) >= 0) ? true : false; } HxG_5.prototype.reEncodeURI=function (uri) { var r=uri, l=r.indexOf(hX_5._QM); if (l>=0) { var s, p, p1, params=r.substr(l+1); r=r.substr(0,l+1); while (params.length > 0) { l=params.indexOf(hX_5._AMP); if (l>=0) { s=hX_5._AMP; p=params.substr(0,l); params=params.substr(l+1); } else { p=params; s=hX_5._E; params=hX_5._E; } l=p.indexOf(hX_5._EQ); if (l>=0) { p1=p.substr(l+1); p=p.substr(0,l); p1=decodeURIComponent(p1); p1=hX_5._EQ+this.encode(p1); } else { p1=hX_5._E; } p=decodeURIComponent(p); r=r+this.encode(p)+p1+s; } } return r; } HxG_5.prototype.encodeURIParams=function (base, nv) { var r=hX_5._E, i, hasQ=(base!=null && (base.indexOf(hX_5._QM)>=0)); for (i=0; i9 && node.id.substr(node.id.length-10)=="_HXB_GHOST") return false; } return true; } if (node && node.nodeType!=undefined && node.nodeType == hX_5.ELEMENT_NODE) { if (node.tabIndex!=undefined && node.tabIndex > 0) return true; } return false; } HxG_5.prototype.valuableElements=null; HxG_5.prototype.getValuableElements=function () { if (hX_5.valuableElements == null) hX_5.valuableElements=[ new hX_5.tagListItem(hX_5._INP,null), new hX_5.tagListItem(hX_5._SEL,null), new hX_5.tagListItem(hX_5._TXT,null)]; return hX_5.valuableElements; } HxG_5.prototype.isValuable=function (o, extended) { var lc, node=hX_5.getElementById(o); if (node!=null) { if (hX_5.isTag(node, hX_5.getValuableElements())) { if (node.tagName==hX_5._INP) { lc=node.type.toLowerCase(); if (!(lc==hX_5._HI && extended)) if (lc!=hX_5._XT && lc!=hX_5._RAD && lc!=hX_5._CHK && lc!=hX_5._PWD) return false; if (node.id && node.id.length>9 && node.id.substr(node.id.length-10)=="_HXB_GHOST") return false; if (extended && node.disabled!=undefined && node.disabled) return false; } return true; } else if (extended && node.tagName!=undefined && node.tagName==hX_5._TAB && node.id!=undefined && node.id!=null) { var c, p=node.parentNode; while (p!=null && p.tagName!=undefined && p.tagName!=hX_5._FRM) p=p.parentNode; if (p && p.tagName!=undefined && p.tagName==hX_5._FRM) { c=p.elements[node.id]; c=(c.length==undefined)?[c]:c; if (hX_5.isObject(c) && c.length!=undefined) { lc=c[0].type.toLowerCase(); if (lc==hX_5._RAD || lc==hX_5._CHK) return true; } } } } return false; } HxG_5.prototype.getValuableValue=function (o, submittable, extended) { var r=null, lc, i, j, p, c, node=hX_5.getElementById(o); if (node!=null) { if (extended && node.tagName!=undefined && node.tagName==hX_5._TAB && node.id!=undefined && node.id!=null) { if (!submittable || !node.disabled) { p=node.parentNode; while (p!=null && p.tagName!=undefined && p.tagName!=hX_5._FRM) p=p.parentNode; if (p && p.tagName!=undefined && p.tagName==hX_5._FRM) { c=p.elements[node.id]; c=(c.length==undefined)?[c]:c; if (hX_5.isObject(c) && c.length!=undefined) { lc=c[0].type.toLowerCase(); if (lc==hX_5._RAD || lc==hX_5._CHK) node=c[0]; } } } } c=(node.name!=undefined && node.name!=hX_5._E && node.form!=undefined) ? node.form.elements[node.name] : [node]; c=(c==null)?[node]:((c.length==undefined)?[c]:c); for (j=0; j0)?node.value:"on"):null); } else { if (hX_5.isString(r)) r=[r]; if (node.checked) r.push((node.value!=undefined && node.value.length>0)?node.value:"on"); } } else if (lc==hX_5._RAD) { if (r==null) r=(node.checked) ? ((node.value!=undefined && node.value.length>0)?node.value:"on") : null; } } else if (node.tagName==hX_5._OPT) { if (!submittable || !node.parentNode.disabled) { if (r==null) { r=((node.selected)?((node.value!=undefined && node.value.length>0)?node.value:"on"):null); } else { if (hX_5.isString(r)) r=[r]; if (node.selected) r.push((node.value!=undefined && node.value.length>0)?node.value:"on"); } } } } } } return r; } HxG_5.prototype.setValuableValue=function (o, v) { var r=false, lc, i, j, p, c, node=hX_5.getElementById(o); if (node!=null) { if (node.tagName!=undefined && node.tagName==hX_5._TAB && node.id!=undefined && node.id!=null) { p=node.parentNode; while (p!=null && p.tagName!=undefined && p.tagName!=hX_5._FRM) p=p.parentNode; if (p && p.tagName!=undefined && p.tagName==hX_5._FRM) { c=p.elements[node.id]; c=(c.length==undefined)?[c]:c; if (hX_5.isObject(c) && c.length!=undefined) { lc=c[0].type.toLowerCase(); if (lc==hX_5._RAD || lc==hX_5._CHK) node=c[0]; } } } c=(node.name!=undefined && node.name!=hX_5._E && node.form!=undefined) ? node.form.elements[node.name] : [node]; c=(c.length==undefined)?[c]:c; for (j=0; j0 && node.value==v)); } else { if (node.value!=undefined && node.value.length>0) { for (i=0; !node.checked && i0) { for (i=0; !node.selected && i=0) return true; c=c.parentNode; } return false; } HxG_5.prototype.isObject=function(obj) { return (typeof(obj) == "object"); } HxG_5.prototype.isFunction=function(obj) { return (typeof(obj) == "function"); } HxG_5.prototype.isString=function(obj) { return (typeof(obj) == "string"); } HxG_5.prototype.isNumber=function(obj) { return (typeof(obj) == "number"); } HxG_5.prototype.isArray=function(obj) { return (typeof(obj) == "object" && obj.length!=undefined && obj.push!=undefined); } HxG_5.prototype.isUnDef=function(objt) { return (objt == "undefined"); } HxG_5.prototype.isDef=function(objt) { return (objt != "undefined"); } HxG_5.prototype.getKeyCode=function(ev) { return ((ev.keyCode) ? ev.keyCode : ev.which); } HxG_5.prototype.isFcnKey=function(evt) { var code=hX_5.getKeyCode(evt); code=(code && (code != 0)) ? code : -1; if (((code < 48) && (code != 32 && code != 9 && code != 13)) || (code >= 91 && code <= 93) || (code >= 112 && code <= 123) || (code >= 124 && code <= 185) || (code >= 223)) return true; return false; } HxG_5.prototype.getChrCode=function(ev) { return (String.fromCharCode ((ev.charCode) ? ev.charCode : ev.keyCode)); } HxG_5.prototype.setChrCode=function(ev, c) { if (ev.charCode) ev.charCode=c.charCodeAt(0); else if (ev.keyCode) ev.keyCode=c.charCodeAt(0); } HxG_5.prototype.isFunctionKey=function(keyCode) { return (112 <= keyCode && keyCode << 123); } HxG_5.prototype.evtGetTarget=function (evt) { return ((evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null)); } HxG_5.prototype.getFirstClassName=function (inobj) { var r=null, obj=hX_5.getElementById(inobj); if (obj && obj.className) { r=hX_5.allTrim(obj.className); if (r.indexOf(hX_5._B) > 0) r=r.substr(0,r.indexOf(hX_5._B)); } return r; } HxG_5.prototype.appendClassName=function (inobj, name, remove, prepend) { var obj=hX_5.getElementById(inobj), c=hX_5._B + hX_5.allTrim(obj.className); if (remove && remove.length > 0 && c.length > 0) { var nc, r=hX_5._B + remove, k=c.indexOf(r); while (k >= 0) { nc=c.substr(k+1); c=c.substr(0,k); k=nc.indexOf(hX_5._B); nc=(k<0) ? hX_5._E : nc.substr(k); c=c + hX_5._B + nc; c=hX_5._B + hX_5.allTrim(c); k=c.indexOf(r); } } c=hX_5.allTrim(c); if (prepend!=null) c=(c.length > 0) ? (name + hX_5._B + c) : name; else c=(c.length > 0) ? (c + hX_5._B + name) : name; if (obj.className != c) obj.className=c; } HxG_5.prototype.stripClassSuffix=function (c, suff) { if (c && suff && suff.length && suff.length > 0) { var i, r=c, l=suff.length, ll=c.length; for (i=0; i < l; i++) { if (suff[i].length < c.length && c.substr(ll-suff[i].length) == suff[i]) return c.substr(0,ll-suff[i].length); } } return r; } HxG_5.prototype.isClassDefined=function (testname) { if (hX_5.CSSSelectors == null) { var sheets, rulelist, rule, selector, i, j, k, l=document.styleSheets.length; if (hX_5.CSSSelectors) delete (hX_5.CSSSelectors); hX_5.CSSSelectors=[]; for (i=0; i < l; i++) { sheets=document.styleSheets[i]; rulelist=(sheets.cssRules!=undefined) ? sheets.cssRules : ((sheets.rules!=undefined) ? sheets.rules : null); if (rulelist != null) { for (j=0; j < rulelist.length; j++) { rule=rulelist[j].selectorText; while (rule && rule.length > 0) { k=rule.indexOf(hX_5._C); if (k < 0) { selector=rule; rule=hX_5._E; } else { selector=rule.substr(0,k); rule=rule.substr(k+1); } selector=hX_5.allTrim(selector); if (selector.length > 0 && selector.indexOf(hX_5._B) < 0 && selector.charAt(0) == hX_5._P) hX_5.CSSSelectors[selector]=selector; } } } } } if (hX_5.CSSSelectors[hX_5._P + testname]!=null) return true; return false; } HxG_5.prototype.scratchImg=null; HxG_5.prototype.scratchImg1=null; HxG_5.prototype.scratchImg2=null; HxG_5.prototype.scratchImg3=null; HxG_5.prototype.scratchImg4=null; HxG_5.prototype.getClassStyle=function (cl, prop) { if (cl && cl.length > 0) { if (this.scratchImg == null) { var img=hX_5.getElementById("HX_SCRATCH_IMG"); if (!img) { img=document.createElement(hX_5._DIV); img.setAttribute(hX_5._ID, "HX_SCRATCH_IMG"); img.style.display=hX_5._NO; img.style.width=hX_5._ZPX; img=document.body.appendChild(img); } this.scratchImg=img; } this.scratchImg.style.width=hX_5._E; this.scratchImg.className=cl; var bi=hX_5.g.getP(this.scratchImg, prop); this.scratchImg.style.width=hX_5._ZPX; if (prop == hX_5._BIMG) { if (bi && bi.length && bi.length > 0 && bi != hX_5._NO) return (this.stripURL(bi)); } else return bi; } return null; } HxG_5.prototype.getEvalStyle=function (obj, prop, value) { if (obj && prop && value) { if (this.scratchImg1 == null) { var img=hX_5.getElementById("HX_SCRATCH_IMG1"); if (!img) { img=document.createElement(hX_5._DIV); img.setAttribute(hX_5._ID, "HX_SCRATCH_IMG1"); img.style.display=hX_5._NO; img.style.width=hX_5._ZPX; img=document.body.appendChild(img); } this.scratchImg1=img; } hX_5.g.setP(this.scratchImg1, prop, value); return (hX_5.g.getP(this.scratchImg1, prop)); } return null; } HxG_5.prototype.getItemSize=function (obj, doRow) { if (obj) { var img, w, h, o; if (this.scratchImg2 == null) { img=hX_5.getElementById("HX_SCRATCH_IMG2"); if (!img) { img=document.createElement(hX_5._DIV); img.setAttribute(hX_5._ID, "HX_SCRATCH_IMG2"); img.style.display=hX_5._NO; img.style.width=hX_5._ZPX; img=document.body.appendChild(img); } this.scratchImg2=img; } this.scratchImg2.appendChild(obj); this.scratchImg2.style.width=hX_5._E; this.scratchImg2.style.height=hX_5._E; this.scratchImg2.style.display=hX_5._E; o=(doRow)?((obj.rows!=undefined && obj.rows.length>0)?obj.rows[0]:null):obj; if (o) { w=parseInt(o.offsetWidth,10); h=parseInt(o.offsetHeight,10); } this.scratchImg2.style.display=hX_5._NO; this.scratchImg2.style.width=hX_5._ZPX; this.scratchImg2.removeChild(obj); return (o) ? {H:h, W:w} : null; } return null; } HxG_5.prototype.toPixels=function (obj,sz) { var r=null, img,div; if (obj!=null) obj=hX_5.getElementById(obj); if (obj!= null && sz && sz.length!=undefined && sz.length > 0) { if (this.scratchImg4 == null) { img=hX_5.getElementById("HX_SCRATCH_IMG4"); if (!img) { img=document.createElement(hX_5._DIV); img.setAttribute(hX_5._ID, "HX_SCRATCH_IMG4"); img.style.display=hX_5._NO; img.style.margin=hX_5._ZPX; img.style.padding=hX_5._ZPX; img.style.borderWidth=hX_5._ZPX; img=document.body.appendChild(img); div=document.createElement(hX_5._INP); div.setAttribute("type","button"); div.style.margin=hX_5._ZPX; div.style.padding=hX_5._ZPX; div.style.borderWidth=hX_5._ZPX; div=img.appendChild(div); } this.scratchImg4=img; } r=parseInt(sz,10); if (r==null || isNaN(r) || !hX_5.isNumber(r) || sz.indexOf(hX_5._PCT)>=0) r=null else { div=this.scratchImg4; img=div.firstChild; div.style.fontFamily=hX_5.g.getP(obj,"font-family"); div.style.fontSize=hX_5.g.getP(obj,"font-size"); try { img.style.width=sz; div.style.display=hX_5._E; r=hX_5.g.getRendWidth(img); div.style.display=hX_5._NO; } catch(e) { r=null; } } } return r; } HxG_5.prototype.getScrollbarWidth=function() { var img=null, ta=null, w=0; if (this.scratchImg3 == null) { img=hX_5.getElementById("HX_SCRATCH_IMG3"); if (!img) { img=document.createElement(hX_5._DIV); img.setAttribute(hX_5._ID, "HX_SCRATCH_IMG3"); img.style.display=hX_5._NO; img.style.width=hX_5._ZPX; this.scratchImg3=document.body.appendChild(img); } if (img.firstChild==null) { ta=document.createElement(hX_5._TXT); ta.cols="20"; ta.rows="2"; img.appendChild(ta); } } img=this.scratchImg3; ta=img.firstChild; ta.style.overflow="hidden"; img.style.width="300"+hX_5._PX; img.style.display=hX_5._BLK; w=ta.clientHeight; ta.style.overflow="scroll"; w -= ta.clientHeight; img.style.width=hX_5._E; img.style.display=hX_5._NO; return w; } HxG_5.prototype.stripURL=function (url) { var u=url; if ((u.substr(0,4).toLowerCase() == hX_5._URL) || (u.substr(0,4).toLowerCase() == hX_5._URI)) { u=u.substr(4); u=u.substr(0,u.length-1); u=hX_5.replaceAll(u, hX_5._DQT,hX_5._E); u=hX_5.replaceAll(u, hX_5._SQT,hX_5._E); } return u; } HxG_5.prototype.getIHTML=function (obj) { return ((obj && obj.innerHTML) ? obj.innerHTML : null); } HxG_5.prototype.setIHTML=function (obj, html, doc) { if (!obj) return; if (hX_5.brw.isNavOrMoz() && !hX_5.brw.hasInnerHTML()) { while (obj.lastChild) obj.removeChild(obj.lastChild); hX_5.htmlParseRun(obj, html, false, doc); } else obj.innerHTML=html; } HxG_5.prototype.htmlParseRun=function(root, s, nohead, Doc) { var doc=((Doc!=null)?Doc:window.document), ch=0, chL, ch1, ch2, ch3, i, j, txt, tx1, l=s.length, sN, sV, aV, node, sscr="", sty="style", obj=root, objStack=[root], inHead=((nohead!=null) && nohead); try { while (ch!=null && ch=0) { ch1=0; tx1=hX_5._E; while (ch10) { if (ch2.charAt(0)==hX_5._LB) { ch2=parseInt(ch2.substr(1),10); tx1=tx1 + String.fromCharCode(ch2) } else { ch2=ch2.toLowerCase(); for (ch3=0;ch3=0) tx1=tx1 + hX_5.AMP_ABBS[0][1]; } } } else { tx1=tx1+txt.charAt(ch1); } ch1++; } txt=tx1; } if (!inHead) obj.appendChild(doc.createTextNode(txt)); } chV=hX_5.htmlParseTag(s, ch, true); if (chV==null) { ch=null; } else { ch=chV.ch; if (chV.tag.length==0) { } else { if (chV.tag.charAt(0)==hX_5._SL) { if (!inHead) { if (hX_5.htmlTagIsContainer(chV.tag)) { if (objStack.length>1) { objStack.pop(); obj=objStack[objStack.length-1]; } else { throw new Error(hX_5._E); } } } } else { if (!inHead) { if (chV.tag==hX_5._SCR) { ch1=s.indexOf(sscr.toUpperCase(),ch); ch2=s.indexOf(sscr.toLowerCase(),ch); ch3=s.indexOf(sscr,ch); ch2=(ch3<0)?ch2:((ch2<0)?ch3:Math.min(ch2,ch3)); ch1=(ch2<0)?ch1:((ch1<0)?ch2:Math.min(ch2,ch1)); if (ch1<0) { ch=null; } else { node=doc.createElement(chV.tag); for (i=0; i< chV.attN.length; i++) node.setAttribute(chV.attN[i], chV.attV[i]); node.text=s.substring(ch,ch1); obj.appendChild(node); ch=ch1+sscr.length; } } else { node=doc.createElement(chV.tag); for (i=0; i< chV.attN.length; i++) { if (chV.attN[i]==sty) { aV=chV.attV[i]; node.setAttribute(chV.attN[i], aV); while (aV.length > 0) { j=aV.indexOf(hX_5._SM); if (j >= 0) { sN=hX_5.Trim(aV.substr(0,j)); aV=hX_5.Trim(aV.substr(j+1)); } else { sN=aV; aV=hX_5._E; } if (sN.length > 0) { sV=hX_5._E; j=sN.indexOf(hX_5._CL); if (j >= 0) { sV=hX_5.Trim(sN.substr(j+1)); sN=hX_5.Trim(sN.substr(0,j)); } if (doc.body.currentStyle) { node.style.setAttribute(hX_5.g.CSStagToDOMtag(sN), sV); } else { node.style.setProperty(sN, sV, hX_5._E); } } } } else { if ((chV.attV[i])==hX_5._E) node.setAttribute(chV.attN[i], true); else node.setAttribute(chV.attN[i], chV.attV[i]); } } obj.appendChild(node); if (hX_5.htmlTagIsContainer(chV.tag) && !chV.ended) { objStack.push(node); obj=node; } } } else if (chV.tag==hX_5._BBODY) inHead=false; } } } } } catch (e) { if (!inHead && root && doc) root.appendChild(doc.createTextNode("ERROR")); } } HxG_5.prototype.htmlTagIsContainer=function(t) { return (!(t == hX_5._BR || t==hX_5._HR || t == hX_5._INP || t == hX_5._IMG)); } HxG_5.prototype.htmlSkipWS=function(s, ch) { var c=s.charCodeAt(ch), l=s.length; while (ch=l || s.charAt(ch)!=hX_5._LT) return null; ch++; if (s.charAt(ch)==hX_5._EX) { while (ch 1 && btn2label) ? btn2label : hX_5._E; this.btngraphic=(hinky) ? hinky : hX_5.R_IMG_HINKIES; this.blurIsOn=(blurIsOn) ? blurIsOn : false; this.inputIsButton=(inputIsButton!=null)? inputIsButton : 0; this.spanD=(hX_5.brw.isIE()) ? hX_5._INB : hX_5._INL; this.borderSystemColor=function (obj) {return ("InactiveCaption"); } this.borderCalcColor=function (obj) { var c=hX_5.g.getP(obj, hX_5._BRCOR); return ((c.length > 0 && c.indexOf(hX_5._B) < 0 && c==hX_5.g.getP (obj, hX_5._COR)) ? hX_5._E : hX_5.g.getP(obj, hX_5._BRRCL)); } this.stStaticPos = this.stPosition = this.stResizable=null; this.stIsXP=false; this.stBtnBorderStyle = this.stBtnBackColor = this.stBtnBorderColor = this.stBtnBorderWidth=hX_5._E; this.stBtnOffset=this.stElemOffset=this.stMgnLeft=this.stMgnTop=0; this.dupe=this.btn1=this.btn2=this.img1=this.img2=this.iSpn=this.oSpn=null; this.valid=false; this.HTMLcopied=this.addedResizeMonitor=false; this.addedPropMonitor=null; this.styleProps=[]; this.styleValues=[]; this.calcValues=calcValues; this.saveValues=saveValues; this.getValue=function (v) { return this.styleValues[v]; } function saveValues (obj) { var p=hX_5.g.getP(obj, hX_5._POS); this.styleProps[hX_5._POS]=(p && p.length > 0 && p != hX_5._AUT) ? p : null; p=hX_5.g.getP(obj, hX_5._MGNL); this.styleProps[hX_5._MGNL]=(p && p.length > 0 && p != hX_5._AUT) ? p : null; p=hX_5.g.getP(obj, hX_5._MGNR); this.styleProps[hX_5._MGNR]=(p && p.length > 0 && p != hX_5._AUT) ? p : null; p=hX_5.g.getP(obj, hX_5._MGNT); this.styleProps[hX_5._MGNT]=(p && p.length > 0 && p != hX_5._AUT) ? p : null; p=hX_5.g.getP(obj, hX_5._MGNB); this.styleProps[hX_5._MGNB]=(p && p.length > 0 && p != hX_5._AUT) ? p : null; p=hX_5.g.getP(obj, hX_5._LFT); this.styleProps[hX_5._LFT]=(p && p.length > 0 && p != hX_5._AUT) ? p : null; p=hX_5.g.getP(obj, hX_5._RGT); this.styleProps[hX_5._RGT]=(p && p.length > 0 && p != hX_5._AUT) ? p : null; p=hX_5.g.getP(obj, hX_5._TOP); this.styleProps[hX_5._TOP]=(p && p.length > 0 && p != hX_5._AUT) ? p : null; p=hX_5.g.getP(obj, hX_5._BOT); this.styleProps[hX_5._BOT]=(p && p.length > 0 && p != hX_5._AUT) ? p : null; } function calcValues (cl) { this.styleValues[hX_5._POS]=(this.styleProps[hX_5._POS] != null) ? this.styleProps[hX_5._POS] : hX_5.getClassStyle(cl, hX_5._POS); this.styleValues[hX_5._MGNL]= (this.styleProps[hX_5._MGNL] != null) ? this.styleProps[hX_5._MGNL] : hX_5.getClassStyle(cl, hX_5._MGNL); this.styleValues[hX_5._MGNR]= (this.styleProps[hX_5._MGNR] != null) ? this.styleProps[hX_5._MGNR] : hX_5.getClassStyle(cl, hX_5._MGNR); this.styleValues[hX_5._MGNT]= (this.styleProps[hX_5._MGNT] != null) ? this.styleProps[hX_5._MGNT] : hX_5.getClassStyle(cl, hX_5._MGNT); this.styleValues[hX_5._MGNB]= (this.styleProps[hX_5._MGNB] != null) ? this.styleProps[hX_5._MGNB] : hX_5.getClassStyle(cl, hX_5._MGNB); this.styleValues[hX_5._LFT]=(this.styleProps[hX_5._LFT] != null) ? this.styleProps[hX_5._LFT] : hX_5.getClassStyle(cl, hX_5._LFT); this.styleValues[hX_5._RGT]=(this.styleProps[hX_5._RGT] != null) ? this.styleProps[hX_5._RGT] : hX_5.getClassStyle(cl, hX_5._RGT); this.styleValues[hX_5._TOP]=(this.styleProps[hX_5._TOP] != null) ? this.styleProps[hX_5._TOP] : hX_5.getClassStyle(cl, hX_5._TOP); this.styleValues[hX_5._BOT]=(this.styleProps[hX_5._BOT] != null) ? this.styleProps[hX_5._BOT] : hX_5.getClassStyle(cl, hX_5._BOT); } var v, attr, tag, c=this.c, parent=c.DOMobj.parentNode; hX_5.attachComponentEvent (c.DOMobj, hX_5._onKD, hX_5._lN); hX_5.attachComponentEvent (c.DOMobj, hX_5._onF, hX_5._lN); if (this.inputIsButton!=0) { hX_5.attachComponentEvent (c.DOMobj, hX_5._onB, hX_5._lN); hX_5.attachComponentEvent (c.DOMobj, hX_5._onKP, hX_5._lN); } if (hX_5.brw.isNavOrMoz()) { tag=document.createElement(hX_5._INP); tag.setAttribute(hX_5._TYP, hX_5._XT); tag.setAttribute(hX_5._ID, c.DOMobj.id+"_HXB_GHOST"); tag.className=c.DOMobj.className; tag.dir=c.DOMobj.dir; tag.disabled=c.DOMobj.disabled; tag.readOnly=c.DOMobj.readOnly; tag.language=c.DOMobj.language; tag.tabIndex=-1; if (c.DOMobj.style.cssText && c.DOMobj.style.cssText.length > 0) tag.style.cssText=c.DOMobj.style.cssText; tag.style.display=hX_5._NO; this.dupe=parent.insertBefore(tag, c.DOMobj); } tag=document.createElement(hX_5._SPN); tag.setAttribute (hX_5._ID, c.DOMobj.id + "_outerspan"); tag.style.position=hX_5._REL; tag.style.display=this.spanD; this.oSpn=parent.insertBefore(tag, c.DOMobj); this.oSpn.appendChild(c.DOMobj); tag=document.createElement(hX_5._SPN); tag.style.position=hX_5._ABS; tag.style.padding=tag.style.margin=hX_5._ZPX; tag.style.display=this.spanD; tag.style.textIndent=hX_5._ZPX; this.iSpn=this.oSpn.appendChild(tag); tag=document.createElement(hX_5._BTN); tag.setAttribute(hX_5._ID, c.DOMobj.id+"_1_HXB_HPBTN"); tag.setAttribute(hX_5._TYP, hX_5._TBTN); tag.setAttribute(hX_5._TTL, this.btn1label); tag.style.position=hX_5._ABS; tag.style.padding=tag.style.margin=hX_5._ZPX; tag.style.fontSize=hX_5._1PX; tag.onclick=tag.ondblclick=tag.onmousedown=tag.onmouseup=tag.onmouseout=tag.onkeydown=tag.onkeypress=tag.onkeyup=this.dispatchBtnComponent; if (this.blurIsOn) tag.onblur=this.dispatchBtnComponent; this.btn1=this.iSpn.appendChild(tag); tag=document.createElement(hX_5._IMG); tag.setAttribute(hX_5._SRC, c.r.getURL(c.p.R_IMG_SPACER)); tag.setAttribute(hX_5._BRD, hX_5._Z); tag.style.fontSize=hX_5._1PX; tag.style.verticalAlign="baseline"; tag.style.padding=tag.style.margin=hX_5._ZPX; tag.setAttribute(hX_5._ALT, this.btn1label); this.img1 =this.btn1.appendChild(tag); this.valid=(this.oSpn && this.iSpn && this.btn1 && this.img1); if (this.btnOrg == 2) { tag=document.createElement(hX_5._BTN); tag.setAttribute(hX_5._ID, c.DOMobj.id+"_2_HXB_HPBTN"); tag.setAttribute(hX_5._TYP, hX_5._TBTN); tag.setAttribute(hX_5._TTL, this.btn2label); tag.style.position=hX_5._ABS; tag.style.padding=tag.style.margin=hX_5._ZPX; tag.style.fontSize=hX_5._1PX; tag.onclick=tag.ondblclick=tag.onmousedown=tag.onmouseup=tag.onmouseout=tag.onkeydown=tag.onkeypress=tag.onkeyup=this.dispatchBtnComponent; if (this.blurIsOn) tag.onblur=this.dispatchBtnComponent; this.btn2=this.iSpn.appendChild(tag); tag=document.createElement(hX_5._IMG); tag.setAttribute(hX_5._SRC, c.r.getURL(c.p.R_IMG_SPACER)); tag.setAttribute(hX_5._BRD, hX_5._Z); tag.style.fontSize=hX_5._1PX; tag.style.padding=tag.style.margin=hX_5._ZPX; tag.style.verticalAlign="baseline"; tag.setAttribute(hX_5._ALT, this.btn2label); this.img2=this.btn2.appendChild(tag); this.valid=this.valid || (this.btn2 && this.img2); } this.inpDiv=this.inpSubDiv=null; if (this.inputIsButton!=0) { tag=document.createElement(hX_5._DIV); tag.style.position=hX_5._ABS; tag.style.padding=tag.style.margin=hX_5._ZPX; tag.style.borderWidth=hX_5._2PX; tag.style.borderColor=hX_5.CLR_BCK; tag.style.backgroundColor=hX_5.CLR_BCK; tag.style.borderStyle=hX_5._SLD; tag.style.display=hX_5._E; tag.style.fontSize= hX_5._1PX; tag.onclick=tag.ondblclick=tag.onmousedown=tag.onmouseup=tag.onmouseout=this.dispatchBtnComponent; if (this.blurIsOn) tag.onblur=this.dispatchBtnComponent; this.inpDiv=this.oSpn.appendChild(tag); tag=document.createElement(hX_5._DIV); tag.style.position=hX_5._ABS; tag.style.padding=tag.style.margin=hX_5._ZPX; tag.style.display=hX_5._E; tag.style.fontSize= tag.style.borderWidth=hX_5._1PX; tag.style.borderColor=hX_5.CLR_SHDW; tag.style.borderStyle=hX_5._SLD; tag.onclick=tag.ondblclick=tag.onmousedown=tag.onmouseup=tag.onmouseout=this.dispatchBtnComponent; if (this.blurIsOn) tag.onblur=this.dispatchBtnComponent; this.inpSubDiv=this.inpDiv.appendChild(tag); this.valid=this.valid || (this.inpDiv!=null && this.inpSubDiv!=null); } } HxG_5.prototype.JSFSubButton.prototype.destroy=function () { if (this.btn1) this.btn1.onblur=this.btn1.onclick=this.btn1.ondblclick=this.btn1.onmousedown=this.btn1.onmouseup=this.btn1.onmouseout=this.btn1.onkeydown=this.btn1.onkeypress=this.btn1.onkeyup=null; if (this.btn2) this.btn2.onblur=this.btn2.onclick=this.btn2.ondblclick=this.btn2.onmousedown=this.btn2.onmouseup=this.btn2.onmouseout=this.btn2.onkeydown=this.btn2.onkeypress=this.btn2.onkeyup=null; if (this.inpDiv) this.inpDiv.onblur=this.inpDiv.onclick=this.inpDiv.ondblclick=this.inpDiv.onmousedown=this.inpDiv.onmouseup=this.inpDiv.onmouseout=null; if (this.inpSubDiv) this.inpSubDiv.onblur=this.inpSubDiv.onclick=this.inpSubDiv.ondblclick=this.inpSubDiv.onmousedown=this.inpSubDiv.onmouseup=this.inpSubDiv.onmouseout=null; if (this.addedResizeMonitor) hX_5.i.removeResizeMonitor(this.oSpn); if (this.addedPropMonitor) hX_5.i.removeMonitor(this.c.DOMobj); if (this.styleProps) while (this.styleProps.length > 0) this.styleProps.pop(); if (this.styleValues) while (this.styleValues.length > 0) this.styleValues.pop(); return true; } HxG_5.prototype.JSFSubButton.prototype.size=function (resizeOnly) { var c=this.c, prop, elemH, elemW, i; if (!this.valid) return false; if (!this.HTMLcopied) this.saveValues(this.c.DOMobj); if (this.oSpn && this.c.DOMobj.parentNode.id==undefined || this.c.DOMobj.parentNode.id != (this.c.DOMobj.id + "_outerspan")) { this.c.DOMobj.parentNode.insertBefore(this.oSpn, this.c.DOMobj); var ff=this.oSpn.firstChild; if (this.dupe) ff=ff.nextSibling; if (ff) this.oSpn.insertBefore(this.c.DOMobj, ff); } if (resizeOnly) { elemW=this.oSpn.offsetWidth; hX_5.g.setP(c.DOMobj, hX_5._WD, ((elemW - this.stElemOffset) > 0) ? ((elemW - this.stElemOffset) + hX_5._PX) : (hX_5._ZPX)); hX_5.g.setP(this.iSpn, hX_5._LFT, ((elemW - this.stBtnOffset) > 0) ? ((elemW - this.stBtnOffset-1) + hX_5._PX) : (hX_5._ZPX)); this.sizeColorArea(); return true; } var bDisabled=c.DOMobj.disabled; var bReadOnly=c.DOMobj.readOnly; var bHideFocus=(c.DOMobj.hideFocus) ? c.DOMobj.hideFocus : false; var bNoSelect=(c.DOMobj.unselectable) ? c.DOMobj.unselectable : false; var bDisplay=hX_5.g.getP(c.DOMobj, hX_5._DSP) != hX_5._NO; var bVisible=hX_5.g.getP(c.DOMobj, hX_5._VIS); var taborder=(c.DOMobj.tabIndex) ? c.DOMobj.tabIndex : 0; var zIndex=hX_5.g.getP(c.DOMobj, hX_5._ZND); taborder=(hX_5.brw.isIE()) ? taborder : ((taborder < 0) ? 0 : taborder); zIndex=hX_5.isString(zIndex) ? (((zIndex==hX_5._AUT))?0:parseInt(zIndex)) : zIndex; elemH=c.DOMobj.offsetHeight; elemW=c.DOMobj.offsetWidth; if (elemH==0 || elemW==0) { if (elemW==0 && !this.HTMLcopied) { prop=hX_5.g.getP(c.DOMobj, hX_5._WD); bDisplay=(prop.indexOf(hX_5._PCT) >= 0); } else bDisplay=false; } if (!bDisplay) { if (elemH!=0 && elemW!=0) this.oSpn.style.display=hX_5._NO this.btn1.style.display=this.iSpn.style.display=hX_5._NO; if (this.btn2) this.btn2.style.display=hX_5._NO; return true; } hX_5.g.setP(this.iSpn, hX_5._DSP, this.spanD); hX_5.g.setP(this.iSpn, hX_5._VIS, bVisible); hX_5.g.setP(this.oSpn, hX_5._DSP, this.spanD); hX_5.g.setP(this.oSpn, hX_5._VIS, bVisible); hX_5.g.setP(this.oSpn, hX_5._TXA, hX_5._LFT); if (this.oSpn.hideFocus && this.oSpn.hideFocus != bHideFocus) this.oSpn.HideFocus=bHideFocus; if (this.oSpn.unselectable && this.oSpn.unselectable != bNoSelect) this.oSpn.unselectable=bNoSelect; if (hX_5.brw.isIE()) if (this.oSpn.disabled != bDisabled) this.oSpn.disabled=bDisabled; this.calcValues(c.DOMobj.className); prop=this.getValue(hX_5._POS); this.stStaticPos=(this.stStaticPos != null) ? this.stStaticPos : ((hX_5.brw.isIE() && (prop=="static"))); this.stPosition=(prop != hX_5._ABS) ? hX_5._REL : prop; hX_5.g.setP(this.oSpn, hX_5._POS, this.stPosition); hX_5.g.setP(this.oSpn, hX_5._MGNL, this.getValue(hX_5._MGNL)); hX_5.g.setP(this.oSpn, hX_5._MGNR, this.getValue(hX_5._MGNR)); hX_5.g.setP(c.DOMobj, hX_5._MGNL, hX_5._ZPX); hX_5.g.setP(c.DOMobj, hX_5._MGNR, hX_5._ZPX); if (hX_5.brw.isIE()) { hX_5.g.setP(this.oSpn, hX_5._MGNT,this.getValue(hX_5._MGNT)); hX_5.g.setP(this.oSpn, hX_5._MGNB,this.getValue(hX_5._MGNB)); hX_5.g.setP(c.DOMobj, hX_5._MGNT,hX_5._ZPX); hX_5.g.setP(c.DOMobj, hX_5._MGNB,hX_5._ZPX); } if (this.stStaticPos) { hX_5.g.setP(this.oSpn, hX_5._LFT, hX_5._E); hX_5.g.setP(this.oSpn, hX_5._RGT, hX_5._E); hX_5.g.setP(this.oSpn, hX_5._TOP, hX_5._E); hX_5.g.setP(this.oSpn, hX_5._BOT, hX_5._E); } else { hX_5.g.setP(this.oSpn, hX_5._LFT, this.getValue(hX_5._LFT)); hX_5.g.setP(this.oSpn, hX_5._RGT, this.getValue(hX_5._RGT)); hX_5.g.setP(this.oSpn, hX_5._TOP, this.getValue(hX_5._TOP)); hX_5.g.setP(this.oSpn, hX_5._BOT, this.getValue(hX_5._BOT)); } hX_5.g.setP(c.DOMobj, hX_5._POS, hX_5._REL); hX_5.g.setP(c.DOMobj, hX_5._LFT, hX_5._E); hX_5.g.setP(c.DOMobj, hX_5._RGT, hX_5._E); hX_5.g.setP(c.DOMobj, hX_5._TOP, hX_5._E); hX_5.g.setP(c.DOMobj, hX_5._BOT, hX_5._E); if (zIndex!=null && zIndex > 0) { hX_5.g.setP(this.oSpn, hX_5._ZND, zIndex+hX_5._E); hX_5.g.setP(this.iSpn, hX_5._ZND, zIndex+hX_5._E); } if (this.inpDiv) hX_5.g.setP(this.inpDiv, hX_5._ZND, (zIndex==null || zIndex==0)?hX_5._1:(zIndex+1)+hX_5._E); hX_5.g.copyP (c.DOMobj, this.iSpn, "direction"); var isNowXP=hX_5.g.testXPBorder(c.DOMobj, hX_5._INS); if (!this.HTMLcopied) this.stIsXP=isNowXP; var outBtn=(this.btnBorder >= 0 || this.stIsXP); var brdL=hX_5.g.parseBorder(c.DOMobj, hX_5._LFT, 2), brdR=hX_5.g.parseBorder(c.DOMobj, hX_5._RGT, 2); var brdT=hX_5.g.parseBorder(c.DOMobj, hX_5._TOP, 2), brdB=hX_5.g.parseBorder(c.DOMobj, hX_5._BOT, 2); if (outBtn) { hX_5.g.setP(this.iSpn, hX_5._BCOR, hX_5._TRN); hX_5.g.setP(this.iSpn, hX_5._BRWID,hX_5._ZPX); this.stBtnBorderWidth=1; this.stBtnBorderStyle=hX_5._SLD; this.stBtnBorderColor=((isNowXP)) ? this.borderSystemColor(c.DOMobj) : this.borderCalcColor(c.DOMobj); } else { hX_5.g.setP(this.iSpn, hX_5._BCOR, this.btnColor); hX_5.g.copyP (c.DOMobj, this.iSpn, hX_5._BRLWD, hX_5._BRLSY, hX_5._BRRWD, hX_5._BRRSY, hX_5._BRTWD, hX_5._BRTSY, hX_5._BRBWD, hX_5._BRBSY); hX_5.g.setP(this.iSpn, hX_5._BRLWD, hX_5._ZPX); this.stBtnBorderWidth=(brdR > 3) ? 3 : brdR; this.stBtnBorderColor=this.borderCalcColor(c.DOMobj); if (this.stBtnBorderColor == hX_5._E) hX_5.g.setP(this.iSpn, hX_5._BRCOR, this.stBtnBorderColor); else hX_5.g.copyP(c.DOMobj, this.iSpn, hX_5._BRCOR, hX_5._BRRCL, hX_5._BRLCL, hX_5._BRTCL, hX_5._BRBCL); this.stBtnBorderStyle=hX_5.g.getP(c.DOMobj, hX_5._BRRSY); } this.stBtnBorderStyle=(this.stBtnBorderStyle == hX_5._SLD) ? hX_5._SLD : hX_5._E; var intBtnBorderWidth=(!outBtn && this.stBtnBorderStyle == hX_5._SLD && this.stBtnBorderWidth > 1) ? 1 : this.stBtnBorderWidth; this.stBtnBackColor=(this.stBtnBorderWidth > 0) ? this.btnColor : hX_5._TRN; hX_5.g.setP(this.btn1, hX_5._BCOR, this.stBtnBackColor); hX_5.g.setP(this.btn1, hX_5._BRSTY, this.stBtnBorderStyle); hX_5.g.setP(this.btn1, hX_5._BRCOR, this.stBtnBorderColor); hX_5.g.setP(this.btn1, hX_5._BRWID, intBtnBorderWidth + hX_5._PX); hX_5.g.setP(this.btn1, hX_5._DSP, hX_5._INL); this.btn1.disabled=bDisabled || bReadOnly; this.btn1.hideFocus=(this.stBtnBorderWidth > 0) ? true : bHideFocus; this.btn1.tabIndex=(this.inputIsButton!=0)?-1:taborder; var interiorLine=1, bSpecialCase=(this.stBtnBorderStyle == hX_5._SLD); if (bSpecialCase) { interiorLine=this.stBtnBorderWidth; if (!outBtn) { hX_5.g.setP(this.btn1, hX_5._BRCOR, this.stBtnBackColor); hX_5.g.setP(this.iSpn, hX_5._BCOR, this.stBtnBorderColor); } } if (this.btn2) { this.btn2.tabIndex=this.btn1.tabIndex; this.btn2.disabled=this.btn1.disabled; this.btn2.hideFocus=this.btn1.hideFocus; hX_5.g.setP(this.btn2, hX_5._DSP, this.btn1.style.display); hX_5.g.setP(this.btn2, hX_5._BCOR, this.btn1.style.backgroundColor); hX_5.g.setP(this.btn2, hX_5._BRCOR, this.btn1.style.borderColor); hX_5.g.setP(this.btn2, hX_5._BRSTY, this.btn1.style.borderStyle); hX_5.g.setP(this.btn2, hX_5._BRWID, this.btn1.style.borderWidth); } elemH=c.DOMobj.offsetHeight; var halfheight, btnHeight, btnWidth, fullheight=((outBtn) ? elemH : elemH - (brdT + brdB)); fullheight=(fullheight < 0) ? 0 : fullheight; halfheight=Math.floor(fullheight/2); halfheight=(interiorLine > 1) ? (halfheight - (interiorLine-1)) : halfheight; btnHeight=(this.btn2) ? halfheight : fullheight; btnWidth=(this.btn2) ? ((btnHeight*2)-2) : ((btnHeight*2)-2); btnWidth=(btnWidth < 10) ? 10 : ((btnWidth > 18) ? 18: btnWidth); hX_5.g.setP(this.btn1, hX_5._TOP, hX_5._ZPX); hX_5.g.setP(this.btn1, hX_5._LFT, interiorLine + hX_5._PX); hX_5.g.setP(this.btn1, hX_5._WD, (btnWidth - (interiorLine-1)) + hX_5._PX); hX_5.g.setP(this.btn1, hX_5._HT, btnHeight + hX_5._PX); if (this.btn2) { hX_5.g.setP(this.btn2, hX_5._TOP, (fullheight - halfheight) + hX_5._PX); hX_5.g.setP(this.btn2, hX_5._LFT, this.btn1.style.left); hX_5.g.setP(this.btn2, hX_5._WD, this.btn1.style.width); hX_5.g.setP(this.btn2, hX_5._HT,this.btn1.style.height); if (bSpecialCase && (fullheight != ((halfheight*2)+interiorLine))) { i=(interiorLine==1) ? -1 : 1; hX_5.g.setP(this.btn2, hX_5._HT, (parseInt(this.btn2.style.height,10) + i) + hX_5._PX); hX_5.g.setP(this.btn2, hX_5._TOP,(parseInt(this.btn2.style.top, 10) - i) + hX_5._PX); } } var imgWidth, imgHeight=btnHeight-(intBtnBorderWidth*2); imgHeight=(imgHeight > 3) ? imgHeight-2 : 1; if (this.btngraphic == hX_5.R_IMG_HINKIES) { imgHeight=Math.min(4, imgHeight); imgWidth=imgHeight*2; } else { imgHeight=Math.min(12, imgHeight); imgWidth=(imgHeight >= 6) ? imgHeight : imgHeight*2; } if (imgHeight > 1) { hX_5.g.setP(this.img1, hX_5._BIMG, c.r.getURI (this.btngraphic)); hX_5.g.setP(this.img1, hX_5._BPOS, c.r.wellPosition(this.btngraphic, imgHeight-2, (bDisabled || bReadOnly) ? 1:0, (this.btn2) ? 1 : 0)); } else hX_5.g.setP(this.img1, hX_5._BIMG, c.r.getURI (hX_5.R_IMG_SPACER)); hX_5.g.setP(this.img1, hX_5._BREP, hX_5._NREP); hX_5.g.setP(this.img1, hX_5._HT, imgHeight + hX_5._PX); hX_5.g.setP(this.img1, hX_5._WD, imgWidth + hX_5._PX); if (hX_5.brw.isNavOrMoz()) { i=((this.btngraphic != hX_5.R_IMG_HINKIES)?(-this.stBtnBorderWidth):(-(this.stBtnBorderWidth-1))); if (this.stBtnBorderWidth >= 1) hX_5.g.setP(this.img1, hX_5._MGNL, i+hX_5._PX); if (this.stBtnBorderWidth >= 1) hX_5.g.setP(this.img1, hX_5._MGNT, (i-1)+hX_5._PX); } this.stMgnLeft=parseInt(hX_5.g.getP(this.img1, hX_5._MGNL)); this.stMgnTop=parseInt(hX_5.g.getP(this.img1, hX_5._MGNT)); if (this.btn2) { hX_5.g.setP(this.img2, hX_5._HT, this.img1.style.height); hX_5.g.setP(this.img2, hX_5._WD, this.img1.style.width); hX_5.g.setP(this.img2, hX_5._BIMG, this.img1.style.backgroundImage); hX_5.g.setP(this.img2, hX_5._BPOS, c.r.wellPosition(this.btngraphic, imgHeight-2, (bDisabled || bReadOnly) ? 1:0, 0)); hX_5.g.setP(this.img2, hX_5._BREP, this.img1.style.backgroundRepeat); if (hX_5.brw.isNavOrMoz()) { hX_5.g.setP(this.img2, hX_5._MGNB, this.img1.style.marginBottom); hX_5.g.setP(this.img2, hX_5._MGNL, this.img1.style.marginLeft); hX_5.g.setP(this.img2, hX_5._PADB, hX_5._1PX); } } btnWidth=(hX_5.brw.isW3Cstd()) ? btnWidth : (this.btn1.offsetWidth+(interiorLine-1)); btnWidth=(btnWidth < 0) ? 10 : btnWidth; if (this.HTMLcopied) { if (hX_5.brw.isIE() || this.stPosition==hX_5._ABS) elemW=this.oSpn.offsetWidth; else if (hX_5.brw.isNavOrMoz() && this.stResizable && this.dupe) { this.oSpn.style.display=hX_5._NO; this.dupe.style.display=hX_5._E; elemW=this.dupe.offsetWidth; this.dupe.style.display=hX_5._NO; this.oSpn.style.display=hX_5._E; } else elemW=this.oSpn.offsetWidth + this.stBtnOffset; } else { prop=(hX_5.brw.isIE()) ? hX_5.g.getP(c.DOMobj, hX_5._WD) : c.DOMobj.style.width; this.stResizable=((prop.indexOf(hX_5._PCT)) < 0) ? null : prop; elemW=c.DOMobj.offsetWidth; } var W3CadjustH=0, W3CadjustW=0, elemW2=elemW, bR, bL; if (!hX_5.brw.isW3Cstd()) W3CadjustW=brdR=((outBtn) ? 0 : brdR); else { brdR=(outBtn && !hX_5.brw.isIE()) ? 0 : brdR; elemH -= (brdT + brdB); W3CadjustW=W3CadjustH=brdR; if (hX_5.brw.isIE()) { var pL=parseInt(hX_5.g.getP(c.DOMobj, hX_5._PADL), 10), s=hX_5.g.getP(c.DOMobj, hX_5._BRLSY); bL=(s==hX_5._NO) ? 2 : brdL; s=hX_5.g.getP(c.DOMobj, hX_5._BRRSY); bR=(s==hX_5._NO) ? 2 : brdR; if (this.stResizable && !this.HTMLcopied) elemW2 -= ((this.stResizable && !this.HTMLcopied)?(2*((bR + bL + pL + ((outBtn) ? 1 : ((bSpecialCase)?1:0))))) :((bR + bL + pL + ((outBtn) ? 1 : ((bSpecialCase)?1:0))))); W3CadjustW=(outBtn) ? 0 : (bSpecialCase)?interiorLine:2; } } elemW2=elemW2 - (btnWidth + 1); elemW2=(elemW2 < 0) ? 0 : elemW2; hX_5.g.setP(this.oSpn, hX_5._WD, (this.stResizable) ? this.stResizable : (elemW + hX_5._PX)); hX_5.g.setP(c.DOMobj, hX_5._WD, elemW2 + hX_5._PX); hX_5.g.setP(c.DOMobj, hX_5._PADR, hX_5._1PX); hX_5.g.setP(this.iSpn, hX_5._WD, (btnWidth + brdR + 1 - W3CadjustH) + hX_5._PX); hX_5.g.setP(this.iSpn, hX_5._HT, elemH + hX_5._PX); hX_5.g.setP(this.iSpn, hX_5._LFT, (c.DOMobj.offsetWidth - W3CadjustW) + hX_5._PX); this.stBtnOffset=btnWidth + brdR; if (hX_5.brw.isNavOrMoz()) { hX_5.g.setP(this.iSpn, hX_5._TOP, -(1+brdT) + hX_5._PX); hX_5.g.setP(c.DOMobj, hX_5._MGNR, btnWidth + hX_5._PX); this.stBtnOffset+=(-brdR+1); var elemtop=hX_5.g.getAbsPosTop(c.DOMobj), spantop=hX_5.g.getAbsPosTop(this.iSpn); if (elemtop != spantop) hX_5.g.setP(this.iSpn, hX_5._TOP, (parseInt(this.iSpn.style.top, 10)) + (elemtop-spantop) + hX_5._PX); } else hX_5.g.setP(this.iSpn, hX_5._TOP, hX_5._1PX); this.saveBR=(isNowXP)?1:brdR; this.saveBL=(isNowXP)?1:brdL; this.saveBT=(isNowXP)?1:brdT; this.saveBB=(isNowXP)?1:brdB; if (this.inpDiv) this.sizeColorArea (); if (!this.HTMLcopied) { if (this.stResizable) { this.stElemOffset=elemW - c.DOMobj.offsetWidth; hX_5.i.attachResizeMonitor(this.oSpn, this.dispatchButtonMonitorResize); this.HTMLcopied=true; this.addedResizeMonitor=true; if (hX_5.brw.isIE()) hX_5.i.fireEvent(this.oSpn.id, hX_5._onR); } this.addedPropMonitor=hX_5.i.attachMonitor(c.DOMobj, this.dispatchMonitorBtn, "className", "class", hX_5._DSB, hX_5._RDO); } this.HTMLcopied=true; return true; } HxG_5.prototype.JSFSubButton.prototype.sizeColorArea=function () { hX_5.g.setP(this.inpSubDiv, hX_5._PADL, hX_5._2PX); var std=(hX_5.brw.isNavOrMoz() || hX_5.brw.isIE6_CSS()), xyOff=((std)?4:0), iW=this.c.DOMobj.offsetWidth - (this.saveBL+this.saveBR), iH=this.c.DOMobj.offsetHeight - (this.saveBT+this.saveBB); hX_5.g.setP(this.inpDiv, hX_5._TOP,(this.c.DOMobj.offsetTop + this.saveBT)+hX_5._PX); hX_5.g.setP(this.inpDiv, hX_5._LFT,(this.c.DOMobj.offsetLeft + this.saveBL)+hX_5._PX); hX_5.g.setP(this.inpDiv, hX_5._WD, (iW-xyOff)+hX_5._PX); hX_5.g.setP(this.inpDiv, hX_5._HT, (iH-xyOff)+hX_5._PX); hX_5.g.setP(this.inpSubDiv, hX_5._TOP, hX_5._ZPX); hX_5.g.setP(this.inpSubDiv, hX_5._LFT, hX_5._ZPX); xyOff=((std)?4:0); hX_5.g.setP(this.inpSubDiv, hX_5._WD, (iW-4-xyOff)+hX_5._PX); xyOff=((std)?2:0); hX_5.g.setP(this.inpSubDiv, hX_5._HT, (iH-4-xyOff)+hX_5._PX); } HxG_5.prototype.JSFSubButton.prototype.styleColorArea=function (src) { if (src && this.inpDiv && this.inputIsButton==2) { try { hX_5.g.copyP(src, this.inpSubDiv, hX_5._COR, "font-family", hX_5._FSZ, "font-style", "font-variant", hX_5._TXA, "text-decoration", "text-transform", "letter-spacing", "direction"); } catch (e) { } this.stNormalColor=hX_5.g.getP(src, hX_5._COR); } } HxG_5.prototype.JSFSubButton.prototype.colorArea=function (clr, txt, fFlag) { if (this.inpDiv) { if (clr!=null) hX_5.g.setP(this.inpSubDiv, hX_5._BCOR, clr); if (txt!=null) hX_5.setIHTML(this.inpSubDiv, ((txt.length==0)?" ":txt)); if (this.inputIsButton==2) { var c=hX_5.g.getP(this.inpSubDiv, hX_5._BCOR); hX_5.g.setP(this.inpSubDiv, hX_5._COR, (hX_5.col.isDark(c)?hX_5.CLR_WHT:this.stNormalColor)); if (this.inpSubDiv.offsetHeight!=null && this.inpSubDiv.offsetHeight>0) this.inpSubDiv.style.lineHeight=(this.inpSubDiv.offsetHeight-4)+hX_5._PX; } if (fFlag!=null) { if (fFlag) { hX_5.g.setP(this.inpSubDiv, hX_5._BRCOR, hX_5.CLR_BLK); hX_5.g.setP(this.inpSubDiv, hX_5._BRSTY, "dotted"); } else { hX_5.g.setP(this.inpSubDiv, hX_5._BRCOR, hX_5.CLR_SHDW); hX_5.g.setP(this.inpSubDiv, hX_5._BRSTY, hX_5._SLD); } } } } HxG_5.prototype.JSFSubButton.prototype.depress=function (btn, downstate) { if (!this.valid) return false; var i=this.stBtnBorderStyle, o1=0, o2=0, s=hX_5._E, b=((btn=="btn1")?this.btn1:this.btn2), m=((btn=="btn1")?this.img1:this.img2); if (downstate==true) { if (i==hX_5._INS) s=hX_5._OUT; else if (i=="groove")s="ridge"; else if (i=="ridge") s="groove"; else s=hX_5._INS; o1=(hX_5.brw.isIE())?(((b.offsetWidth%2)==1)?1:2):(this.stMgnLeft+1); o2=(hX_5.brw.isIE())?(((b.offsetHeight%2)==1)?1:2):(this.stMgnTop+2); } else { s=(this.stBtnBorderStyle == hX_5._E) ? hX_5._OUT : this.stBtnBorderStyle; o1=this.stMgnLeft; o2=this.stMgnTop; } hX_5.g.setP(b, hX_5._BRSTY, s); hX_5.g.setP(m, hX_5._MGNL, o1+hX_5._PX); hX_5.g.setP(m, hX_5._MGNT, o2+hX_5._PX); return true; } HxG_5.prototype.JSFSubButton.prototype.dispatchBtnComponent=function(evt) { if ((typeof hX_5)=="undefined") return true; evt=(evt) ? evt : ((event) ? event: null); if (evt && this) { var src=((this.nodeType == hX_5.ELEMENT_NODE || this.nodeType == hX_5.DOCUMENT_NODE) ? this : this.parentNode); if (src) { var r, sibling, obj, skip=false, item=hX_5._E; if (src.tagName==hX_5._IMG) src=src.parentNode; if (src.tagName==hX_5._BTN || src.tagName==hX_5._DIV) { if (src.tagName == hX_5._DIV) { item="btn1"; if (src.parentNode.tagName==hX_5._DIV) src=src.parentNode; if (src.previousSibling && src.previousSibling.tagName==hX_5._SPN) src=(src.previousSibling).previousSibling; } else { sibling=src.previousSibling; src=src.parentNode; if (src && src.tagName == hX_5._SPN) { item=(sibling && sibling.tagName == hX_5._BTN)?"btn2":"btn1"; src=src.previousSibling; } } if (src && src.id && src.tagName==hX_5._INP) { if (evt.type==hX_5._evMCC) skip=true; else if (evt.type==hX_5._evMC || evt.type==hX_5._evMD || evt.type==hX_5._evMU) skip=evt.button > 1; if (!skip) { obj=hX_5.getComponentById(src.id); if (obj) { r =obj.dispatchComponent (item, evt, evt.type, ((evt.keyCode)?evt.keyCode:null)); if (r!=null && r==false) hX_5.i.cancelAction(evt, true); } } } } } } return r; } HxG_5.prototype.JSFSubButton.prototype.dispatchButtonMonitorResize=function(evt) { evt=(evt) ? evt : ((event) ? event: null); if (evt && this) { var src=((this.nodeType == hX_5.ELEMENT_NODE || this.nodeType == hX_5.DOCUMENT_NODE) ? this : this.parentNode); if (src) { if (!hX_5.brw.isIE()) hX_5.redraw(); else if (src.tagName == hX_5._SPN) { var obj, inputfld=src.firstChild; if (inputfld && inputfld.tagName == hX_5._INP) { obj=hX_5.getComponentById(inputfld.id); if (obj) { obj.redraw(true); return false; } } } } } return true; } HxG_5.prototype.JSFSubButton.prototype.dispatchMonitorBtn=function(obj, evt, args) { var c=hX_5.getComponentById(obj); if (hX_5.brw.isIE()) c.redraw(); else { hX_5.i.deferNSRedraw.push(obj); setTimeout(hX_5.i.NSRedraw, 10); } return true; } HxG_5.prototype.DateTimeConverter=function () { this.type=hX_5.CVT_datetime; this.ICU4J=false; this.nStrict=hX_5.DTFMT_DEFAULTSTRICT; this.sFormat=hX_5.DTFMT_DATE0; this.sFormatTokenized=null; this.nLiteralCnt=this.nTokenCnt=0; this.sLiterals=[]; this.sTokens=[]; this.bHasDate=this.bHasTime=false; this.FDOW=hX_5.DTFMT_DEFAULTFIRSTDAYWEEK; this.digitFirst=this.FMTChars=this.FMTDateChars=this.FMTTimeChars=null; this.FMTBaseChars="aDdEFGHhKkMmSsWwyz"; this.FMTBaseDateChars="DdEFGMWwy"; this.FMTBaseTimeChars="aHhKkmSsz"; this.FMTICU4JChars="gAeYZ"; this.FMTICU4JDateChars="geY"; this.FMTICU4JTimeChars="AZ"; this._8chars="gA"; this._4chars="gAyYGME"; this._3chars="gAyYGMEDS"; this._2chars="gAyYGMEDSdhHmskKw"; this.FMTSEPChars="-_ .,;:|()<>/\\"; this.SEPChars=this.FMTSEPChars; this.bIsGregorian=true; this.bIsHijri=this.bIsHebrew=this.bIsChristianEra=this.bIsBuddhistEra=this.bIsJapaneseEra=false; this.sEpoch=hX_5._E; this.nEpoch=null; this.descLbEpoch=this.descYrEpoch=this.descDtEpoch=null; this.bShowEpoch=false; this.isShortYr=this.abbEpochLength=this.fulEpochLength=null; this.minEpoch=1; this.TZSeparator=":"; this.sAM=hX_5.STR_AM_SUFFIX; this.sPM=hX_5.STR_PM_SUFFIX; this.base2DigitSpan=80; this.DF_MaxLength=null; this.xDigits=this.zeroDigit=null; this.msgFail=this.intMsgFail=hX_5._E; this.maskFormat=this.maskFormatDigits=this.maskFormatLast=this.maskFormatFirst=this.simpleFormat=this.simpleConverter=null; this.isSimple=false; this.markers=hX_5._LB + hX_5._QM; this.promptChar=hX_5._E; this._l="#"; this._ll="##"; this._lll="###"; this._llll="####"; this._MIN="-"; this._PLS="+"; this._AD=null; hX_5.c.strInit(); this.attributeTable=[]; this.attributeTable ['strict']=['nStrict', hX_5.ARG_TO_NUM, false, 0, 2]; this.attributeTable ['format']=['sFormat', hX_5.ARG_TO_NAS, false, null, null]; this.attributeTable ['base-2digit-span']=['base2DigitSpan',hX_5.ARG_TO_NUM, false, 0, 99]; this.attributeTable ['epoch']=['sEpoch', hX_5.ARG_TO_NAN, false, null, null]; this.attributeTable ['icu4j']=['ICU4J', hX_5.ARG_IS_TRUE, false, null, null]; this.attributeTable ['first-day-of-week']=['FDOW', hX_5.ARG_TO_NUM, false, 0, 6]; this.attributeTable ['digits']=['digitFirst', hX_5.ARG_TO_NUM, false, 0, 999999]; this.attributeTable ['am']=['sAM', hX_5.ARG_TO_NAN, false, null, null]; this.attributeTable ['pm']=['sPM', hX_5.ARG_TO_NAN, false, null, null]; this.setAttribute(arguments); } HxG_5.prototype.DateTimeConverter.prototype.setAttribute=function(a) { var i,j,k; hX_5.parseArg (this.attributeTable, this, a); this.FMTChars=this.FMTBaseChars + ((this.ICU4J)?this.FMTICU4JChars:hX_5._E); this.FMTDateChars=this.FMTBaseDateChars + ((this.ICU4J)?this.FMTICU4JDateChars:hX_5._E); this.FMTTimeChars=this.FMTBaseTimeChars + ((this.ICU4J)?this.FMTICU4JTimeChars:hX_5._E); this.parseDigits(); this.parseFormatString(); this.sEpoch=(this.sEpoch==null)?hX_5._E:this.sEpoch; this.nEpoch=0; for (i=0; i < hX_5.DATE_EPOCH_IDS.length; i++) { if (hX_5.DATE_EPOCH_IDS[i] == this.sEpoch) { this.nEpoch=i; break; } } this.bIsGregorian=this.bIsHijiri=this.bIsHebrew=this.bIsChristianEra=this.bIsBuddhistEra=this.bIsJapaneseEra=false; this.bIsChristianEra=(this.nEpoch <= 0); this.bIsHijiri=(this.nEpoch == 1); this.bIsHebrew=(this.nEpoch == 2); this.bIsBuddhistEra=(this.nEpoch == 3); this.bIsJapaneseEra=(this.nEpoch == 4); this.bIsGregorian=(this.nEpoch == 0 || this.nEpoch >= 3); this.bShowEpoch=(this.bIsJapaneseEra || this.sFormatTokenized.indexOf("%G")>=0); this.descLbEpoch=hX_5.STRA_DATE_EPOCHS[this.nEpoch]; this.descYrEpoch=[]; this.descDtEpoch=[]; this.isShortYr=(this.descLbEpoch.length > 2); this.setCalendar(); this.abbEpochLength=this.fulEpochLength=0; this.minEpoch=1; this._AD=this.abbEpochLength,this.descLbEpoch[1][1]; for (i=0; i < this.descLbEpoch.length; i++) { this.fulEpochLength=Math.max(this.fulEpochLength,this.descLbEpoch[i][0].length); this.abbEpochLength=Math.max(this.abbEpochLength,this.descLbEpoch[i][1].length); this.minEpoch=(i<=0)?this.minEpoch:((this.descLbEpoch[i-1][1].charAt(0)==this.descLbEpoch[i][1].charAt(0))?2:1); if (this.bIsChristianEra) { this.descYrEpoch.push(0); this.descDtEpoch.push(0); } else { j=this.constantToValue(hX_5.DATE_EPOCH_YEARS[this.nEpoch][i]); this.descYrEpoch.push((j!=null)?j.getFullYear():0); this.descDtEpoch.push(j); } } if (this.simpleFormat) this.genAssistMasks(); return true; } HxG_5.prototype.DateTimeConverter.prototype.epochIndex=function () { return ((this.bIsHijiri)?1:((this.bIsHebrew)?2:0)); } HxG_5.prototype.DateTimeConverter.prototype.FormatToken=function (token, typ) { this.type=typ; this.token=token; } HxG_5.prototype.DateTimeConverter.prototype.parseDigits=function () { this.xDigits=null; this.zeroDigit=hX_5._Z; if (this.digitFirst != null) { this.xDigits=String.fromCharCode(this.digitFirst, this.digitFirst+1, this.digitFirst+2, this.digitFirst+3, this.digitFirst+4, this.digitFirst+5, this.digitFirst+6, this.digitFirst+7, this.digitFirst+8, this.digitFirst+9); this.zeroDigit=this.xDigits.charAt(0); } } HxG_5.prototype.DateTimeConverter.prototype.parseFormatString=function () { var fmt=this.sFormat; this.sFormatTokenized=hX_5._E; this.nLiteralCnt=this.nTokenCnt=this.DF_MaxLength=0; var index, i, xchar, nchar, last=hX_5._E, lastlen=1, q=false, noT=false, len=fmt.length; for (index=0; index < len; index++) { xchar=fmt.charAt(index); if (!q && hX_5.isChar(xchar, this.FMTChars)) { if (xchar==last) { noT=false; if (lastlen >= 8) noT=true; else if (lastlen >= 4 && !hX_5.isChar(xchar, this._8chars)) noT=true; else if (lastlen >= 3 && !hX_5.isChar(xchar, this._4chars)) noT=true; else if (lastlen >= 2 && !hX_5.isChar(xchar, this._3chars)) noT=true; else if (lastlen >= 1 && !hX_5.isChar(xchar, this._2chars)) noT=true; if (!noT) this.sFormatTokenized=this.sFormatTokenized + xchar; lastlen++; } else { this.sFormatTokenized=this.sFormatTokenized + hX_5._PCT + xchar; lastlen=1; } last=xchar; this.bHasDate=(this.bHasDate) ? this.bHasDate : hX_5.isChar(xchar, this.FMTDateChars); this.bHasTime=(this.bHasTime) ? this.bHasTime : hX_5.isChar(xchar, this.FMTTimeChars); } else { if (xchar == hX_5._SQT) { nchar=fmt.charAt(index+1); if (nchar == hX_5._SQT) { index++; } else if (q) { xchar=hX_5._E; q=false; } else { xchar=nchar; q=true; index++; } } if (last != hX_5._UPC) { this.sFormatTokenized=this.sFormatTokenized + hX_5._UPC + this.nLiteralCnt; this.sLiterals[this.nLiteralCnt]=hX_5._E; this.nLiteralCnt++; } this.sLiterals[this.nLiteralCnt-1]=this.sLiterals[this.nLiteralCnt-1] + xchar; last=hX_5._UPC; } } fmt=this.sFormatTokenized; var token, next, nextp, nextl, c, l; while (fmt.length > 0) { xchar=fmt.charAt(0); fmt=fmt.substr(1); nextp=fmt.indexOf(hX_5._PCT); nextl=fmt.indexOf(hX_5._UPC); next=(nextp < 0) ? nextl : ((nextl < 0) ? nextp : Math.min(nextp,nextl)); if (next >= 0) { token=fmt.substr(0,next); fmt=fmt.substr(next); } else { token=fmt; fmt=hX_5._E; } if (xchar==hX_5._PCT) { this.sTokens[this.nTokenCnt]=new this.FormatToken(token, 0); this.nTokenCnt++; } else { index=parseInt(token, 10); token=this.sLiterals[index]; for (i=1; i < this.FMTSEPChars.length; i++) token=hX_5.replaceAll(token, this.FMTSEPChars.charAt(i), this.FMTSEPChars.charAt(0)); token=hX_5.replaceAll(token, this.FMTSEPChars.charAt(0)+ this.FMTSEPChars.charAt(0), this.FMTSEPChars.charAt(0)); this.sTokens[this.nTokenCnt]=new this.FormatToken(this.sLiterals[index], (token == this.FMTSEPChars.charAt(0)) ? 2 : 1); this.nTokenCnt++; } } for (i=0; i < this.nTokenCnt; i++) { if (this.sTokens[i].type == 0) { l=this.sTokens[i].token.length; switch (this.sTokens[i].token.charAt(0)) { case hX_5._uF: case hX_5._uW: case hX_5._lE: this.DF_MaxLength+=1; break; case hX_5._uD: case hX_5._uS: this.DF_MaxLength+=3; break; case hX_5._uZ: this.DF_MaxLength+=5; break; case hX_5._uA: case hX_5._lG: this.DF_MaxLength+=8; break; case hX_5._lZ: this.DF_MaxLength+=10; break; case hX_5._uG: this.DF_MaxLength+=((l<=3)?this.abbEpochLength:this.fulEpochLength); break; case hX_5._lY: case hX_5._uY: this.DF_MaxLength+=((this.bIsJapaneseEra)?l:((l==2)?2:4)); break; case hX_5._uE: this.DF_MaxLength+=((l > 3) ? hX_5.c.MAX_STR_DATE_DAYS[this.epochIndex()] : hX_5.c.MAX_STR_DATE_SHDAYS[this.epochIndex()]); break; case hX_5._uM: this.DF_MaxLength+=((l < 3)?2:((l > 3) ? hX_5.c.MAX_STR_DATE_MONTHS[this.epochIndex()] : hX_5.c.MAX_STR_DATE_SHMONTHS[this.epochIndex()])); break; case hX_5._lA: this.DF_MaxLength+=Math.max(this.sAM.length, this.sPM.length); break; default: this.DF_MaxLength+=2; break; } } else this.DF_MaxLength+=this.sTokens[i].token.length; } } HxG_5.prototype.DateTimeConverter.prototype.getAttribute=function (attribute) { return (hX_5.getArg(this.attributeTable, this, attribute)); } HxG_5.prototype.DateTimeConverter.prototype.lastError=function () { return ((this.msgFail && this.msgFail.length > 0) ? this.msgFail : null); } HxG_5.prototype.DateTimeConverter.prototype.stringToValue=function (iDate) { var r=this.stringToValueBase(iDate); return ((r) ? r.value : null); } HxG_5.prototype.DateTimeConverter.prototype.stringToValueBase=function (iDate, tokenStop) { this.intMsgFail=this.msgFail=hX_5._E; var sDate=iDate, args=[iDate]; if (iDate == null || !hX_5.isString(iDate)) { this.msgFail=hX_5.ERR_empty; return null; } while (sDate.length > 0 && sDate.charAt(sDate.length-1) == hX_5._B) sDate=sDate.substr(0, sDate.length-1); if (sDate.length == 0) return null; this.setCalendar(); var tok=this.sTokens, tokI=0, curdate=new Date(), o=hX_5.cal.dateToCalendar(curdate); var intMonth=o.month+1, intDay=o.date, intYear=o.year, intSvDay=o.date, intJDay=0; var intHour=12, intMin=0, intSec=0, intMS=0, intMSDay=0, ampm=hX_5._E; var ADtoCal=false, iEpoch=null, zISO=false, zOffset=null, bShortYear=false, bShortYearSpec=false, bShortHour=false, bKampm=false, bJulianDate=false, bNormalDate=false; var bNumberInShMonth=this.matchDigit(hX_5.STRA_DATE_SHMONTHS[this.epochIndex()][0]); var bNumberInMonth=this.matchDigit(hX_5.STRA_DATE_MONTHS[this.epochIndex()][0]); var monthStrict=(bNumberInMonth || bNumberInShMonth)?2:this.nStrict; var tokenC=((tokenStop != null) ? tokenStop : this.nTokenCnt), token, pose, i, j, r, n, ch; while (this.msgFail.length == 0 && sDate.length > 0 && tokI < tokenC) { token=tok[tokI].token; this.SEPChars=this.FMTSEPChars; if (tokI+1= 1) { if (this.nStrict > 1 || tok[tokI].type == 1) { if (token == sDate.substr(0,token.length)) { sDate=sDate.substr(token.length); } else { if (this.nStrict <= 1) sDate=this.skipSeparators(sDate); else { this.msgFail=hX_5.ERR_datetime_parse_fail; this.intMsgFail=hX_5.INTERR_Parse_Literal + token; break; } } } else sDate=this.skipSeparators(sDate); } else { switch (token) { case hX_5._lD: case hX_5._l2D: case hX_5._lH: case hX_5._l2H: case hX_5._uH: case hX_5._u2H: case hX_5._lK: case hX_5._l2K: case hX_5._uK: case hX_5._u2K: case hX_5._lM: case hX_5._l2M: case hX_5._lS: case hX_5._l2S: case hX_5._lW: case hX_5._l2W: case hX_5._uF: case hX_5._uW: case hX_5._lE: if (this.nStrict <= 1) if (this.skipIfMissing(sDate, true)) break; n=this.matchDigits (sDate, 2, false); if (n.fail) { this.msgFail=hX_5.ERR_datetime_parse_fail; this.intMsgFail=hX_5.INTERR_Parse_TwoDig + token; break; } sDate=n.s; switch (tok[tokI].token) { case hX_5._lD: case hX_5._l2D: intDay=n.n; bNormalDate=true; break; case hX_5._lH: case hX_5._l2H: intHour=n.n; bShortHour=true; break; case hX_5._uH: case hX_5._u2H: intHour=n.n; break; case hX_5._lK: case hX_5._l2K: intHour=n.n - 1; break; case hX_5._uK: case hX_5._u2K: intHour=n.n + 1; bShortHour=true; bKampm=true; break; case hX_5._lM: case hX_5._l2M: intMin=n.n; break; case hX_5._lS: case hX_5._l2S: intSec=n.n; break; case hX_5._uF: case hX_5._lW: case hX_5._uW: case hX_5._l2W: case hX_5._lE: default: break; } break; case hX_5._uS: case hX_5._u3S: case hX_5._u2S: case hX_5._uD: case hX_5._u3D: case hX_5._u2D: if (this.nStrict <= 1) if (this.skipIfMissing(sDate, true)) break; n=this.matchDigits (sDate, 3, false); if (n.fail) { this.msgFail=hX_5.ERR_datetime_parse_fail; this.intMsgFail=hX_5.INTERR_Parse_TwoDig + token; break; } sDate=n.s; if (token.charAt(0) == hX_5._uD) { bJulianDate=true; intJDay=n.n; } else { intMS=n.n; } break; case hX_5._lY: case hX_5._l2Y: case hX_5._l3Y: case hX_5._l4Y: case hX_5._uY: case hX_5._u2Y: case hX_5._u3Y: case hX_5._u4Y: n=this.matchDigits (sDate, 4, false); if (n.fail) { this.msgFail=hX_5.ERR_datetime_parse_fail; this.intMsgFail=hX_5.INTERR_Parse_TwoDig + token; break; } if (token.charAt(0) != hX_5._uY) { sDate=n.s; intYear=n.n; if (n.cnt <= 2) bShortYear=true; bShortYearSpec=(token==hX_5._lY || token==hX_5._l2Y || token==hX_5._l3Y); } break; case hX_5._uA: case hX_5._u2A: case hX_5._u3A: case hX_5._u4A: case hX_5._u5A: case hX_5._u6A: case hX_5._u7A: case hX_5._u8A: case hX_5._lG: case hX_5._l2G: case hX_5._l3G: case hX_5._l4G: case hX_5._l5G: case hX_5._l6G: case hX_5._l7G: case hX_5._l8G: if (this.nStrict <= 1) if (this.skipIfMissing(sDate, true)) break; n=this.matchDigits (sDate, 8, false); if (n.fail) { this.msgFail=hX_5.ERR_datetime_parse_fail; this.intMsgFail=hX_5.INTERR_Parse_TwoDig + token; break; } if (token.charAt(0)==hX_5._uA) { sDate=n.s; intMSDay=n.n; } break; case hX_5._uG: case hX_5._u2G: case hX_5._u3G: case hX_5._u4G: if (this.nStrict <= 1) if (this.skipIfMissing(sDate)) break; r=false; if (sDate.substr(0,2)==this._AD) ADtoCal=true; for (i=0; i < this.descLbEpoch.length; i++) { pose=((token.length <= 3) ? this.descLbEpoch[i][1] : this.descLbEpoch[i][0]).toUpperCase(); if ((sDate.substr(0, pose.length)).toUpperCase()==pose) { sDate=sDate.substr(pose.length); iEpoch=i; r=true; break; } pose=this.descLbEpoch[i][((token.length<=3)?1:0)].toUpperCase(); if (this.nStrict <= 1 && sDate.charAt(0).toUpperCase()==pose.charAt(0)) { n=1; while (n 1) { this.msgFail=hX_5.ERR_datetime_parse_fail; this.intMsgFail=hX_5.INTERR_Parse_TwoDig + token; break; } else if (!n.fail) { sDate=n.s; intMonth=n.n; if (intMonth>0 && ((token.length==3 && bNumberInShMonth) || (token.length>3 && bNumberInMonth))) { pose=((token.length > 3)?hX_5.STRA_DATE_MONTHS[this.epochIndex()][intMonth-1]:hX_5.STRA_DATE_SHMONTHS[this.epochIndex()][intMonth-1]).toUpperCase(); i=pose.length-1; if (!this.matchDigit(pose.substr(i,1))) { while (i>=0 && !this.matchDigit(pose.substr(i-1,1))) i--; while (sDate.length > 0 && i 3 || monthStrict <= 1)?hX_5.STRA_DATE_MONTHS[this.epochIndex()][i]:hX_5.STRA_DATE_SHMONTHS[this.epochIndex()][i]).toUpperCase(); if (sDate.substr(0, pose.length).toUpperCase() == pose) { sDate=sDate.substr(pose.length); intMonth=i+1; r=true; break; } pose=hX_5.STRA_DATE_MONTHS[this.epochIndex()][i].toUpperCase(); if (monthStrict <= 1 && sDate.charAt(0).toUpperCase()==pose.charAt(0)) { n=1; while (n= 2 && sDate.substr(0,2).toUpperCase() == this.sAM.toUpperCase()) { ampm=this.sAM; sDate=sDate.substr(2); } else if (sDate.length >= 2 && sDate.substr(0,2).toUpperCase() == this.sPM.toUpperCase()) { ampm=this.sPM; sDate=sDate.substr(2); } else { this.msgFail=hX_5.ERR_ampm_name; } break; case hX_5._lZ: case hX_5._uZ: this.SEPChars=this.FMTSEPChars.substr(1); if (this.nStrict <= 1) if (this.skipIfMissing(sDate)) break; r=false; zISO=(token.charAt(0)==hX_5._uZ); if (!zISO || this.nStrict <= 1) { for (i=0; i < hX_5.STR_TIMEZONES.length; i++) { if (hX_5.STR_TIMEZONES[i][1] != null && hX_5.STR_TIMEZONES[i][1].length > 0) { pose=hX_5.STR_TIMEZONES[i][1].toUpperCase(); if (sDate.substr(0, pose.length).toUpperCase() == pose) { zOffset=this.readTimeZoneOffset(hX_5.STR_TIMEZONES[i][0]); sDate=sDate.substr(pose.length); r=true; break; } pose=hX_5.STR_TIMEZONES[i][3].toUpperCase(); if (sDate.substr(0, pose.length).toUpperCase() == pose) { zOffset=this.readTimeZoneOffset(hX_5.STR_TIMEZONES[i][2]); sDate=sDate.substr(pose.length); r=true; break; } } } } if (zISO && !r) { pose=sDate.charAt(0); r=zISO=(this.matchDigit(pose) || pose == this._PLS || pose == this._MIN); } else zISO=false; if (r && (i==0 || zISO)) { var sign=+1; if (sDate.charAt(0) == this._PLS) sDate=sDate.substr(1); else if (sDate.charAt(0) == this._MIN) { sign=-1; sDate=sDate.substr(1); } n=this.matchDigits (sDate, 2, (this.nStrict>1)); r=!n.fail; if (r) { sDate=n.s; if (n.n < 0 || n.n > 13) r=false; else zOffset=sign * (n.n * 60); if (r) { if (sDate.charAt(0) == this.TZSeparator) sDate=sDate.substr(1); n=this.matchDigits (sDate, 2, (this.nStrict>1)); r=!n.fail; if (!r && this.nStrict <= 1) { r=true; n.s=0; } if (r) { sDate=n.s; if (n.n < 0 || n.n > 59) r=false; else zOffset=sign * (Math.abs(zOffset) + n.n); } } } } if (!r) this.msgFail=hX_5.ERR_tzone_name; break; default: break; } } tokI++; } if (this.msgFail.length == 0 && this.nStrict > 1 && (tokI != tokenC || sDate.length > 0)) { this.msgFail=hX_5.ERR_datetime_parse_fail; this.intMsgFail=hX_5.INTERR_Parse_end + sDate; } if (ADtoCal) hX_5.cal.setCalendar(true, false, false); if (this.msgFail.length == 0 && iEpoch!=null && this.isShortYr && iEpoch 1 && intYear>(1+this.descYrEpoch[iEpoch+1]-this.descYrEpoch[iEpoch])) this.msgFail=hX_5.ERR_epoch_range; } if (this.msgFail.length == 0) { if (bShortYearSpec && !this.isShortYr && bShortYear) intYear=hX_5.cal.twoYearToFourYear(intYear, curdate, this.getBaseYear(curdate)); if (this.bIsChristianEra) intYear=(iEpoch==0)?(-intYear):intYear; else if (this.bIsGregorian) { iEpoch=(iEpoch!=null) ? iEpoch : this.descLbEpoch.length-1; intYear+=this.descYrEpoch[iEpoch]-1; } if (intYear == 0 && !this.bIsChristianEra) this.msgFail=hX_5.ERR_epoch_range; else { if (bJulianDate && !bNormalDate) { o=hX_5.cal.julianToMonthDay(intJDay, intYear); intMonth=o.month+1; intDay=o.date; } if (!bJulianDate && !bNormalDate) { intDay=hX_5.cal.daysInMonth(intMonth-1,intYear); if (zOffset) intDay=Math.min(intSvDay,intDay); } if (this.nStrict == 0) { if(intMonth > hX_5.cal.monthsInYear(intYear) && intDay > 0 && intDay <= hX_5.cal.monthsInYear(intYear)) { i=intMonth; intMonth=intDay; intDay=i; } } } } if (this.msgFail.length == 0 && (intMonth < 1 || intMonth > hX_5.cal.monthsInYear(intYear))) this.msgFail=hX_5.ERR_month_range; if (this.msgFail.length == 0 && (intDay < 1 || intDay > hX_5.cal.minDaysInMonth())) { i=hX_5.cal.daysInMonth(intMonth-1, intYear); if (intDay < 1 || intDay > i) { this.msgFail=hX_5.ERR_month_rangelimit; args[1]= hX_5.STRA_DATE_MONTHS[this.epochIndex()][intMonth-1]; args[2]= i; } } if (this.msgFail.length == 0) { if (!bShortHour) { if (this.nStrict <= 1 && ampm.length > 0) { if (ampm == this.sPM && intHour <= 12) intHour+=12; } if (intHour < 0 || intHour > 23) { this.msgFail=hX_5.ERR_hour_range_long; } } else { if (this.nStrict <= 1) { if (intHour > 12) { ampm=this.sPM; intHour -= 12; } if (ampm.length == 0) ampm=(intHour >= 6 && intHour <= 11) ? this.sAM : this.sPM; } if (intHour < 1 || intHour > 12) this.msgFail=hX_5.ERR_hour_range_short; if (bKampm) { if (ampm == this.sPM && intHour != 0) { intHour+=12; } else if (ampm == this.sAM && intHour == 0) intHour=0; } else { if (ampm == this.sPM && intHour != 12) intHour+=12; else if (ampm == this.sAM && intHour == 12) intHour=0; } } } if (this.msgFail.length == 0 && (intMin < 0 || intMin > 59)) this.msgFail=hX_5.ERR_minute_range; if (this.msgFail.length == 0 && (intSec < 0 || intSec > 59)) this.msgFail=hX_5.ERR_second_range; if (this.msgFail.length > 0) { this.msgFail=hX_5.NLSFormatMsg (this.msgFail, args); return null; } r=hX_5.cal.calendarToDate(intYear, intMonth-1, intDay, intHour, intMin, intSec, intMS); if (zOffset && (zOffset != -(r.getTimezoneOffset()))) { intMin=r.getMinutes() - (zOffset + r.getTimezoneOffset()); r=hX_5.cal.calendarToDate(intYear, intMonth-1, intDay, intHour, intMin, intSec, intMS); } return {value:r, token:(tokI > 0)?tokI-1:0, pos:(iDate.length-sDate.length)}; } HxG_5.prototype.DateTimeConverter.prototype.stringToLastToken=function (iDate, pos) { var r, token=0, all="hHkKms"; if (iDate.length <= 0 || pos == 0) { while (token < this.sTokens.length && !(this.sTokens[token].type == 0 && hX_5.isChar(this.sTokens[token].token.charAt(0),all))) token++; } else { r=this.stringToValueBase(iDate.substr(0,pos)); if (r) { token=(r.token < this.sTokens.length) ? r.token : this.sTokens.length-1; if (this.sTokens[token].type != 0) { while (token < this.sTokens.length && this.sTokens[token].type != 0) token++; } token=(token >= this.sTokens.length) ? this.sTokens.length-1:token; while (token >= 0 && !(this.sTokens[token].type == 0 && hX_5.isChar(this.sTokens[token].token.charAt(0),all))) token--; } } if (token < 0 || token >= this.sTokens.length) return hX_5._lH; else if (this.sTokens[token].token.charAt(0) == hX_5._lM) return hX_5._lM; else if (this.sTokens[token].token.charAt(0) == hX_5._lS) return hX_5._lS; else return hX_5._lH; } HxG_5.prototype.DateTimeConverter.prototype.posFromLastToken=function (iDate, token) { if (iDate.length==0 || !token || token.length!=1) return 0; var r, i, hit=false, test=(token==hX_5._lS) ? hX_5._lS : ((token==hX_5._lM) ? hX_5._lM : "hHkK"); for (i=0; i < this.sTokens.length && !hit; i++) { if (this.sTokens[i].type==0 && hX_5.isChar(this.sTokens[i].token.charAt(0),test)) hit=true; } if (!hit) return 0; i=(i>0)?i-1:0; r=this.stringToValueBase(iDate, i); return ((r) ? r.pos : 0); } HxG_5.prototype.DateTimeConverter.prototype.getMaxLength=function () { return this.DF_MaxLength; } HxG_5.prototype.DateTimeConverter.prototype.isMarker=function (c) { return (this.markers.indexOf(c) >= 0); } HxG_5.prototype.DateTimeConverter.prototype.genAssistMasks=function(promptC) { var m=hX_5._E, p=hX_5._E, d=hX_5._E, sep=true, i,t,x,y,noT; if (promptC) this.promptChar=promptC; for (i=0; i < this.nTokenCnt; i++) { t=this.sTokens[i].token; if (this.sTokens[i].type == 0) { sep=true; switch (t.charAt(0)) { case hX_5._lY: if (this.isShortYr) { m=m + hX_5._l2Y; p=p + this._ll; d=d + hX_5._l2Y; } else { m=m + hX_5._l4Y; p=p + this._llll; d=d + hX_5._l4Y; } break; case hX_5._uG: m=m + hX_5._uG; d=d + hX_5.padR(hX_5._uG, this.abbEpochLength, hX_5._uG); if (this.isShortYr || this.bIsChristianEra) p=p + ((this.minEpoch==2)?hX_5.padR(this._l+this._l,this.abbEpochLength,hX_5._B):hX_5.padR(this._l,this.abbEpochLength,hX_5._B)); else p=p + this.descLbEpoch[1][1]; noT=true; break; case hX_5._uM: m=m + hX_5._u2M; p=p + this._ll; d=d + hX_5._l2M; break; case hX_5._lD: m=m + hX_5._l2D; p=p + this._ll; d=d + hX_5._l2D; break; case hX_5._lH: case hX_5._uH: m=m + hX_5._u2H; p=p + this._ll; d=d + hX_5._l2H; break; case hX_5._lM: m=m + hX_5._l2M; p=p + this._ll; d=d + hX_5._u2A; break; case hX_5._lS: m=m + hX_5._l2S; p=p + this._ll; d=d + hX_5._l2S; break; default: sep=false; break; } } else { if (t.length > 0) { m=m + ((sep) ? (hX_5._SQT+t+hX_5._SQT) : hX_5._E); p=p + ((sep) ? t : hX_5._E); d=d + ((sep) ? t : hX_5._E); } } } this.maskFormat=(noT)?hX_5.trimL(p):hX_5.Trim(p); this.maskFormatDigits=hX_5.Trim(d); m=hX_5.Trim(m); if (m.length > 0) { if (m.charAt(0) == hX_5._SQT) m=hX_5._SQT + hX_5.Trim(m.substr(1)); if (m.substr(0,2) == "''") m=hX_5.Trim(m.substr(2)); if (m.charAt(m.length-1) == hX_5._SQT) m=hX_5.Trim(m.substr(0, m.length-1)) + hX_5._SQT; if (m.substr(m.length-2,2) == "''") m=hX_5.Trim(m.substr(0,m.length-2)); } this.simpleFormat=m; var args=[]; args.push("strict:2"); if (this.simpleFormat) args.push("format:"+this.simpleFormat); if (this.base2DigitSpan)args.push("base-2digit-span:"+this.base2DigitSpan); if (this.sEpoch) args.push("epoch:"+this.sEpoch); if (this.ICU4J) args.push("icu4j:"+this.ICU4J); if (this.digitFirst) args.push("digits:" +this.digitFirst); args.push("first-day-of-week:"+this.FDOW); if (this.sAM) args.push("am:"+this.sAM); if (this.sPM) args.push("pm:"+this.sPM); this.simpleConverter=new hX_5.DateTimeConverter(args[0],args[1],args[2],args[3],args[4],((args.length>5)?args[5]:null),((args.length>6)?args[6]:null),((args.length>7)?args[7]:null),((args.length>8)?args[8]:null),((args.length>9)?args[9]:null)); this.simpleConverter.isSimple=true; this.maskFormatFirst=-1; this.maskFormatLast=-1; for (i=0; i < this.maskFormat.length; i++) { if (this.maskFormat.charAt(i) == hX_5._LB || this.maskFormat.charAt(i) == hX_5._QM) { this.maskFormatLast=i; this.maskFormatFirst=(this.maskFormatFirst >= 0) ? this.maskFormatFirst : i; } } } HxG_5.prototype.DateTimeConverter.prototype.getBaseYear=function(today) { return (today.getFullYear() - this.base2DigitSpan); } HxG_5.prototype.DateTimeConverter.prototype.skipSeparators=function (str) { var r=str; while (r.length > 0 && hX_5.isChar (r.charAt(0), this.SEPChars)) r=r.substr(1); return r; } HxG_5.prototype.DateTimeConverter.prototype.skipToSeparator=function (str, max) { var i=this.countToSeparator(str, max); return (str.substr(i)); } HxG_5.prototype.DateTimeConverter.prototype.countToSeparator=function (str, max) { var r=str, i=0; while (r.length > 0 && (i < max || max < 0) && !hX_5.isChar (r.charAt(0), this.SEPChars)) { r=r.substr(1); i++; } return i; } HxG_5.prototype.DateTimeConverter.prototype.skipIfMissing=function (str, notdigit) { var n, r=(hX_5.isChar (str.charAt(0), this.SEPChars)); if (!r) { n=this.matchDigits (str, 1, true); r=(notdigit) ? n.fail : (!n.fail); } return r; } HxG_5.prototype.DateTimeConverter.prototype.matchDigit=function (str) { if (str.length > 0) { if (hX_5.WDIGITS.indexOf(str.charAt(0)) >= 0) return true; if (this.xDigits != null && this.xDigits.indexOf(str.charAt(0)) >= 0) return true; } return false; } HxG_5.prototype.DateTimeConverter.prototype.matchDigits=function (str, n, exact) { var cnt=0, s=str, oN=hX_5._E, w, a; while (cnt < n && s.length > 0) { w=(hX_5.WDIGITS.indexOf(s.charAt(0)) >= 0); a=(!w && this.xDigits != null && this.xDigits.indexOf(s.charAt(0)) >= 0); if (!a && !w) break; else { oN=oN + this.getDigit(s); cnt++; s=s.substr(1); } } return {fail:(cnt==0 || (exact && cnt!=n)), s:s, n:parseInt(oN,10), cnt:cnt}; } HxG_5.prototype.DateTimeConverter.prototype.getDigit=function (s) { if (this.xDigits == null || (hX_5.WDIGITS.indexOf(s.charAt(0)) >= 0) || (this.xDigits.indexOf(s.charAt(0)) < 0)) return (s.charAt(0)); return (hX_5.WDIGITS.charAt(s.charCodeAt(0) - this.xDigits.charCodeAt(0))); } HxG_5.prototype.DateTimeConverter.prototype.cvtToDigits=function (str) { var s=str+hX_5._E, r=hX_5._E; if (this.xDigits == null) return s; while (s.length > 0) { if (hX_5.WDIGITS.indexOf(s.charAt(0)) >= 0) r=r + this.xDigits.charAt(s.charCodeAt(0)-hX_5.WDIGITS.charCodeAt(0)); else r=r + s.charAt(0); s=s.substr(1); } return r; } HxG_5.prototype.DateTimeConverter.prototype.digitTransmute=function (ev) { if (this.xDigits != null) { var c=hX_5.getChrCode(ev); if (hX_5.WDIGITS.indexOf(c)>=0) hX_5.setChrCode(ev, this.xDigits.charAt(c.charCodeAt(0)-hX_5.WDIGITS.charCodeAt(0))); } } HxG_5.prototype.DateTimeConverter.prototype.getZeroDigit=function () { return (this.zeroDigit); } HxG_5.prototype.DateTimeConverter.prototype.readTimeZoneOffset=function(str) { var sign=(str.charAt(0) == this._MIN) ? -1 : +1; var zoffset=(parseInt(str.substr(1,2), 10)) * 60; zoffset+=parseInt(str.substr(3,2), 10); zoffset=zoffset * sign; return zoffset; } HxG_5.prototype.DateTimeConverter.prototype.constantToValue=function (sDate) { var oDate=null, len=sDate.length; var i, yr, mo, dy, hr, mn, sc, z; yr=mo=dy=mn=sc=0; hr=z=null; var bRelative=false, t, tstr=sDate.toUpperCase(); for (i=0; i < 4; i++) { t=hX_5.STR_DATE_TODAY[i].toUpperCase(); if (tstr.length >= t.length && tstr.substr(0, t.length) == t) { bRelative=true; break; } } if (bRelative) { oDate=new Date(); oDate.setSeconds(0); var daysAdj=0, dayAdj=(i==1) ? 1 : ((i==2) ? -1 : 0); tstr=tstr.substr(t.length); tstr=hX_5.allTrim(tstr); if (tstr.charAt(0) == this._PLS) { daysAdj=parseInt(tstr.substr(1),10); } else if (tstr.charAt(0) == this._MIN) { daysAdj=-(parseInt(tstr.substr(1),10)); } if (i==3) { oDate=hX_5.cal.adjustDate(oDate,0,0,daysAdj,0,0,0); } else { oDate.setHours(12); oDate.setMinutes(0); oDate=hX_5.cal.adjustDate(oDate,0,0,(dayAdj+daysAdj),0,0,0); } } else { var iSign=+1; if (sDate.charAt(0)==this._MIN) { sDate=sDate.substr(1); iSign=-1; } if (len >= 4) yr=(parseInt(sDate.substr(0,4), 10) * iSign) + ((iSign<0)?-1:0); if (len >= 6) mo=parseInt(sDate.substr(4,2), 10); if (len >= 8) dy=parseInt(sDate.substr(6,2), 10); if (len >= 10) hr=parseInt(sDate.substr(8,2), 10); if (len >= 12) mn=parseInt(sDate.substr(10,2), 10); if (len >= 14) sc=parseInt(sDate.substr(12,2), 10); if (len >= 16) z=parseInt(sDate.substr(14,3), 10); if (yr == 0 && mo == 0 && dy == 0) { oDate=new Date(); yr=oDate.getFullYear(); mo=oDate.getMonth()+1; dy=oDate.getDate(); } if (z) { oDate=new Date(Date.UTC(yr, mo-1, dy, hr, mn, sc, 0)); oDate.setTime(oDate.getTime() - (z * 1000)); } else { oDate=(!hr)?(new Date (yr, mo-1, dy, 12, 0, 0)):(new Date (yr, mo-1, dy, hr, mn, sc)); } } return oDate; } HxG_5.prototype.DateTimeConverter.prototype.valueToConstant=function (oDate) { var m=hX_5.padL(oDate.getMonth()+1, 2); var d=hX_5.padL(oDate.getDate(), 2); return (oDate.getFullYear() + m + d); } HxG_5.prototype.DateTimeConverter.prototype.nReplace=function (fmt, c, cc, p, x, n) { var f=fmt, i=f.indexOf(cc), j; while (i >= 0) { j=i+2; while (f.charAt(j)==c) j++; f=hX_5.replaceAll(f, f.substring(i,j), hX_5.padL(this.cvtToDigits(x), ((n!=null)?n:(j-i-1)), p)); i=f.indexOf(cc); } return f; } HxG_5.prototype.DateTimeConverter.prototype.valueToString=function (oDate, ifmt, promptChar) { this.msgFail=hX_5._E; if (oDate == null) return hX_5._E; var fmt=((ifmt != null) ? ifmt : this.sFormatTokenized), oddampm=(fmt.indexOf("%K") >= 0); var o,x,y,z,h,k, pChar=((promptChar)?promptChar:this.getZeroDigit()), bDate=((ifmt!= null)?true:this.bHasDate), bTime=((ifmt!= null)?true:this.bHasTime); this.setCalendar(); if (bDate) { fmt=hX_5.replaceAll(fmt, "%MMMM", "@0"); fmt=hX_5.replaceAll(fmt, "%MMM", "@1"); fmt=hX_5.replaceAll(fmt, "%EEEE", "@2"); fmt=hX_5.replaceAll(fmt, "%EEE", "@3"); fmt=hX_5.replaceAll(fmt, "%EE", "@3"); fmt=hX_5.replaceAll(fmt, "%E", "@3"); fmt=hX_5.replaceAll(fmt, "%GGGG", "@4"); fmt=hX_5.replaceAll(fmt, "%GGG", "@5"); fmt=hX_5.replaceAll(fmt, "%GG", "@6"); fmt=hX_5.replaceAll(fmt, "%G", "@7"); } if (bTime) { fmt=hX_5.replaceAll(fmt, "%a", "@8"); fmt=hX_5.replaceAll(fmt, "%z", "@9"); fmt=hX_5.replaceAll(fmt, "%Z", "@!"); } if (bDate) { o=this.valueToYearEpoch(oDate); y=o.year; z=(y==0)?pChar:this.getZeroDigit(); fmt=hX_5.replaceAll(fmt, "%yyyy",hX_5.padL(this.cvtToDigits(y), 4, z)); if (fmt.indexOf("%Y") >= 0) { x=(hX_5.cal.getJulianWeek(oDate, this.FDOW)).yr; fmt=hX_5.replaceAll(fmt, "%YYYY", hX_5.padL(this.cvtToDigits(x), 4, z)); } if (fmt.indexOf("%y") >= 0 || fmt.indexOf("%Y") >= 0) { if (this.isShortYr) { fmt=this.nReplace(fmt,hX_5._lY,"%y",pChar,y); if (fmt.indexOf("%Y") >= 0) fmt=this.nReplace(fmt,hX_5._uY,"%Y",pChar,x); } else { fmt=this.nReplace(fmt,hX_5._lY,"%y",pChar,(y%100),2); if (fmt.indexOf("%Y") >= 0) fmt=this.nReplace(fmt,hX_5._uY,"%Y",pChar,(x%100),2); } } fmt=this.nReplace(fmt,hX_5._uM,"%M",pChar,(o.month+1)); if (fmt.indexOf("%w") >= 0) fmt=this.nReplace(fmt,hX_5._lW,"%w",pChar,hX_5.cal.getJulianWeek(oDate, this.FDOW).wk); if (fmt.indexOf("%W") >= 0) fmt=this.nReplace(fmt,hX_5._uW,"%W",pChar,hX_5.cal.getJulianWeekOfMonth(oDate, this.FDOW)); fmt=this.nReplace(fmt,hX_5._lD,"%d",pChar,o.date); if (fmt.indexOf("%D") >= 0) fmt=this.nReplace(fmt,hX_5._uD,"%D",pChar,hX_5.cal.getJulianDay(oDate)); if (fmt.indexOf("%g") >= 0) fmt=this.nReplace(fmt,hX_5._lG,"%g",pChar,hX_5.cal.gregorianToJulian(oDate)); if (fmt.indexOf("%F") >= 0) fmt=this.nReplace(fmt,hX_5._uF,"%F",pChar,hX_5.cal.getDayOfWeekInMonth(oDate)); if (fmt.indexOf("%e") >= 0) { x=(hX_5.cal.getDay(oDate)-this.FDOW)+1; x=(x<1)?x+7:x; fmt=this.nReplace(fmt,hX_5._lE,"%e",pChar, x); } } if (bTime) { h=oDate.getHours(); k=this.cvtToDigits(oDate.getMilliseconds()); fmt=this.nReplace(fmt,hX_5._lH,"%h",pChar,(((h%12)==0)?12:(h%12))); fmt=this.nReplace(fmt,hX_5._lK,"%k",pChar,(h+1)); fmt=this.nReplace(fmt,hX_5._uH,"%H",pChar,h); fmt=this.nReplace(fmt,hX_5._uK,"%K",pChar,((((h%12)==0)?12:(h%12))-1)); fmt=this.nReplace(fmt,hX_5._lM,"%m",pChar,oDate.getMinutes()); fmt=this.nReplace(fmt,hX_5._lS,"%s",pChar,oDate.getSeconds()); fmt=hX_5.replaceAll(fmt, "%SSS", hX_5.padL(k, 3, pChar)); fmt=hX_5.replaceAll(fmt, "%SS", hX_5.padL(k, 3, pChar).substr(0,2)); fmt=hX_5.replaceAll(fmt, "%S", hX_5.padL(k, 3, pChar).substr(0,1)); fmt=this.nReplace(fmt,hX_5._uA,"%A", pChar, oDate.getMilliseconds() + (oDate.getSeconds()*1000) + (oDate.getMinutes()*60*1000) + (oDate.getHours()*60*60*1000)); } if (bDate) { fmt=hX_5.replaceAll(fmt, "@0", this.valueToMonthLabel(oDate)); fmt=hX_5.replaceAll(fmt, "@1", this.valueToShortMonthLabel(oDate)); fmt=hX_5.replaceAll(fmt, "@2", this.valueToDayLabel(oDate)); fmt=hX_5.replaceAll(fmt, "@3", this.valueToShortDayLabel(oDate)); fmt=hX_5.replaceAll(fmt, "@4", o.name); fmt=hX_5.replaceAll(fmt, "@5", o.nameabb); fmt=hX_5.replaceAll(fmt, "@6", o.nameabb); fmt=hX_5.replaceAll(fmt, "@7", o.nameabb); } if (bTime) { fmt=hX_5.replaceAll(fmt, "@8", this.valueToAmPmLabel(oDate, oddampm)); fmt=hX_5.replaceAll(fmt, "@9", this.valueToTimeZone(oDate)); fmt=hX_5.replaceAll(fmt, "@!", this.valueToTimeZone(oDate, true)); } for (x=0; x < this.nLiteralCnt; x++) fmt=hX_5.replaceAll(fmt, hX_5._UPC+x, this.sLiterals[x]); return fmt; } HxG_5.prototype.DateTimeConverter.prototype.valueToAmPmLabel=function(oDate, oddampm) { var o=oDate.getHours(); if (oddampm) return (o==0) ? this.sPM : ((o <= 12) ? this.sAM : this.sPM); else return (o < 12) ? this.sAM : this.sPM; } HxG_5.prototype.DateTimeConverter.prototype.valueToTimeZone=function(oDate, ISO) { var r=hX_5._E, j, zoffset, k, z1, z2, z3, z4, dst=false, znames; var z=-(oDate.getTimezoneOffset()); var feb=new Date(oDate.getFullYear(), 1, 7); var jun=new Date(oDate.getFullYear(), 5, 15); var zfeb=-(feb.getTimezoneOffset()); var zjun=-(jun.getTimezoneOffset()); if (z == zfeb && z != zjun) dst=false; if (z == zjun && z != zfeb) dst=true; z1=(dst) ? 2 : 0; z2=(dst) ? 3 : 1; znames=hX_5.STR_TIMEZONES.length; for (j=znames-1; !ISO && (j>0); j--) { if (hX_5.STR_TIMEZONES[j][0] == null || hX_5.STR_TIMEZONES[j][0].length == 0) { } else { zoffset=this.readTimeZoneOffset(hX_5.STR_TIMEZONES[j][z1]); if (zoffset == z) { r=hX_5.STR_TIMEZONES[j][z2]; for (k=0;k=0; i--) { if (this.descDtEpoch[i]!=null && (oDate.Hx4CompareDate(this.descDtEpoch[i]) >= 0)) { y=y - this.descYrEpoch[i] + 1; break; } } if (i<0) i=this.descDtEpoch.length-1; } n=this.descLbEpoch[i][0]; sn=this.descLbEpoch[i][1]; if (n == "--" && sn != "--") n=sn; if (this.isSimple) sn=hX_5.padR(sn,this.abbEpochLength,hX_5._B); return { name: n, nameabb: sn, year: y, month: o.month, date:o.date }; } HxG_5.prototype.DateTimeValidator=function () { this.type=hX_5.CVT_datetime; this.required=false; this.minimumBound=this.maximumBound=this.minimumDate=this.maximumDate=null; this.oMinimum=new Date (100, 0, 1); this.oMinimum.setFullYear(100); this.ELexpression=null; this.ELexpressionImp=null; this.msgFail=hX_5._E; this.attributeTable=[]; this.attributeTable ['required']=['required', hX_5.ARG_IS_TRUE, false, null, null]; this.attributeTable ['minimum-bound']=['minimumBound', hX_5.ARG_TO_NAN, false, null, null]; this.attributeTable ['min-bound']=['minimumBound', hX_5.ARG_TO_NAN, false, null, null]; this.attributeTable ['maximum-bound']=['maximumBound', hX_5.ARG_TO_NAN, false, null, null]; this.attributeTable ['max-bound']=['maximumBound', hX_5.ARG_TO_NAN, false, null, null]; this.attributeTable ['constraint-expression']=['ELexpression', hX_5.ARG_TO_NAN, false, null, null]; this.setAttribute(arguments); } HxG_5.prototype.DateTimeValidator.prototype.setAttribute=function(a) { var wasmax=this.maximumBound; var wasmin=this.minimumBound; var DTP=new hX_5.DateTimeConverter(); hX_5.parseArg (this.attributeTable, this, a); if (this.minimumBound && wasmin != this.minimumBound) this.minimumDate=DTP.constantToValue (this.minimumBound); if (this.maximumBound && wasmax != this.maximumBound) this.maximumDate=DTP.constantToValue (this.maximumBound); if (this.maximumDate && this.minimumDate) { if (1 != this.maximumDate.Hx4CompareDate (this.minimumDate, true)) this.minimumBound=this.maximumBound=this.minimumDate=this.maximumDate=null; } if (this.ELexpression != null) this.ELexpressionImp=hX_5.regExp.registerELConstraint(this.ELexpression, "date"); return true; } HxG_5.prototype.DateTimeValidator.prototype.getAttribute=function (attribute) { return (hX_5.getArg(this.attributeTable, this, attribute)); } HxG_5.prototype.DateTimeValidator.prototype.lastError=function () { return ((this.msgFail && this.msgFail.length > 0) ? this.msgFail : null); } HxG_5.prototype.DateTimeValidator.prototype.validate=function (testV, iDTP, treatAsDate, treatAsPick) { this.msgFail=hX_5._E; var r, e, test=null, DTP=(iDTP != null) ? hX_5.getConverterById(iDTP) : null; if (DTP == null || !hX_5.isObject(DTP)) return false; var bTCompare=((treatAsDate) ? false : DTP.isTimeFormat()), bTOnly=(DTP.isTimeFormat() && !DTP.isDateFormat()); if (testV==null || hX_5.isString(testV)) { r=!(this.required); if (testV==null) { this.msgFail=(r) ? hX_5._E : hX_5.ERR_required; return r; } e=hX_5.allTrim (testV); if (e.length == 0) { this.msgFail=(r) ? hX_5._E : hX_5.ERR_required; return r; } test=DTP.stringToValue(e); } else if (testV.Hx4Clone) test=testV.Hx4Clone(2); if (test==null) { this.msgFail=hX_5.ERR_required; return false; } if (bTOnly && (this.minimumDate || this.maximumDate)) { if (test.getFullYear() > 1970) { test.setYear(1970); test.setMonth(0); test.setDate(1); } test.setMilliseconds(0); } if (treatAsPick && this.oMinimum && !bTOnly) { if (-1 == test.Hx4CompareDate(this.oMinimum)) { this.msgFail=hX_5.ERR_minimum; return false; } } if (this.minimumDate) { if (-1 == test.Hx4CompareDate(this.minimumDate, bTCompare)) { this.msgFail=hX_5.ERR_minimum; return false; } } if (this.maximumDate) { if (1 == test.Hx4CompareDate(this.maximumDate, bTCompare)) { this.msgFail=hX_5.ERR_maximum; return false; } } if (this.ELexpressionImp != null) { if (!hX_5.regExp.testELExp(test, this.ELexpressionImp)) { this.msgFail=hX_5.ERR_constraint; return false; } } return true; } HxG_5.prototype.DateTimeValidator.prototype.coerce=function (test, iDTP, treatAsDate, treatAsPick) { this.msgFail=hX_5._E; var e, o=null, DTP=(iDTP != null) ? hX_5.getConverterById(iDTP) : null; if (DTP == null || !hX_5.isObject(DTP)) { this.msgFail=hX_5.ERR_required; return false; } var bTCompare=((treatAsDate) ? false : DTP.isTimeFormat()), bTOnly=(DTP.isTimeFormat() && !DTP.isDateFormat()); if (test != null && hX_5.isString(test)) { e=hX_5.allTrim (test); if (e.length > 0) o=DTP.stringToValue(e); } else if (test.Hx4Clone) o=test.Hx4Clone(2); if (o == null) o=new Date (); if (bTOnly && (this.minimumDate || this.maximumDate)) { if (o.getFullYear() > 1970) { o.setYear(1970); o.setMonth(0); o.setDate(1); } o.setMilliseconds(0); } if (this.oMinimum && !bTOnly && treatAsPick) { if (-1 == o.Hx4CompareDate(this.oMinimum)) o=this.oMinimum.Hx4Clone(2); } if (this.minimumDate) { if (-1 == o.Hx4CompareDate(this.minimumDate, bTCompare)) o=this.minimumDate.Hx4Clone(2); } if (this.maximumDate) { if (1 == o.Hx4CompareDate(this.maximumDate, bTCompare)) o=this.maximumDate.Hx4Clone(2); } return o; } HxG_5.prototype.DateTimeAssist=function (_elem, _state, _converter, _validator, _promptChar) { if (!_elem || !_converter || !_state) return; this.isFilled=isFilled; this.onFocus=onFocus; this.onBlur=onBlur; this.onCut=onCut; this.onPaste=onPaste; this.toAssist=toAssist; this.fromAssist=fromAssist; this.onClick=onClick; this.onChangeKeyCode= onChangeKeyCode; this.onChangeChrCode= onChangeChrCode; this.onValidate=onValidate; this.destroy=destroy; var elem=_elem; var state=_state; var cvt=_converter; var validator=_validator; var pChar=_promptChar; var wasP=null; var handler=null; if (cvt.simpleFormat == null) cvt.genAssistMasks(pChar); handler=new hX_5.MaskAssist.prototype.maskHandler(elem, state, cvt, pChar); function destroy() { if (handler!=null) { if (handler.destroy) handler.destroy(); delete handler; } } function valueToSimpleString (iDate) { return (iDate == null)?handler.getEmptyMask():cvt.simpleConverter.valueToString(iDate,null,pChar); } function simpleStringToValue (sDate, ending, pos) { var r=false, i, j, test=sDate, out=sDate, rv=null, l=sDate.length, empty=true, epoch=(cvt.sFormatTokenized.indexOf("%G")>=0); cvt.setCalendar(); if (l <= 0) return {reset:false, value:null}; for (i=0; empty && ending && i cvt.maskFormat.length) return {reset:false, value:null}; var c1, c2, c3, c4, c5, m, m1, intY=-1, intYL=-1, intYT=-1, intM=-1, intD=-1, intH=-1, intMn=-1, intS=-1, strE=hX_5._E, fixH=false, fixD=false, fixM=false, fixY=false, fixG=false, leapT=false; for (i=0; i < l; i++) { if (cvt.maskFormat.charAt(i) == hX_5._LB) { c1=test.charAt(i); m=cvt.maskFormatDigits.charAt(i); if (m == hX_5._uG) { if (c1==pChar || c1==hX_5._B || c1==hX_5._E) { strE=cvt.descLbEpoch[cvt.descLbEpoch.length-1][1]; } else { strE=hX_5._E; c1=c1.toUpperCase(); for (j=0; j < cvt.descLbEpoch.length; j++) { if (c1==cvt.descLbEpoch[j][1].charAt(0).toUpperCase()) { if (cvt.minEpoch<=1 || test.charAt(i+1).toUpperCase()==cvt.descLbEpoch[j][1].charAt(1).toUpperCase()) { strE=cvt.descLbEpoch[j][1]; break; } } } if (strE != hX_5._E) fixG=r=true; } i+=cvt.abbEpochLength; } else if (m != hX_5._lY) { c1=cvt.getDigit(c1); c2=((i+1)=0)?((leapT) ? intYL : intY):intY; if (1==2 && intY==0) { intY=1; intYT=intYL=intY; fixY=r=true; } if (intM >= 0 && m==hX_5._lM && m1==hX_5._lM && intM > hX_5.cal.monthsInYear(intYT) && (Math.floor(intM/10) <= Math.floor(hX_5.cal.monthsInYear()/10))) { intM=hX_5.cal.monthsInYear(intYT); fixM=r=true; } if (intH >=0 && m==hX_5._lH && m1==hX_5._lH && intH > 23 && (Math.floor(intH/10) <= 2)) { intH=23; fixH=r=true; } if (intD>=0 && intD > 0 && intM > 0 && intM <= hX_5.cal.monthsInYear()) { j=hX_5.cal.daysInMonth(intM-1,intYT); if (intD > j) { if (m==hX_5._lD && m1==hX_5._lD && (Math.floor(intD/10) <= Math.floor(hX_5.cal.maxDaysInMonth()/10))) { intD=hX_5.cal.daysInMonth(intM-1,intYT); fixD=r=true; } else if (intD <= hX_5.cal.maxDaysInMonth()) { if (m != hX_5._lD) { intD=hX_5.cal.daysInMonth(intM-1,intYT); fixD=r=true; } else if (intYL != intY && intD <= hX_5.cal.daysInMonth(intM-1,intYL)) { intY=intYL; fixY=r=true; } else { for (j=intM+1; j!=intM; j++) { j=(j <= hX_5.cal.monthsInYear(intYT)) ? j:1; if (intD <= hX_5.cal.daysInMonth(j-1,intYT)) { intM=j; fixM=r=true; break; } } } } } } } for (i=0; i < l; i++) { if (cvt.maskFormat.charAt(i) == hX_5._LB) { m=cvt.maskFormatDigits.charAt(i); if (m == hX_5._uG) { test=test.substr(0,i) + strE + test.substr(i+cvt.abbEpochLength); if (fixG) out=out.substr(0,i) + strE + out.substr(i+cvt.abbEpochLength); i+=cvt.abbEpochLength; } else if (m != hX_5._lY) { j=(m==hX_5._uA)?intMn:((m==hX_5._lS)?intS:((m==hX_5._lH)?intH:((m==hX_5._lM)?intM:((m==hX_5._lD)?intD:-1)))); if (j >= 0) { c1=hX_5.padL(j+hX_5._E,2,cvt.getZeroDigit()); test=test.substr(0,i) + c1 + test.substr(i+2); if ((fixD && m==hX_5._lD) || (fixM && m==hX_5._lM) || (fixH && m==hX_5._lH)) { if (out.charAt(i) != c1.charAt(0)) c1=hX_5.rplOne(c1,0,pChar); if (out.charAt(i+1)!= c1.charAt(1)) c1=hX_5.rplOne(c1,1,pChar); out=out.substr(0,i) + cvt.cvtToDigits(c1) + out.substr(i+2); } } i+=1; } else { j=(cvt.isShortYr)?2:4; c1=hX_5.padL(((leapT&&!fixY)?intYL:intY)+hX_5._E,j,cvt.getZeroDigit()); test=test.substr(0,i) + c1 + test.substr(i+j); if (fixY) { if (out.charAt(i) != c1.charAt(0)) c1=hX_5.rplOne(c1,0,pChar); if (out.charAt(i+1)!= c1.charAt(1)) c1=hX_5.rplOne(c1,1,pChar); if (j>2) { if (out.charAt(i+2)!= c1.charAt(0)) c1=hX_5.rplOne(c1,2,pChar); if (out.charAt(i+3)!= c1.charAt(1)) c1=hX_5.rplOne(c1,3,pChar); } out=out.substr(0,i) + cvt.cvtToDigits(c1) + out.substr(i+j); } i+=(j-1); } } } rv=cvt.simpleConverter.stringToValue(test); if (r && !ending && rv) rv=out; r=(rv==null)?false:r; return {reset:r,value:rv}; } function isFilled (curpos) { var l=elem.value.length; if (l < cvt.maskFormat.length) return false; var c=elem.value.charAt(cvt.maskFormatLast); return (curpos > cvt.maskFormatLast && c != pChar && c != hX_5._B); } function onFocus (evt) { var newValue=toAssist(elem.value); elem.value=(newValue.v==null) ? hX_5._E : newValue.v; hX_5.sel.setCaretPos(elem, cvt.maskFormatFirst); return true; } function toAssist (v) { var newValue=(v != null) ? hX_5.Trim(v) : null; newValue=(newValue != null && newValue.length!=undefined && newValue.length > 0) ? cvt.stringToValue(newValue) : null; newValue=valueToSimpleString(newValue); return {v:newValue, i:null}; } function onBlur (evt) { var v=fromAssist(elem.value); if (v != null) { elem.value=v; return true; } return false; } function fromAssist (v) { if (v.length==0) return hX_5._E; var newValue=simpleStringToValue(v, true, 0).value; return ((newValue == null || (newValue.length!=undefined && newValue.length==0)) ? hX_5._E : cvt.valueToString(newValue)); } function onClick (evt) { return handler.onClick(evt); } function onCut (evt) { return handler.onCut(evt); } function onPaste (evt) { return handler.onPaste(evt); } function onChangeKeyCode (evt) { wasP=state.getPos(); return handler.onChangeKeyCode (evt); } function onChangeChrCode (evt) { wasP=state.getPos(); cvt.digitTransmute(evt); return handler.onChangeChrCode (evt); } function onValidate () { var reset, i, v=state.getValue(), nV=simpleStringToValue(v, false, wasP); if (nV.value != null) { if (nV.reset) { if (v!=nV.value)state.setValue(nV.value); return true; } else { nV=valueToSimpleString(nV.value); if (nV != null) return true; } } return false; } } HxG_5.prototype.NumberConverter=function () { this.type=hX_5.CVT_number; this.nStrict=hX_5.NFMT_DEFAULTSTRICT; this.pattern=hX_5.NFMT_DECIMAL0; this.locale=hX_5.NFMT_LOCALE0; this.invalidPattern=false; this.ICU4J=false; this.digitFirst=null; this.upattern=null; this.DF_GroupingSize=this.DF_GroupingSecSize=null; this.DF_NegativePrefix=this.DF_NegativeSuffix=this.DF_PositivePrefix=this.DF_PositiveSuffix=null; this.DF_NegativePattern=null; this.DF_IsDecimalShown=null; this.DF_PaddingChar=hX_5._E; this.DF_PaddingPos=this.DF_PaddingLeft=this.DF_PaddingRight=null; this.DF_MinIntegerDigits=this.DF_MaxIntegerDigits=this.DF_MinFractionDigits=this.DF_MaxFractionDigits=this.DF_MinExponentDigits=null; this.DF_MaxLength=this.DF_MaxPadLength=null; this.isExponent=this.isExponentSigned=this.isPercent=this.isMille=false; this.FMTChars=";0#.,E"; this.PREChars=hX_5.STR_percent_char+hX_5.STR_mille_char+hX_5.STR_icurrency_char; this.hardPlus="+"; this.hardMinus="-"; this.hardE="E"; this.hardS="*"; this.xDigits=this.zeroDigit=null; this.LC_groupingSymbol=this.LC_decimalSymbol=this.LC_percentSymbol=this.LC_milleSymbol=this.LC_minusSymbol=this.LC_currencySymbol=null; this.LC_paddingChar=hX_5._Z; this.msgFail=this.intMsgFail=hX_5._E; this.signedConverter=this.zeroConverter=null; this.attributeTable=[]; this.attributeTable ['strict']=['nStrict', hX_5.ARG_TO_NUM, false, 0, 2]; this.attributeTable ['pattern']=['pattern', hX_5.ARG_TO_NAS, false, null, null]; this.attributeTable ['locale']=['locale', hX_5.ARG_TO_NAS, false, null, null]; this.attributeTable ['digits']=['digitFirst', hX_5.ARG_TO_NUM, false, 0, 999999]; this.attributeTable ['icu4j']=['ICU4J', hX_5.ARG_IS_TRUE, false, null, null]; this.setAttribute(arguments); } HxG_5.prototype.NumberConverter.prototype.setAttribute=function(a) { hX_5.parseArg (this.attributeTable, this, a); this.parseDigits(); this.parseLocaleString(); this.parsePatternString(); if (this.signedConverter) this.genAssistMasks(); return true; } HxG_5.prototype.NumberConverter.prototype.parseDigits=function () { this.xDigits=null; this.zeroDigit=hX_5._Z; if (this.digitFirst != null) { this.xDigits=String.fromCharCode(this.digitFirst, this.digitFirst+1, this.digitFirst+2, this.digitFirst+3, this.digitFirst+4, this.digitFirst+5, this.digitFirst+6, this.digitFirst+7, this.digitFirst+8, this.digitFirst+9); this.zeroDigit=this.xDigits.charAt(0); } this.LC_paddingChar=this.zeroDigit; } HxG_5.prototype.NumberConverter.prototype.parseLocaleString=function () { this.LC_groupingSymbol=(this.locale.charAt(0) == hX_5._E) ? hX_5.NFMT_LOCALE0.charAt(0) : this.locale.charAt(0); this.LC_decimalSymbol=(this.locale.charAt(1) == hX_5._E) ? hX_5.NFMT_LOCALE0.charAt(1) : this.locale.charAt(1); this.LC_percentSymbol=(this.locale.charAt(2) == hX_5._E) ? hX_5.NFMT_LOCALE0.charAt(2) : this.locale.charAt(2); this.LC_milleSymbol=(this.locale.charAt(3) == hX_5._E) ? hX_5.NFMT_LOCALE0.charAt(3) : this.locale.charAt(3); this.LC_minusSymbol=(this.locale.charAt(4) == hX_5._E) ? hX_5.NFMT_LOCALE0.charAt(4) : this.locale.charAt(4); this.LC_currencySymbol=(this.locale.substr(5) == hX_5._E) ? hX_5.NFMT_LOCALE0.substr(5) : this.locale.substr(5); } HxG_5.prototype.NumberConverter.prototype.parsePatternString=function () { this.DF_GroupingSize=this.DF_GroupingSecSize=0; this.DF_NegativePrefix=this.DF_NegativeSuffix=this.DF_PositivePrefix=this.DF_PositiveSuffix=hX_5._E; this.DF_NegativePattern=this.DF_IsDecimalShown=false; this.DF_MinIntegerDigits=this.DF_MaxIntegerDigits=this.DF_MinFractionDigits=this.DF_MaxFractionDigits=this.DF_MinExponentDigits=0; this.DF_PaddingPos=null; this.DF_PaddingChar=this.DF_PaddingLeft=this.DF_PaddingRight=hX_5._E; this.isExponent=this.isExponentSigned=this.isPercent=this.isMille=this.invalidPattern=false; this.DF_MaxLength=this.DF_MaxPadLength=0; this.upattern=this.pattern; var fmt=this.pattern, index, i, j=0, xchar, nchar, bInPositivePattern=true, bInPrefix=true; var bInNumber=false, bInExponent=false, bInQuote=false, bHaveGroup=0; var bInMinInteger=false, bInMaxInteger=false, bInMinFraction=false, bInMaxFraction=false; for (i=fmt.length-1; j < 4 && i > 0; i--) { xchar=fmt.charAt(i); if (xchar==hX_5._SQT || xchar==hX_5._P || xchar==hX_5._SM) break; if (hX_5._SL == fmt.charAt(i)) { xchar=fmt.substr(i+1); this.upattern=fmt=fmt.substr(0,i); if (xchar.length==1) this.DF_PaddingLeft=xchar; else if (xchar.length==2) { this.DF_PaddingLeft=xchar.substr(0,1); this.DF_PaddingRight=xchar.substr(1,1); } break; } j--; } var len=fmt.length; for (index=0; index < len; index++) { xchar=fmt.charAt(index); if (bInQuote) { if (xchar == hX_5._SQT) { nchar=fmt.charAt(index+1); if (nchar == hX_5._SQT) { this.addToPreSuf (bInPositivePattern, bInPrefix, bInQuote, xchar); index++; } else { bInQuote=false; } } else { this.addToPreSuf (bInPositivePattern, bInPrefix, bInQuote, xchar); } } else if (!hX_5.isChar(xchar, this.FMTChars)) { if (!bInPrefix) bInNumber=bInMinInteger=bInMaxInteger=bInMinFraction=bInMaxFraction=bInExponent=false; if (this.ICU4J && xchar == this.hardS) { if (this.DF_PaddingPos || fmt.charAt(index+1)==null) { this.invalidPattern=true; this.intMsgFail=hX_5.INTERR_Format_Padding; break; } if (bInPositivePattern) { if (bInPrefix) { this.DF_PaddingPos=(this.DF_PositivePrefix.length == 0) ? 1:2; bInPrefix=false; bInNumber=true; } else this.DF_PaddingPos=(this.DF_PositiveSuffix.length == 0) ? 3:4; this.DF_PaddingChar=fmt.charAt(index+1); this.upattern=this.upattern.substr(0,index)+this.upattern.substr(index+2); } index++; } else if (xchar == hX_5._SQT) { nchar=fmt.charAt(index+1); if (nchar == hX_5._SQT) { this.addToPreSuf (bInPositivePattern, bInPrefix, bInQuote, xchar); index++; } else { bInQuote=true; } } else { this.addToPreSuf (bInPositivePattern, bInPrefix, bInQuote, xchar); } } else { if (xchar == hX_5._SM) { bInPositivePattern=bInNumber=bInMinInteger=bInMaxInteger=bInMinFraction=bInMaxFraction=bInExponent=false; this.DF_NegativePattern=true; bInPrefix=true; } else { if (!bInPrefix && !bInNumber) { this.invalidPattern=true; this.intMsgFail=hX_5.INTERR_Format_Symbol; break; } bInPrefix=false; bInNumber=true; if (!bInPositivePattern) { if (xchar == this.hardE && fmt.charAt(index+1)) index++; if (xchar == this.hardS) index++; } else { if (xchar == hX_5._Z) { if (bInExponent) { this.DF_MinExponentDigits++; } else if (bInMinInteger) { this.DF_MinIntegerDigits++; } else if (bInMinFraction) { this.DF_MinFractionDigits++; } else if (bInMaxFraction) { this.invalidPattern=true; this.intMsgFail=hX_5.INTERR_Format_ZSymbol; break; } else { if (this.DF_MinIntegerDigits > 0) { this.invalidPattern=true; this.intMsgFail=hX_5.INTERR_Format_ZSymbol; break; } this.DF_MinIntegerDigits++; bInMaxInteger=false; bInMinInteger=true; } if (bInMaxInteger || bInMinInteger) this.DF_GroupingSize++; } else if (xchar == hX_5._LB) { if (bInMinInteger || bInExponent) { this.invalidPattern=true; this.intMsgFail=hX_5.INTERR_Format_LSymbol; break; } else if (bInMaxInteger) { this.DF_MaxIntegerDigits++; } else if (bInMaxFraction) { this.DF_MaxFractionDigits++; } else if (bInMinFraction) { this.DF_MaxFractionDigits++; bInMinFraction=false; bInMaxFraction=true; } else { this.DF_MaxIntegerDigits++; bInMaxInteger=true; } if (bInMaxInteger || bInMinInteger) this.DF_GroupingSize++; } else if (xchar == hX_5._C) { if (!bInMinInteger && !bInMaxInteger) { this.invalidPattern=true; this.intMsgFail=hX_5.INTERR_Format_Group + bInMaxInteger + hX_5._P; break; } if (bInMaxInteger || bInMinInteger) { this.DF_GroupingSecSize=this.DF_GroupingSize; this.DF_GroupingSize=0; } bHaveGroup++ } else if (xchar == hX_5._P) { if (bInExponent || this.DF_IsDecimalShown) { this.invalidPattern=true; this.intMsgFail=hX_5.INTERR_Format_Decimal; break; } bInMinInteger=false; bInMaxInteger=false; bInMinFraction=true; this.DF_IsDecimalShown=true; } else if (xchar == this.hardE) { if (this.isExponent || (!bInMinInteger && !bInMaxInteger && !bInMinFraction && !bInMaxFraction)) { this.invalidPattern=true; this.intMsgFail=hX_5.INTERR_Format_Exponent; break; } bInMinInteger=bInMaxInteger=bInMinFraction=bInMaxFraction=false; bInExponent=true; this.isExponent=true; if (this.ICU4J && fmt.charAt(index+1) == this.hardPlus) { this.isExponentSigned=true; index++; } } } } } } this.DF_MaxIntegerDigits+=this.DF_MinIntegerDigits; this.DF_MaxFractionDigits+=this.DF_MinFractionDigits; if (bHaveGroup==0 || this.isExponent) this.DF_GroupingSize=this.DF_GroupingSecSize=0; if (this.DF_GroupingSize > 0) { if (!this.ICU4J || this.DF_GroupingSecSize==0 || bHaveGroup<=1) this.DF_GroupingSecSize=this.DF_GroupingSize; } if (this.isPercent && this.isMille) { this.invalidPattern=true; this.intMsgFail=hX_5.INTERR_Format_Percent; } if (this.DF_PaddingPos) this.DF_PaddingLeft=this.DF_PaddingRight=hX_5._E; if (!this.invalidPattern) { var pre, post, dec, exp, com=0; if (this.isExponent) { pre=Math.max(this.DF_NegativePrefix.length, this.DF_PositivePrefix.length); post=Math.max(this.DF_NegativeSuffix.length, this.DF_PositiveSuffix.length); dec=(this.DF_IsDecimalShown) ? this.LC_decimalSymbol.length : 0; exp=this.DF_MinExponentDigits + ((this.isExponentSigned)?1:0); this.DF_MaxLength=pre + this.DF_MaxIntegerDigits + dec + this.DF_MaxFractionDigits + 1 + exp + post; this.DF_MaxPadLength=this.DF_PositivePrefix.length + this.DF_MaxIntegerDigits + dec + this.DF_MaxFractionDigits + 1 + exp + this.DF_PositiveSuffix.length; } else { pre=Math.max(this.DF_NegativePrefix.length, this.DF_PositivePrefix.length); post=Math.max(this.DF_NegativeSuffix.length, this.DF_PositiveSuffix.length); dec=(this.DF_IsDecimalShown) ? this.LC_decimalSymbol.length : 0; if (this.DF_GroupingSize == 0 || this.DF_GroupingSize > this.DF_MaxIntegerDigits) com=0; else if (this.DF_GroupingSize == this.DF_GroupingSecSize) com=Math.floor((this.DF_MaxIntegerDigits-1)/this.DF_GroupingSize); else { i=this.DF_MaxIntegerDigits; j=this.DF_GroupingSize; while (i > j) { com++; i -= j; j=(j == this.DF_GroupingSize) ? this.DF_GroupingSecSize : this.DF_GroupingSize; } } this.DF_MaxLength=pre + this.DF_MaxIntegerDigits + com + dec + this.DF_MaxFractionDigits + post; this.DF_MaxPadLength=this.DF_PositivePrefix.length + this.DF_MaxIntegerDigits + com + dec + this.DF_MaxFractionDigits + this.DF_PositiveSuffix.length; } if (!this.DF_NegativePattern) this.DF_MaxLength++; if (!this.DF_NegativePattern) this.DF_MaxPadLength++; } } HxG_5.prototype.NumberConverter.prototype.addToPreSuf=function (bInPositivePattern, bInPrefix, bInQuote, c) { var xchar=c; if (!bInQuote && hX_5.isChar(xchar, this.PREChars)) { if (xchar == hX_5.STR_percent_char) { xchar=this.LC_percentSymbol; this.isPercent=true; } else if (xchar == hX_5.STR_mille_char){ xchar=this.LC_milleSymbol; this.isMille=true; } else if (xchar == hX_5.STR_icurrency_char) { xchar=this.LC_currencySymbol; } } if (bInPositivePattern) { if (bInPrefix) this.DF_PositivePrefix=this.DF_PositivePrefix + xchar; else this.DF_PositiveSuffix=this.DF_PositiveSuffix + xchar; } else { if (bInPrefix) this.DF_NegativePrefix=this.DF_NegativePrefix + xchar; else this.DF_NegativeSuffix=this.DF_NegativeSuffix + xchar; } } HxG_5.prototype.NumberConverter.prototype.getAttribute=function (attribute) { return (hX_5.getArg(this.attributeTable, this, attribute)); } HxG_5.prototype.NumberConverter.prototype.lastError=function () { return ((this.msgFail && this.msgFail.length > 0) ? this.msgFail : null); } HxG_5.prototype.NumberConverter.prototype.getMaxLength=function (v) { if (!this.DF_NegativePattern && v && this.DF_MaxLength>1) return ((v.validate(-1, this) || v.validate(-10, this))?this.DF_MaxLength:this.DF_MaxLength-1); return this.DF_MaxLength; } HxG_5.prototype.NumberConverter.prototype.genAssistMasks=function() { var args=[], pop=false; if (this.nStrict) args.push("strict:" +this.nStrict); if (this.locale) args.push("locale:" +this.locale); if (this.digitFirst)args.push("digits:" +this.digitFirst); if (this.ICU4J) args.push("icu4j:" +this.ICU4J); if (this.DF_NegativePattern) { if (this.DF_PaddingLeft.length==0 && this.DF_PaddingRight.length==0) { this.signedConverter=this; } else { if (this.upattern) args.push("pattern:"+this.upattern); pop=true; this.signedConverter=new hX_5.NumberConverter(args[0],args[1],args[2],((args.length>3)?args[3]:null),((args.length>4)?args[4]:null),((args.length>5)?args[5]:null)); } } else { if (this.upattern) args.push("pattern:"+this.upattern + hX_5._SM + this.LC_minusSymbol + this.upattern); pop=true; this.signedConverter=new hX_5.NumberConverter(args[0],args[1],args[2],((args.length>3)?args[3]:null),((args.length>4)?args[4]:null),((args.length>5)?args[5]:null)); } var p1=hX_5._E, p=this.signedConverter.upattern; p=hX_5.replaceAll(p, hX_5._Z,hX_5._LB); var k=p.indexOf(hX_5._SM); if (k >= 0) { p1=p.substr(k); p=p.substr(0,k); } k=p.indexOf(hX_5._P); if (k > 0 && p.charAt(k-1)==hX_5._LB) p=p.substr(0,k-1) + hX_5._Z + p.substr(k); else if (k < 0) { k=p.length-1; while (k >= 0 && p.charAt(k) != hX_5._LB) k--; p=p.substr(0,k) + hX_5._Z + p.substr(k+1); } if (p1.length > 0) { k=p1.indexOf(hX_5._P); if (k > 0 && p1.charAt(k-1)==hX_5._LB) p1=p1.substr(0,k-1) + hX_5._Z + p1.substr(k); else if (k < 0) { k=p1.length-1; while (k >= 0 && p1.charAt(k) != hX_5._LB) k--; p1=p1.substr(0,k) + hX_5._Z + p1.substr(k+1); } } p=p+p1; if (pop) args.pop(); args.push("pattern:"+p); this.zeroConverter=new hX_5.NumberConverter(args[0],args[1],args[2],((args.length>3)?args[3]:null),((args.length>4)?args[4]:null),((args.length>5)?args[5]:null)); } HxG_5.prototype.NumberConverter.prototype.stringToValue=function (numString, promptChar) { this.msgFail=this.intMsgFail=hX_5._E; var argsFail=[numString]; if (numString == null || hX_5.isUnDef(typeof(numString)) || !hX_5.isString(numString)) { this.msgFail=hX_5.ERR_empty; return null; } if (this.invalidPattern) { this.msgFail=hX_5.ERR_number_fail; return null; } var sNum=hX_5.Trim(numString); if (this.DF_PaddingPos == 1) sNum=hX_5.trimL(sNum, this.DF_PaddingChar); if (this.DF_PaddingPos == 4) sNum=hX_5.trimR(sNum, this.DF_PaddingChar); if (this.DF_PaddingRight.length > 0 && this.DF_PaddingLeft.length > 0 && this.DF_PaddingRight == hX_5._B && this.DF_PaddingLeft == this.DF_PaddingRight) sNum=numString; if (sNum.length==0) { this.msgFail=hX_5.ERR_empty; return null; } var i, j, sign=+1; var preposmatch=false, prenegmatch=false, postposmatch=false, postnegmatch=false; var nopos=this.DF_PositivePrefix.length == 0 && this.DF_PositiveSuffix.length == 0; var noneg=this.DF_NegativePrefix.length == 0 && this.DF_NegativeSuffix.length == 0; if ((!this.DF_NegativePattern) && sNum.charAt(0) == this.LC_minusSymbol) { sNum=sNum.substr(1); sign=-1; prenegmatch=true; postnegmatch=true; } if (sign > 0 && nopos && sNum.charAt(0) == this.hardPlus) { sNum=sNum.substr(1); preposmatch=true; postposmatch=true; } var pre, post, match=false; if (!noneg) { pre=hX_5.Trim(this.DF_NegativePrefix.toUpperCase()); post=hX_5.Trim(this.DF_NegativeSuffix.toUpperCase()); prenegmatch=!(pre.length > 0); postnegmatch=!(post.length > 0); if (!prenegmatch && sNum.length >= pre.length && pre == (sNum.substr(0,pre.length)).toUpperCase()) prenegmatch=true; if (!postnegmatch && sNum.length >= post.length && post == (sNum.substr(sNum.length-post.length)).toUpperCase()) postnegmatch=true; if (prenegmatch && postnegmatch) { match=true; sNum=sNum.substr(pre.length); sNum=sNum.substr(0,sNum.length-post.length); } } if (!nopos && !match) { pre=hX_5.Trim(this.DF_PositivePrefix.toUpperCase()); post=hX_5.Trim(this.DF_PositiveSuffix.toUpperCase()); preposmatch=!(pre.length > 0); postposmatch=!(post.length > 0); if (!preposmatch && sNum.length >= pre.length && pre == (sNum.substr(0,pre.length)).toUpperCase()) preposmatch=true; if (!postposmatch && sNum.length >= post.length && post == (sNum.substr(sNum.length-post.length)).toUpperCase()) postposmatch=true; if (preposmatch && postposmatch) { match=true; sNum=sNum.substr(pre.length); sNum=sNum.substr(0,sNum.length-post.length); } } if (!match && noneg && this.DF_NegativePattern) prenegmatch=postnegmatch=match=true; if (prenegmatch && postnegmatch) sign=-1; else if (preposmatch && postposmatch) sign=+1; else if (!noneg || !nopos) { if (this.nStrict > 1) { if (!noneg && !nopos) this.msgFail=hX_5.ERR_number_fail; } } if (this.msgFail.length == 0) { var left, right; if (promptChar) sNum=hX_5.replaceAll(sNum, promptChar, hX_5._B); sNum=hX_5.Trim(sNum); if (this.DF_PaddingPos >= 1 && this.DF_PaddingPos <= 2) sNum=hX_5.trimL(sNum, this.DF_PaddingChar); if (this.DF_PaddingPos >= 3 && this.DF_PaddingPos <= 4) sNum=hX_5.trimR(sNum, this.DF_PaddingChar); j=sNum.indexOf(this.LC_decimalSymbol); if (j >= 0) { left=sNum.substr(0,j); right= sNum.substr(j+1); } else { if (this.isExponent) { sNum=sNum.toUpperCase(); j=sNum.indexOf(this.hardE); if (j >= 0) { left=sNum.substr(0,j); right= sNum.substr(j); } else { left=sNum; right=hX_5._E; } } else { left=sNum; right=hX_5._E; } } if (this.DF_PaddingLeft.length > 0 && this.DF_PaddingLeft != this.LC_paddingChar) left=hX_5.trimL(left, this.DF_PaddingLeft); if (this.DF_PaddingPos >= 1 && this.DF_PaddingPos <= 2) left=hX_5.trimL(left, this.DF_PaddingChar); if (this.DF_PaddingRight.length > 0 && this.DF_PaddingRight != this.LC_paddingChar) right= hX_5.trimR(right, this.DF_PaddingRight); if (this.DF_PaddingPos >= 3 && this.DF_PaddingPos <= 4) right= hX_5.trimR(right, this.DF_PaddingChar); left=(left.length==0) ? hX_5._Z:left; var leftc=hX_5._E, rightc=hX_5._E; while (left.length > 0) { if (this.matchDigit(left)) { leftc=leftc + this.getDigit(left); left=left.substr(1); } else if (!this.isExponent && left.charAt(0) == this.LC_groupingSymbol) { left=left.substr(1); } else { argsFail[1]=left.charAt(0); this.msgFail=hX_5.ERR_number_char; break; } } var bE=false, bS=false; while ((this.msgFail.length == 0) && (right.length > 0)) { if (this.matchDigit(right)) { rightc=rightc + this.getDigit(right); right=right.substr(1); } else if (this.isExponent) { if ((!bE && right.charAt(0) == this.hardE) || ((!bS && (right.charAt(0) == this.LC_minusSymbol || right.charAt(0) == this.hardMinus || right.charAt(0) == this.hardPlus)))) { if (right.charAt(0) == this.hardE) bE=true; else bS=true; rightc=rightc + right.charAt(0); right=right.substr(1); } else { argsFail[1]=right.charAt(0); this.msgFail=hX_5.ERR_number_char; break; } } else { argsFail[1]=right.charAt(0); this.msgFail=hX_5.ERR_number_char; break; } } if ((this.msgFail.length == 0) && (leftc.length == 0) && (rightc.length==0)) this.msgFail=hX_5.ERR_empty; var r, o; if (this.msgFail.length == 0 && this.isExponent) { rightc=(rightc.length == 0) ? hX_5._Z : rightc; sNum=((sign < 0) ? this.hardMinus:hX_5._E) + leftc + this.LC_decimalSymbol + rightc; r=new Number(sNum); if (isNaN(r)) r=null; if (r == null) this.msgFail=hX_5.ERR_number_fail; } else if (this.msgFail.length == 0) { if (leftc.length == 0) leftc=hX_5._Z; if (rightc.length == 0) rightc=hX_5._Z; if (isNaN(leftc)) leftc=hX_5._Z; if (isNaN(rightc)) rightc=hX_5._Z; while (leftc.length + rightc.length > 17) { if (rightc.length > 0) rightc=rightc.substr(0,rightc.length-1); else leftc=leftc.substr(1); } o=leftc + hX_5._P + rightc; r=new Number(o); if (isNaN(r)) r=null; if (r == null) { this.msgFail=hX_5.ERR_number_fail; } else { if (this.isPercent) r=r/100; if (this.isMille) r=r/1000; r=r * sign; } } } if (this.msgFail.length > 0) { this.msgFail=hX_5.NLSFormatMsg (this.msgFail, argsFail); return null; } return (r); } HxG_5.prototype.NumberConverter.prototype.matchDigit=function (str) { if (str.length > 0) { if (hX_5.WDIGITS.indexOf(str.charAt(0)) >= 0) return true; if (this.xDigits != null && this.xDigits.indexOf(str.charAt(0)) >= 0) return true; } return false; } HxG_5.prototype.NumberConverter.prototype.getDigit=function (str) { if (this.xDigits == null) return (str.charAt(0)); if (hX_5.WDIGITS.indexOf(str.charAt(0)) >= 0) return (str.charAt(0)); return (hX_5.WDIGITS.charAt(str.charCodeAt(0) - this.xDigits.charCodeAt(0))); } HxG_5.prototype.NumberConverter.prototype.convertToDigits=function (str) { if (this.xDigits == null) return str; var r=hX_5._E; while (str.length > 0) { if (hX_5.WDIGITS.indexOf(str.charAt(0)) >= 0) r=r + this.xDigits.charAt(str.charCodeAt(0)-hX_5.WDIGITS.charCodeAt(0)); else r=r + str.charAt(0); str=str.substr(1); } return r; } HxG_5.prototype.NumberConverter.prototype.getZeroDigit=function () { return (this.zeroDigit); } HxG_5.prototype.NumberConverter.prototype.isZeroDigit=function (c) { return (c==hX_5._Z || c==this.zeroDigit); } HxG_5.prototype.NumberConverter.prototype.markDecimal=function (str) { for (var i=0; i < str.length; i++) { if (!this.matchDigit(str.charAt(i))) return i; } return -1; } HxG_5.prototype.NumberConverter.prototype.valueToString=function (numValue, promptChar) { this.msgFail=hX_5._E; if (numValue == null || numValue == 'undefined' || isNaN(numValue) || this.invalidPattern) return hX_5._E; var strValue=null, i, j, n, g, zero, sign=((numValue >= 0) ? +1 : -1), abs=Math.abs(numValue); if (this.isExponent) { var nExp=0, fMant=hX_5._E, dMant=hX_5._E, expnum=new String(abs); expnum=expnum.toUpperCase(); i=expnum.indexOf(this.hardE); if (i >= 0) { nExp=new Number(expnum.substr(i+1)); expnum=expnum.substr(0,i); } i=expnum.indexOf(this.LC_decimalSymbol); i=(i < 0) ? expnum.indexOf(hX_5._P) : i; dMant=expnum; if (i >= 0) { dMant=expnum.substr(0,i); fMant=expnum.substr(i+1); } while (dMant.length > 0 && this.isZeroDigit(dMant.charAt(0))) dMant=dMant.substr(1); while (fMant.length > 0 && this.isZeroDigit(fMant.charAt(fMant.length-1))) fMant=fMant.substr(0, fMant.length-1); var sci=(this.DF_MaxIntegerDigits > this.DF_MinIntegerDigits) && (this.DF_MaxIntegerDigits > 1); zero=(dMant.length==0 && fMant.length==0); var tmp_DF_MinIntegerDigits=(!sci) ? this.DF_MinIntegerDigits : ((this.DF_MinIntegerDigits > 0) ? 1: 0); var e=(zero) ? 0 : tmp_DF_MinIntegerDigits - dMant.length; for (i=0; dMant.length==0 && i < fMant.length && this.isZeroDigit(fMant.charAt(i)); i++) e++; nExp -= e; if (sci) { var eToBe=(nExp<0) ? ((Math.ceil (Math.abs(nExp)/this.DF_MaxIntegerDigits)) * -this.DF_MaxIntegerDigits) : ((Math.floor(Math.abs(nExp)/this.DF_MaxIntegerDigits)) * this.DF_MaxIntegerDigits); e=e + (nExp - eToBe); nExp=eToBe; } if (e > 0) { fMant=hX_5.padR(fMant,e); dMant=dMant + fMant.substr(0,e); fMant=fMant.substr(e); } else if (e < 0) { fMant=dMant.substr(dMant.length+e) + fMant; dMant=dMant.substr(0,dMant.length+e); } var exp=(Math.abs(nExp)).toString(); exp=this.hardE + ((nExp >= 0) ? (this.isExponentSigned?this.hardPlus:hX_5._E):this.LC_minusSymbol) + hX_5.padL(exp, this.DF_MinExponentDigits); while (dMant.length > tmp_DF_MinIntegerDigits && this.isZeroDigit(dMant.charAt(0))) dMant=dMant.substr(1); var sigDigits=this.DF_MaxIntegerDigits - dMant.length + ((this.DF_MinFractionDigits==0 || 1==1) ? this.DF_MaxFractionDigits : this.DF_MinFractionDigits); var fM=hX_5.truncateRoundHalfEven(fMant, sigDigits); fMant=fM.value; if (fM.overflow) { n=new Number(dMant) + 1; dMant=((sign < 0)?this.hardMinus:hX_5._E) + n.toString() + hX_5._P + fMant + exp; n=new Number(dMant); return (this.valueToString (n)); } else { sigDigits=(zero) ? this.DF_MinFractionDigits : ((!sci) ? this.DF_MinFractionDigits : (this.DF_MinIntegerDigits + this.DF_MinFractionDigits - dMant.length)); dMant=hX_5.padL(dMant, tmp_DF_MinIntegerDigits); fMant=hX_5.padR(fMant, sigDigits); while (fMant.length > sigDigits && this.isZeroDigit(fMant.charAt(fMant.length-1))) fMant=fMant.substr(0,fMant.length-1); strValue=(fMant.length == 0 || !this.DF_IsDecimalShown) ? (dMant + exp) : (dMant + this.LC_decimalSymbol + fMant + exp); } } else { var left=Math.floor(abs), right=abs - left; var fR, nR, nL, fullstring=abs.toString(), fullleft=fullstring, fullright=hX_5._E, q=this.markDecimal(fullstring); if (q >= 0) { fullleft=fullstring.substr(0,q); fullright=fullstring.substr(q+1); } left=left.toString(); right=right.toString(); right=right.substr(this.markDecimal(right)+1); if (right != fullright && !(right.length==1 && this.isZeroDigit(right))) { if (fullright.length < right.length) right=fullright; } if (this.isPercent) { right=hX_5.padR(right,2); left=left + right.substr(0,2); right=right.substr(2); } else if (this.isMille) { right=hX_5.padR(right,3); left=left + right.substr(0,3); right=right.substr(3); } if (right.length > this.DF_MaxFractionDigits) { fR=hX_5.truncateRoundHalfEven(right, this.DF_MaxFractionDigits); right=fR.value; if (fR.overflow) { n=new Number(left); n=(n+1); left=n.toString(); } } right=hX_5.padR(right, this.DF_MinFractionDigits, this.LC_paddingChar); left=hX_5.padL(left, this.DF_MinIntegerDigits, this.LC_paddingChar); while (left.length > this.DF_MinIntegerDigits && left.charAt(0) == this.LC_paddingChar) left=left.substr(1); while (right.length > this.DF_MinFractionDigits && right.charAt(right.length-1) == this.LC_paddingChar) right=right.substr(0,right.length-1); nR=new Number(right); nL=new Number(left); zero=(nR == 0) && (nL == 0); var zR=this.LC_paddingChar, zL=zR, zZ=false; if (this.DF_PaddingLeft.length > 0) { zL=(this.DF_PaddingLeft.length > 0) ? this.DF_PaddingLeft : this.LC_paddingChar; zR=(this.DF_PaddingRight.length > 0) ? this.DF_PaddingRight : this.LC_paddingChar; zZ=(this.DF_PaddingLeft.length > 0) && (this.DF_PaddingRight.length > 0) && (this.DF_PaddingLeft == this.DF_PaddingRight); if (zL != this.LC_paddingChar) { if (zero && zZ) { left=hX_5.padR(hX_5._E, this.DF_MinIntegerDigits, zL); right=hX_5.padR(hX_5._E, this.DF_MinFractionDigits, zL); } else { for (i=0; i < left.length; i++) { if (left.charAt(i) != this.LC_paddingChar) break; left=left.substr(0,i) + zL + left.substr(i+1); } } } if (zR != this.LC_paddingChar) { for (i=right.length-1; i >= 0; i--) { if (right.charAt(i) != this.LC_paddingChar) break; right=right.substr(0,i) + zR + right.substr(i+1); } } } if (promptChar) { if (left.length > 0 && left.length > this.DF_MaxIntegerDigits) left=left.substr(left.length-this.DF_MaxIntegerDigits); if (right.length > 0 && right.length > this.DF_MaxFractionDigits) right=right.substr(0, this.DF_MaxFractionDigits); while (left.length > this.DF_MinIntegerDigits && left.charAt(0) == zL) left=left.substr(1); while (right.length > this.DF_MinFractionDigits && right.charAt(right.length-1) == zR) right=right.substr(0,right.length-1); left=hX_5.padL(left, this.DF_MaxIntegerDigits, promptChar); right=hX_5.padR(right, this.DF_MaxFractionDigits, promptChar); } if (this.xDigits != null) { left=this.convertToDigits(left); right= this.convertToDigits(right); } j=0; strValue=left; if (this.DF_GroupingSize > 0) { strValue=hX_5._E; g=this.DF_GroupingSize; for (i=left.length-1; i >= 0; i--) { if (j==g) { if (promptChar) strValue=((left.charAt(i)==promptChar) ? hX_5._E : this.LC_groupingSymbol) + strValue; else if (zL != this.LC_paddingChar) strValue=((left.charAt(i)==zL) ? zL : this.LC_groupingSymbol) + strValue; else strValue=this.LC_groupingSymbol + strValue; j=0; g=(g==this.DF_GroupingSize) ? this.DF_GroupingSecSize:this.DF_GroupingSize; } strValue=left.charAt(i) + strValue; j++; } } if (this.DF_IsDecimalShown) { if (zero && zZ && zL != this.LC_paddingChar) strValue=strValue + zL + right; else strValue=strValue + this.LC_decimalSymbol + right; } } if (sign > 0 || zero) strValue=this.DF_PositivePrefix + strValue + this.DF_PositiveSuffix; else strValue=(!this.DF_NegativePattern) ? (this.LC_minusSymbol + this.DF_PositivePrefix + strValue + this.DF_PositiveSuffix) : (this.DF_NegativePrefix + strValue + this.DF_NegativeSuffix); if (this.DF_PaddingPos > 0) { if (this.DF_PaddingPos == 1) strValue=hX_5.padL(strValue, this.DF_MaxPadLength, this.DF_PaddingChar); if (this.DF_PaddingPos == 4) strValue=hX_5.padR(strValue, this.DF_MaxPadLength, this.DF_PaddingChar); if (this.DF_PaddingPos == 2) { if (sign > 0 || zero) { if (this.DF_PositivePrefix.length == 0) strValue=hX_5.padL(strValue, this.DF_MaxPadLength, this.DF_PaddingChar); else strValue=this.DF_PositivePrefix + hX_5.padL(strValue.substr(this.DF_PositivePrefix.length), this.DF_MaxPadLength-this.DF_PositivePrefix.length, this.DF_PaddingChar); } else { if (!this.DF_NegativePattern && this.DF_PositivePrefix.length > 0) strValue=hX_5.padL(strValue.substr(this.DF_PositivePrefix.length), this.DF_MaxPadLength-1-this.DF_PositivePrefix.length, this.DF_PaddingChar); else if (this.DF_NegativePrefix.length == 0) strValue=hX_5.padL(strValue, this.DF_MaxPadLength, this.DF_PaddingChar); else strValue=this.DF_NegativePrefix + hX_5.padL(strValue.substr(this.DF_NegativePrefix.length), this.DF_MaxPadLength-this.DF_NegativePrefix.length, this.DF_PaddingChar); } } if (this.DF_PaddingPos == 3) { if (sign > 0 || zero) { if (this.DF_PositiveSuffix.length == 0) strValue=hX_5.padR(strValue, this.DF_MaxPadLength, this.DF_PaddingChar); else strValue=hX_5.padR(strValue.substr(0,strValue.length-this.DF_PositiveSuffix.length), this.DF_MaxPadLength-this.DF_PositiveSuffix.length, this.DF_PaddingChar) + this.DF_PositiveSuffix; } else { if (!this.DF_NegativePattern && this.DF_PositiveSuffix.length > 0) strValue=hX_5.padR(strValue.substr(0,strValue.length-this.DF_PositiveSuffix.length), this.DF_MaxPadLength-this.DF_PositiveSuffix.length, this.DF_PaddingChar) + this.DF_PositiveSuffix; else if (this.DF_NegativeSuffix.length == 0) strValue=hX_5.padR(strValue, this.DF_MaxPadLength, this.DF_PaddingChar); else strValue=hX_5.padR(strValue.substr(0,strValue.length-this.DF_NegativeSuffix.length), this.DF_MaxPadLength-this.DF_NegativeSuffix.length, this.DF_PaddingChar) + this.DF_NegativeSuffix; } } } return strValue; } HxG_5.prototype.NumberConverter.prototype.constantToValue=function (sNum) { var o, j, left, right, sign=1, str=sNum; if (sNum.charAt(0) == this.hardMinus) { sign=-1; str=sNum.substr(1); } j=str.indexOf(hX_5._P); if (j >= 0) { left=str.substr(0,j); right= str.substr(j+1); } else { left=str; right=hX_5._Z; } if (left.length == 0) left=hX_5._Z; if (right.length == 0) right=hX_5._Z; o=left + hX_5._P + right; return ((new Number(o))*sign); } HxG_5.prototype.NumberConverter.prototype.valueToConstant=function (nNum) { return (null); } HxG_5.prototype.NumberValidator=function () { this.type=hX_5.CVT_number; this.minimumBound=this.maximumBound=this.minimum=this.maximum=this.required=null; this.ELexpression=this.ELexpressionImp=this.modulus =null; this.msgFail=hX_5._E; this.attributeTable=[]; this.attributeTable ['required']=['required', hX_5.ARG_IS_TRUE, false, null, null]; this.attributeTable ['modulus']=['modulus', hX_5.ARG_TO_NAN, false, null, null]; this.attributeTable ['minimum-bound']=['minimumBound', hX_5.ARG_TO_BIGNUM, false, -999999999999999,999999999999999]; this.attributeTable ['min-bound']=['minimumBound', hX_5.ARG_TO_BIGNUM, false, -999999999999999,999999999999999]; this.attributeTable ['maximum-bound']=['maximumBound', hX_5.ARG_TO_BIGNUM, false, -999999999999999,999999999999999]; this.attributeTable ['max-bound']=['maximumBound', hX_5.ARG_TO_BIGNUM, false, -999999999999999,999999999999999]; this.attributeTable ['constraint-expression']=['ELexpression', hX_5.ARG_TO_NAN, false, null, null]; this.setAttribute(arguments); } HxG_5.prototype.NumberValidator.prototype.setAttribute=function(a) { var wasmax=this.maximumBound, wasmin=this.minimumBound; hX_5.parseArg (this.attributeTable, this, a); if (this.minimumBound != null && (wasmin == null || wasmin != this.minimumBound)) this.minimum=new Number(this.minimumBound); if (this.maximumBound != null && (wasmax == null || wasmax != this.maximumBound)) this.maximum=new Number(this.maximumBound); if (this.maximum && this.minimum) if (this.minimum >= this.maximum) this.minimumBound=this.maximumBound=this.minimum=this.maximum=null; if (this.ELexpression != null) this.ELexpressionImp=hX_5.regExp.registerELConstraint(this.ELexpression); if (this.modulus != null) if (this.modulus != "10" && this.modulus != "11") this.modulus=null; return true; } HxG_5.prototype.NumberValidator.prototype.getAttribute=function (attribute) { return (hX_5.getArg(this.attributeTable, this, attribute)); } HxG_5.prototype.NumberValidator.prototype.lastError=function () { return ((this.msgFail && this.msgFail.length > 0) ? this.msgFail : null); } HxG_5.prototype.NumberValidator.prototype.validate=function (testnum, iNP) { this.msgFail=hX_5._E; var e, r, test=null, NP=(iNP != null) ? hX_5.getConverterById(iNP) : null; if (NP == null || !hX_5.isObject (NP)) { this.msgFail=hX_5.ERR_required; return false; } if (testnum == null || hX_5.isString(testnum)) { r=!(this.required); if (testnum == null) { this.msgFail=(r) ? hX_5._E : hX_5.ERR_required; return r; } e=hX_5.allTrim (testnum); if (e.length == 0) { this.msgFail=(r) ? hX_5._E : hX_5.ERR_required; return r; } test=NP.stringToValue(e); } else test=testnum; if (test == null || isNaN (test)) { this.msgFail=hX_5.ERR_required; return false; } if (this.minimum && test < this.minimum) { this.msgFail=hX_5.ERR_minimum; return false; } if (this.maximum && test > this.maximum) { this.msgFail=hX_5.ERR_maximum; return false; } if (this.ELexpressionImp != null) { if (!hX_5.regExp.testELExp(test, this.ELexpressionImp)) { this.msgFail=hX_5.ERR_constraint; return false; } } if (this.modulus) { this.msgFail=hX_5.ERR_constraint; var c, exp, strnum=hX_5._E, strnum1=NP.valueToString(test); exp=hX_5.regExp.getRegExpByName("DigitOnly"); while (strnum1.length > 0) { if (hX_5.regExp.testRegExp(strnum1.charAt(0),exp)) strnum=strnum + strnum1.charAt(0); strnum1=strnum1.substr(1); } if (strnum.length < 2) return false; var sum=0, sum10=0, chk=parseInt(strnum.charAt(strnum.length-1),10), bas=strnum.substr(0, strnum.length-1); if (this.modulus == "10") { var odd=true; while (bas.length > 0) { c=parseInt(bas.charAt(bas.length-1,10)); c=(!odd) ? c : ((c<5)?(c*2):(((c-5)*2)+1)); sum=sum + c; odd=!odd; bas=bas.substr(0,bas.length-1); } sum10=(Math.floor((sum-1)/10)+1)*10; } else if (this.modulus == "11") { var w=2; while (bas.length > 0) { c=parseInt(bas.charAt(bas.length-1,10)); sum=sum + (c*w); w=(w >= 7) ? 2 : w+1; bas=bas.substr(0,bas.length-1); } sum10=(Math.floor((sum-1)/11)+1)*11; } if ((sum10-sum) != chk) return false; this.msgFail=hX_5._E; } return true; } HxG_5.prototype.NumberValidator.prototype.coerce=function (testnum, iNP) { this.msgFail=hX_5._E; var e, o=null, NP=(iNP != null) ? hX_5.getConverterById(iNP) : null; if (NP == null || !hX_5.isObject(NP)) { this.msgFail=hX_5.ERR_required; return false; } if (testnum != null && hX_5.isString(testnum)) { e=hX_5.allTrim (testnum); if (e.length > 0) o=NP.stringToValue(e); } else o=testnum; if (o == null || isNaN (o)) o=new Number (0); if (this.minimum && o < this.minimum) o=this.minimum; if (this.maximum && o > this.maximum) o=this.maximum; return o; } HxG_5.prototype.NumberAssist=function (_elem, _state, _converter, _validator, _promptChar) { if (!_elem || !_converter || !_state) return; this.isFilled=isFilled; this.onFocus=onFocus; this.onBlur=onBlur; this.toAssist=toAssist; this.fromAssist=fromAssist; this.onClick=onClick; this.onCut=onCut; this.onCopy=onCopy; this.onPaste=onPaste; this.onChangeKeyCode= onChangeKeyCode; this.onChangeChrCode= onChangeChrCode; this.onValidate=onValidate; var elem=_elem, state=_state, base_converter=_converter, cvt=null, outcvt=null, validator=_validator; var promptChar=_promptChar, command=hX_5._E, lastCommand=-1, firstCommand=-1, decimalCommand=-1; var minusSign=null, plusSign="+"; var zero=null; var zeroS=null; var negZeroS=null; var posZeroS=null; var negNullS=null; var posNullS=null; var nullOK=true; var getCChar=function (i) { return (i < 0 || i >= command.length) ? hX_5._E : command.charAt(i); } if (base_converter.signedConverter == null) base_converter.genAssistMasks(); outcvt=(base_converter.signedConverter) ? base_converter.signedConverter : base_converter; cvt=(base_converter.zeroConverter) ? base_converter.zeroConverter : base_converter; if (validator && (validator.required) != null && validator.required) nullOK=(cvt.nStrict != null && cvt.nStrict > 1) ? true : false; minusSign=cvt.LC_minusSymbol; zero=(validator) ? validator.coerce(0, cvt) : 0; zeroS=cvt.valueToString(zero, promptChar); posZeroS=cvt.valueToString(0, promptChar); negZeroS=cvt.valueToString(-1, promptChar); zeroS=(nullOK) ? hX_5.replaceAll(posZeroS, cvt.getZeroDigit(), promptChar) : zeroS; if (nullOK) { negNullS=hX_5.replaceAll(negZeroS, hX_5._1, promptChar); posNullS=zeroS; } negZeroS=hX_5.replaceAll(negZeroS, hX_5._1, cvt.getZeroDigit()); renewMaskHandler(elem.value); function handleDelete (evt) { var v=state.getValue(), pos=state.getPos(); pos=(evt.type==hX_5._evCT) ? (pos) : ((evt.keyCode == hX_5.KEY_BS) ? pos-1 : pos); if (pos < 0 && !state.hasSel()) return true; var cR=getCChar(pos); if (cR != hX_5._LB && !state.hasSel()) { if (cR==hX_5._EQ && (v.charAt(pos)== cvt.LC_decimalSymbol || v.charAt(pos)==cvt.LC_groupingSymbol) && evt.type!=hX_5._evCT) { pos=(evt.keyCode == hX_5.KEY_DEL) ? pos+1 : pos; state.setPos(pos); return -2; } return false; } var isLeft=((!cvt.DF_IsDecimalShown) || (pos <= decimalCommand)); if (state.hasSel()) { var rg=hX_5.sel.getSelectionR(elem); if ((rg.start <= 0) && (rg.end >= v.length)) { state.setValue(zeroS); state.setPos((cvt.DF_IsDecimalShown) ? decimalCommand : lastCommand+1); } else { adjRange(rg); if (cvt.DF_IsDecimalShown && ((v.substring(rg.start,rg.end)).indexOf(cvt.LC_decimalSymbol) >= 0)) { state.setValue(v.substr(0,rg.start) + cvt.LC_decimalSymbol + v.substr(rg.end)); state.setPos(decimalCommand); } else { state.setValue(v.substr(0,rg.start) + v.substr(rg.end)); state.setPos((!cvt.DF_IsDecimalShown) ? rg.end : ((rg.end <= decimalCommand)?rg.end:rg.start)); } } } else { state.setValue (v.substr(0,pos) + v.substr(pos+1)); state.setPos(pos+1+((isLeft)?(0):(-1))); } state.setPos (holdCursor(state.getPos(), state.getValue(), isLeft)); return -2; } function handleInsert (v, ch, pos, sel) { var l=v.length, wasV=v, isLeft=((!cvt.DF_IsDecimalShown) || (pos <= decimalCommand)); if (sel) { var rg=hX_5.sel.getSelectionR(elem); if ((rg.start <= 0) && (rg.end >= v.length)) { v=zeroS; if (cvt.DF_IsDecimalShown) { v=(ch.length > 1 && ch.indexOf(cvt.LC_decimalSymbol) >= 0) ? v : (v.substr(0,decimalCommand-1) + ch + v.substr(decimalCommand)); pos=decimalCommand; } else { v=v.substr(0,lastCommand) + ch + v.substr(lastCommand+1); pos=lastCommand+1; } } else { adjRange(rg); if (cvt.DF_IsDecimalShown && ((v.substring(rg.start,rg.end)).indexOf(cvt.LC_decimalSymbol) >= 0)) { v=(ch.length > 1 && ch.indexOf(cvt.LC_decimalSymbol) >=0) ? (v.substr(0,rg.start) + ch + v.substr(rg.end)) : (v.substr(0,rg.start) + ch + cvt.LC_decimalSymbol + v.substr(rg.end)); pos=decimalCommand; } else { v=v.substr(0,rg.start) + ch + v.substr(rg.end); pos=rg.end; } } state.setPos(holdCursor(pos, v, isLeft)); } else { var insertMode=false, fillLeft=false, fillRight=false, c=v.charAt(pos); if (c==promptChar) { if (isLeft && (pos < l-1) && (v.charAt(pos+1)==promptChar)) fillRight=true; else if (!isLeft && (v.charAt(pos-1)==promptChar)) fillLeft=true; } insertMode=(cvt.DF_IsDecimalShown) ? (c == cvt.LC_decimalSymbol) : (pos > lastCommand); if (isFilled(pos)) return -2; if (!insertMode) { var ip=pos; if (ch.length <= 1) { v=v.substr(0,pos) + ch + v.substr(pos+1); if (pos+1 < lastCommand && getCChar(pos+1) == hX_5._EQ) pos++; state.setPos(pos+1); if (fillRight) { ip++; while (v.charAt(ip) == promptChar) { v=v.substr(0,ip) + cvt.getZeroDigit() + v.substr(ip+1); ip++; } } else if (fillLeft) { ip--; while (v.charAt(ip) == promptChar) { v=v.substr(0,ip) + cvt.getZeroDigit() + v.substr(ip+1); ip--; } } } else { while (v.charAt(ip)==promptChar && ip < pos+ch.length) ip++; if (pos!=ip) v=v.substr(0,pos)+v.substr(ip); v=v.substr(0,pos) + ch + v.substr(pos); state.setPos(pos); if (fillRight) { ip=pos+ch.length; while (v.charAt(ip) == promptChar) { v=v.substr(0,ip) + cvt.getZeroDigit() + v.substr(ip+1); ip++; } } else if (fillLeft) { ip--; while (v.charAt(ip) == promptChar) { v=v.substr(0,ip) + cvt.getZeroDigit() + v.substr(ip+1); ip--; } } } } else { c=v.charAt(firstCommand); if (isLeft && (c==promptChar || cvt.isZeroDigit(c) || c==hX_5._B)) v=v.substr(0,pos) + ch + v.substr(pos); else return false; } if (v != wasV) state.setPos(holdCursor(state.getPos(), v, isLeft)); } state.setValue(v); return -2; } function handleCaretPrev (evt) { if (evt.shiftKey || state.hasSel()) return -1; else { state.setPos(getMovePrevSkipRange(state.getPos())); return -2; } } function handleCaretNext (evt) { if (evt.shiftKey || state.hasSel()) return -1; else { state.setPos(getMoveNextSkipRange(state.getPos())); return -2; } } function getMovePrevSkipRange (pos) { var i, c, v=state.getValue(), l=v.length; for (i=pos-1; i >= 0; i--) { c=getCChar(i); if (c == hX_5._QM || c == hX_5._LB || c == hX_5._EQ) { i=(i < 0) ? 0 : ((i > l) ? l : i); return (i); } } return (0); } function getMoveNextSkipRange (pos) { var i, c, v=state.getValue(), l=v.length; for (i=pos+1; i < l; i++) { if (i == lastCommand+1) return i; c=getCChar(i); if (c == hX_5._QM || c == hX_5._LB || c == hX_5._EQ) { i=(i < 0) ? 0 : ((i > l) ? l : i); return (i); } } return (l); } function getMoveNextSkipChar (ch, pos) { if (ch == cvt.LC_decimalSymbol) { if (!cvt.DF_IsDecimalShown) return {hit:true, skip:decimalCommand-pos}; if (pos == decimalCommand) return {hit:true, skip:decimalCommand-pos+1}; else return {hit:true, skip:decimalCommand-pos}; } else if (cvt.DF_GroupingSize > 0 && cvt.LC_groupingSymbol == ch) { if (pos >= decimalCommand) return {hit:true, skip:0}; var i, l=command.length, p=(pos >= decimalCommand-cvt.DF_GroupingSize) ? 0 : pos; for (i=p; i < l; ++i) { if (getCChar(i) == hX_5._EQ) return {hit:true, skip:(i - pos + 1)}; } } return {hit:false, skip:0}; } function centerCursor (v, plus) { var newpos=-1; if (cvt.DF_IsDecimalShown) newpos=v.indexOf(cvt.LC_decimalSymbol); if (newpos < 0) { newpos=v.length; if (plus && cvt.DF_PositiveSuffix) newpos -= cvt.DF_PositiveSuffix.length; else if ((!plus) && cvt.DF_NegativeSuffix) newpos -= cvt.DF_NegativeSuffix.length; newpos=(newpos < 0) ? 0 : newpos; } return newpos; } function adjRange (rg) { var pre=0, suff=command.length; while (pre < suff && (command.charAt(pre) == hX_5._VB || command.charAt(pre) == hX_5._QM)) pre++; if (command.charAt(suff-1) == hX_5._VB || command.charAt(suff-1) == hX_5._QM) { suff--; while (suff >= 0 && (command.charAt(suff) == hX_5._VB || command.charAt(suff) == hX_5._QM)) suff--; } rg.start=(rg.start < pre) ? pre : rg.start; rg.end=(rg.end > (suff+1)) ? (suff+1) : rg.end; } function holdCursor (pos, v, isLeft) { var r=pos, plusPrefix=((cvt.DF_PositivePrefix) ? cvt.DF_PositivePrefix : hX_5._E), minusPrefix=(cvt.DF_NegativePrefix) ? cvt.DF_NegativePrefix : hX_5._E; if (cvt.DF_GroupingSize > 0 || (plusPrefix.length != minusPrefix.length)) { var i, oldDigPos=-1, newValue=cvt.stringToValue(v, promptChar); if (isLeft) { oldDigPos=0; for (i=decimalCommand-1; (i >= pos) && (i >= 0); i--) { if (getCChar(i) != hX_5._EQ) oldDigPos++; } } newValue=cvt.valueToString(newValue, promptChar); newValue=(newValue == null || newValue.length == 0) ? zeroS : newValue; if (newValue != null && newValue.length > 0) { var wasCommand=command; renewMaskHandler(newValue); if (oldDigPos < 0) r=pos + (command.length - wasCommand.length); else { r=decimalCommand; while (oldDigPos > 0 && r > 0) { r--; if (getCChar(r) != hX_5._EQ) oldDigPos--; } } } } return r; } function putNumberToClipboard () { var v=state.getValue(), rg=hX_5.sel.getSelectionR(elem); hX_5.clip.valueAsString=v.substring(rg.start,rg.end); adjRange(rg); v=v.substring(rg.start,rg.end); if (cvt.DF_GroupingSize > 0) v=hX_5.replaceAll(v, cvt.LC_groupingSymbol,hX_5._E); hX_5.clip.valueAsNumber=hX_5.replaceAll(v, promptChar,hX_5._E); } function renewMaskHandler (v) { var i, l=v.length, h=null, c=hX_5._E, prefix=hX_5._E, suffix=hX_5._E, iV=cvt.stringToValue(v, promptChar); var plus=(iV==null) ? (!(negNullS != null && v == negNullS)) : ((iV == 0) ? (!(negZeroS != null && v == negZeroS)) : (iV > 0)); if (plus) { prefix=(cvt.DF_PositivePrefix) ? cvt.DF_PositivePrefix : hX_5._E; suffix=(cvt.DF_PositiveSuffix) ? cvt.DF_PositiveSuffix : hX_5._E; } else { prefix=(cvt.DF_NegativePrefix) ? cvt.DF_NegativePrefix : hX_5._E; suffix=(cvt.DF_NegativeSuffix) ? cvt.DF_NegativeSuffix : hX_5._E; } prefix=prefix.length; suffix=v.length - suffix.length; lastCommand=0; firstCommand=-1; decimalCommand=-1; for (i=0; i= suffix) c+=hX_5._VB; else { if (cvt.DF_GroupingSize > 0 && h == cvt.LC_groupingSymbol) c+= hX_5._EQ; else if (cvt.DF_IsDecimalShown && h == cvt.LC_decimalSymbol) { c+=hX_5._EQ; decimalCommand=i; } else { c+=hX_5._LB; firstCommand=(firstCommand < 0) ? i : firstCommand; lastCommand=i; } } } decimalCommand=(cvt.DF_IsDecimalShown) ? decimalCommand : suffix; command=c; return (plus); } function isFilled (curpos) { renewMaskHandler(elem.value); var c=(cvt.DF_IsDecimalShown && cvt.DF_MaxFractionDigits>0) ? elem.value.charAt(lastCommand) : elem.value.charAt(firstCommand); if (c == hX_5._B || c == promptChar) return false; return (curpos > lastCommand); } function onFocus (evt) { var newValue=toAssist(elem.value); renewMaskHandler(newValue.v); var newpos=centerCursor(newValue.v, (newValue.i>=0)); elem.value=newValue.v; hX_5.sel.setCaretPos(elem, newpos, null, hX_5.brw.isNavOrMoz()); return true; } function toAssist (v) { var newValue=null, inum=((v.length==0) ? null : base_converter.stringToValue(v)); if (inum == null && nullOK) { inum=0; newValue=zeroS; } else { inum=(inum==null) ? zero : inum; var newValueO=outcvt.valueToString(inum, promptChar); newValue=cvt.valueToString(inum, promptChar); if (cvt.DF_IsDecimalShown) { var i=decimalCommand, j=newValueO.indexOf(cvt.LC_decimalSymbol), k=newValue.indexOf(cvt.LC_decimalSymbol); if (i >= 0 && j >= 0 && k >= 0) { i++; j++; k++; while (i < command.length && command.charAt(i) == hX_5._LB && j < newValueO.length && k < newValue.length) { if (cvt.isZeroDigit(newValueO.charAt(j)) && newValue.charAt(k) == promptChar) newValue=newValue.substr(0,k) + cvt.getZeroDigit() + newValue.substr(k+1); i++; j++; k++; } } } } newValue=(newValue != null) ? newValue : hX_5._E; return {v:newValue, i:inum}; } function onBlur (evt) { var newValue=fromAssist(elem.value); if (newValue != null) { elem.value=newValue; return true; } return false; } function fromAssist (v) { if (v.length==0) return hX_5._E; var newValue=outcvt.stringToValue(v, promptChar); return (newValue != null) ? base_converter.valueToString(newValue) : hX_5._E; } function onClick (evt) { if (state.hasSel()) return true; var v=state.getValue(), pos=state.getPos(); renewMaskHandler(v); if (pos <= 0 || pos > (v.length-1)) return true; var newpos, MoveR=true, cL=getCChar(pos-1), cR=getCChar(pos); if (cL == hX_5._LB || cR == hX_5._LB || cL == hX_5._QM || cR == hX_5._QM || cL == hX_5._EQ || cR == hX_5._EQ) return true; if (cvt.DF_IsDecimalShown) MoveR=(pos <= v.indexOf(cvt.LC_decimalSymbol)); newpos=(MoveR) ? getMoveNextSkipRange(pos) : getMovePrevSkipRange(pos); state.setPos(newpos); return -2; } function onChangeKeyCode (evt) { renewMaskHandler(state.getValue()); switch (hX_5.getKeyCode(evt)) { case hX_5.KEY_BS: case hX_5.KEY_DEL: return handleDelete(evt); case hX_5.KEY_LTARROW: return handleCaretPrev(evt); case hX_5.KEY_RTARROW: return handleCaretNext(evt); } return true; } function onCut (evt) { if (hX_5.brw.isIE() && state.hasSel()) { var cutText=hX_5.sel.getSelection(elem); window.clipboardData.setData("Text", cutText); putNumberToClipboard(); renewMaskHandler(state.getValue()); return handleDelete(evt); } return true; } function onCopy (evt) { if (hX_5.brw.isIE() && state.hasSel()) putNumberToClipboard(); return true; } function onPaste (evt) { if (hX_5.brw.isIE()) { var d=false, cutText=window.clipboardData.getData("Text"), v=state.getValue(), pos=state.getPos(), sel=state.hasSel(); if (cutText == hX_5.clip.valueAsString) cutText=hX_5.clip.valueAsNumber; else { if (cvt.DF_GroupingSize > 0) cutText=hX_5.replaceAll(cutText,cvt.LC_groupingSymbol,hX_5._E); cutText=hX_5.replaceAll(cutText,promptChar,hX_5._E); } if (sel) { var rg=hX_5.sel.getSelectionR(elem); d=(v.substring(rg.start,rg.end).indexOf(cvt.LC_decimalSymbol) >= 0); } if (!d) { d=cutText.indexOf(cvt.LC_decimalSymbol); cutText=(d < 0) ? cutText : cutText.substr(0,d)+cutText.substr(d+1); } return (handleInsert(v, cutText, pos, sel)); } return true; } function onChangeChrCode (evt) { var ch=hX_5.getChrCode(evt); if (evt.keyCode == hX_5.KEY_TAB || evt.keyCode == hX_5.KEY_ENTER) return +2; var pos=state.getPos(), v=state.getValue(), sel=state.hasSel() renewMaskHandler(v); if (ch == minusSign || ch == plusSign) { var iV=cvt.stringToValue (v, promptChar), posSignLen=0, negSignLen=0; var isLeft=((!cvt.DF_IsDecimalShown) || (pos <= decimalCommand)); var isNeg=((iV == null && negNullS && v==negNullS) || (iV == 0 && negZeroS && v==negZeroS) || (iV != null && iV != 0 && iV < 0)); if (sel) { var rg=hX_5.sel.getSelectionR(elem); isNeg=((rg.start <= 0) && (rg.end >= v.length)) ? false : isNeg; handleDelete(evt); pos=state.getPos(); v=state.getValue(); } iV=cvt.stringToValue (v, promptChar); iV=(iV != null) ? (iV * -1) : null; if (iV == null || iV == 0) { if (pos > 0) { posSignLen=(cvt.DF_PositivePrefix) ? cvt.DF_PositivePrefix.length : 0; negSignLen=(cvt.DF_NegativePrefix) ? cvt.DF_NegativePrefix.length : 0; } if ((iV == 0 && isNeg) || (iV == null && isNeg)) { v=(iV==0) ? posZeroS : (posNullS) ? posNullS: posZeroS; ch=(sel) ? 0 : (posSignLen-negSignLen); } else { v=(iV==0) ? negZeroS : (negNullS) ? negNullS : negZeroS; ch=negSignLen-posSignLen; } state.setValue(v); state.setPos (pos+ch, v, isLeft); renewMaskHandler(v); return -2; } else { if (pos > 0) { posSignLen=(cvt.DF_PositivePrefix) ? cvt.DF_PositivePrefix.length : 0; negSignLen=(cvt.DF_NegativePrefix) ? cvt.DF_NegativePrefix.length : 0; } ch=(iV < 0) ? (negSignLen-posSignLen) : (posSignLen-negSignLen); v=cvt.valueToString(iV); state.setValue(v); state.setPos (pos+ch, v, isLeft); renewMaskHandler(v); return -2; } } if (!sel) { var skip=getMoveNextSkipChar(ch, pos); if (skip.hit) { state.setPos(pos+skip.skip); return -2; } } return (handleInsert (v, ch, pos, sel)); } function onValidate (evt) { var v=state.getValue(), newValue=cvt.stringToValue(v, promptChar); if (newValue != null) newValue=(newValue == 0 && negZeroS != null && v == negZeroS) ? negZeroS: cvt.valueToString(newValue, promptChar); else if (negNullS != null && v == negNullS) newValue=negNullS; if (newValue != null) { if (cvt.DF_IsDecimalShown) { var i=decimalCommand, j=v.indexOf(cvt.LC_decimalSymbol), k=newValue.indexOf(cvt.LC_decimalSymbol); if (i >= 0 && j >= 0 && k >= 0) { i++; j++; k++; while (i < command.length && command.charAt(i) == hX_5._LB && j < v.length && k < newValue.length) { if (cvt.isZeroDigit(v.charAt(j)) && newValue.charAt(k) == promptChar) newValue=newValue.substr(0,k) + cvt.getZeroDigit() + newValue.substr(k+1); i++; j++; k++; } } } state.setValue(newValue); return true; } else if (cvt.lastError() == hX_5.ERR_empty) { state.setValue(zeroS); return true; } return false; } } HxG_5.prototype.MaskConverter=function () { this.type=hX_5.CVT_mask; this.nStrict=hX_5.MFMT_DEFAULTSTRICT; this.maskFormat=hX_5._E; this.markers=this.mask_Protect=this.maskProtect=this.maskNFormat=null; this.maskFormatLast=this.maskFormatFirst=this.maskNFormatLast=this.maskNFormatFirst=-1; this.constraint1Exp=this.constraint1ExpImp=this.constraint2Exp=this.constraint2ExpImp=this.constraint3Exp=this.constraint3ExpImp=this.constraint4Exp=this.constraint4ExpImp=null; this.msgFail=this.intMsgFail=hX_5._E; this.attributeTable=[]; this.attributeTable ['strict']=['nStrict', hX_5.ARG_TO_NUM, false, 0, 2]; this.attributeTable ['mask']=['maskFormat',hX_5.ARG_TO_NAS, false, null, null]; this.attributeTable ['protect-mask']=['mask_Protect',hX_5.ARG_TO_NAS, false, null, null]; this.attributeTable ['char1-regexpression']=['constraint1Exp',hX_5.ARG_TO_NAN,false, null, null]; this.attributeTable ['char2-regexpression']=['constraint2Exp',hX_5.ARG_TO_NAN,false, null, null]; this.attributeTable ['char3-regexpression']=['constraint3Exp',hX_5.ARG_TO_NAN,false, null, null]; this.attributeTable ['char4-regexpression']=['constraint4Exp',hX_5.ARG_TO_NAN,false, null, null]; this.setAttribute(arguments); } HxG_5.prototype.MaskConverter.prototype.setAttribute=function(a) { var i,c; hX_5.parseArg (this.attributeTable, this, a); if (this.constraint1Exp) this.constraint1ExpImp=hX_5.regExp.registerConstraint(this.constraint1Exp); if (this.constraint2Exp) this.constraint2ExpImp=hX_5.regExp.registerConstraint(this.constraint2Exp); if (this.constraint3Exp) this.constraint3ExpImp=hX_5.regExp.registerConstraint(this.constraint3Exp); if (this.constraint4Exp) this.constraint4ExpImp=hX_5.regExp.registerConstraint(this.constraint4Exp); this.markers=hX_5._LB + hX_5._QM + ((this.constraint3ExpImp)?hX_5._EX:hX_5._E) + ((this.constraint4ExpImp)?hX_5._TL:hX_5._E) this.maskFormatFirst=this.maskFormatLast=-1; for (i=0; i < this.maskFormat.length; i++) { c=this.maskFormat.charAt(i); if (this.isMarker(c)) { this.maskFormatLast=i; this.maskFormatFirst=(this.maskFormatFirst >= 0) ? this.maskFormatFirst : i; } } this.maskProtect=null; if (this.mask_Protect != null && this.maskFormat != null && this.maskFormat.length >= 0 && this.maskFormat.length == this.mask_Protect.length) { this.maskProtect=this.mask_Protect; for (i=0; i < this.maskProtect.length; i++) { c=this.maskFormat.charAt(i); if (this.isMarker(c)) { c=this.maskProtect.charAt(i); if (!this.isMarker(c)) this.maskProtect=this.maskProtect.substr(0,i) + hX_5._X + this.maskProtect.substr(i+1); } else this.maskProtect=this.maskProtect.substr(0,i) + c + this.maskProtect.substr(i+1); } for (i=0; i < this.maskProtect.length; i++) { if (this.isMarker(this.maskProtect.charAt(i))) { this.maskNFormatLast=i; this.maskNFormatFirst=(this.maskNFormatFirst >= 0) ? this.maskNFormatFirst : i; } } } return true; } HxG_5.prototype.MaskConverter.prototype.getAttribute=function (attribute) { return (hX_5.getArg(this.attributeTable, this, attribute)); } HxG_5.prototype.MaskConverter.prototype.lastError=function () { return ((this.msgFail && this.msgFail.length > 0) ? this.msgFail : null); } HxG_5.prototype.MaskConverter.prototype.getMaxLength=function () { return this.maskFormat.length; } HxG_5.prototype.MaskConverter.prototype.isMarker=function (c) { return (this.markers.indexOf(c) >= 0); } HxG_5.prototype.MaskConverter.prototype.rebuildProtectMask=function (newvalue) { this.maskNFormat=null; if (this.maskProtect && newvalue.length==this.maskFormat.length) { this.maskNFormat=this.maskFormat; for (var i=0; i < this.maskProtect.length; i++) { if (!this.isMarker(this.maskProtect.charAt(i))) this.maskNFormat=this.maskNFormat.substr(0,i) + newvalue.charAt(i) + this.maskNFormat.substr(i+1); } } } HxG_5.prototype.MaskConverter.prototype.stringToValue=function (inString, promptChar, initial) { this.msgFail=this.intMsgFail=hX_5._E; var argsFail=[inString]; if (inString == null || hX_5.isUnDef(typeof(inString)) || !hX_5.isString(inString)) { this.msgFail=hX_5.ERR_empty; return null; } var v=inString, l=v.length, l1=this.maskFormat.length; if (l > l1 && (!promptChar && l != l1)) { this.msgFail=hX_5.ERR_constraint; return null; } if (l < l1) v=hX_5.padR(v,l1,((promptChar)?promptChar:hX_5._B)); l=v.length; var out=hX_5._E, c, i, m, x, x1; for (i=0; i < l; i++) { c=null; x=v.charAt(i); m=this.maskFormat.charAt(i); if (this.isMarker(m)) { if (promptChar && (x == promptChar)) c=hX_5._B; else if (this.maskProtect && this.maskProtect.charAt(i) == hX_5._X) c=x; else if (m == hX_5._LB) { if (this.constraint1ExpImp) c=(hX_5.regExp.testRegExp(x, this.constraint1ExpImp)) ? x : null; else c=((hX_5.isChar(x, hX_5.WDIGITS)) ? x : null); } else if (m == hX_5._QM) { if (this.constraint2ExpImp) c=(hX_5.regExp.testRegExp(x, this.constraint2ExpImp)) ? x : null; else { x1=x.toUpperCase(); c=((hX_5.isChar(x1, hX_5.MASK_ALPHA)) ? x : null); } } else if (m == hX_5._EX) { if (this.constraint3ExpImp) c=(hX_5.regExp.testRegExp(x, this.constraint3ExpImp)) ? x : null; } else { if (this.constraint4ExpImp) c=(hX_5.regExp.testRegExp(x, this.constraint4ExpImp)) ? x : null; } } else c=((x == m) ? hX_5._E : null); if (c == null) { if (initial && promptChar) c=promptChar else { this.msgFail=hX_5.ERR_constraint; return null; } } out=out + c; } return out; } HxG_5.prototype.MaskConverter.prototype.valueToString=function (inStr, promptChar) { this.msgFail=hX_5._E; if (inStr == null) return hX_5._E; var c, i, j=0, out=hX_5._E, v=inStr, l=this.maskFormat.length, l1=v.length; if (l1 < l) v=hX_5.padR(v,l,((promptChar)?promptChar:hX_5._B)); l1=v.length; for (i=0; i < l; i++) { c=this.maskFormat.charAt(i); if (this.isMarker(c)) { if (j < l1) { c=v.charAt(j); c=(this.maskProtect && this.maskProtect.charAt(i) == hX_5._X)?c:((c==hX_5._B && promptChar) ? promptChar:c); out=out + c; } else if (promptChar) out=out + promptChar; else { this.msgFail=hX_5.ERR_constraint; return null; } j++; } else { out=out + c; } } return out; } HxG_5.prototype.MaskConverter.prototype.constantToValue=function (s) { return (null); } HxG_5.prototype.MaskConverter.prototype.valueToConstant=function (s) { return (null); } HxG_5.prototype.StringValidator=function () { this.type=hX_5.CVT_string; this.minimumLength=this.maximumLength=this.required=null; this.constraint=this.constraintImp=null; this.constraintExp=this.constraintExpImp =null; this.ELexpression=this.ELexpressionImp=null; this.msgFail=hX_5._E; this.attributeTable=[]; this.attributeTable ['required']=['required', hX_5.ARG_IS_TRUE, false, null, null]; this.attributeTable ['minimum-length']=['minimumLength', hX_5.ARG_TO_NUM, false, 0, 9999999]; this.attributeTable ['min-length']=['minimumLength', hX_5.ARG_TO_NUM, false, 0, 9999999]; this.attributeTable ['maximum-length']=['maximumLength', hX_5.ARG_TO_NUM, false, 1, 9999999]; this.attributeTable ['max-length']=['maximumLength', hX_5.ARG_TO_NUM, false, 1, 9999999]; this.attributeTable ['constraint']=['constraint', hX_5.ARG_TO_NAN, false, null, null]; this.attributeTable ['constraint-regexpression']= ['constraintExp', hX_5.ARG_TO_NAN, false, null, null]; this.attributeTable ['constraint-expression']=['ELexpression', hX_5.ARG_TO_NAN, false, null, null]; this.setAttribute(arguments); } HxG_5.prototype.StringValidator.prototype.setAttribute=function(a) { hX_5.parseArg (this.attributeTable, this, a); if (this.minimumLength != null && this.minimumLength < 0) this.minimumLength=0; if (this.maximumLength != null && this.maximumLength < 1) this.maximumLength=1; if (this.maximumLength && this.minimumLength && this.minimumLength >= this.maximumLength) this.minimumLength=this.maximumLength=null; if (this.constraint) this.constraintImp=hX_5.regExp.getRegExpByName(this.constraint); if (this.constraintExp) this.constraintExpImp=hX_5.regExp.registerConstraint(this.constraintExp); if (this.ELexpression != null) this.ELexpressionImp=hX_5.regExp.registerELConstraint(this.ELexpression); return true; } HxG_5.prototype.StringValidator.prototype.getAttribute=function (attribute) { return (hX_5.getArg(this.attributeTable, this, attribute)); } HxG_5.prototype.StringValidator.prototype.lastError=function () { return ((this.msgFail && this.msgFail.length > 0) ? this.msgFail : null); } HxG_5.prototype.StringValidator.prototype.validate=function (teststr, iC) { this.msgFail=hX_5._E; var C=(iC != null) ? hX_5.getConverterById(iC) : null; if (teststr != null && !hX_5.isString(teststr)) { this.msgFail=hX_5.ERR_required; return false; } var test=(teststr == null) ? hX_5._E : teststr; test=test.replace(/[\r\n]/g, hX_5._E); if (test.length == 0) { if (this.required) { this.msgFail=hX_5.ERR_required; return false; } else return true; } if (this.minimumLength && test.length < this.minimumLength) { this.msgFail=hX_5.ERR_minimum; return false; } if (this.maximumLength && test.length > this.maximumLength) { this.msgFail=hX_5.ERR_maximum; return false; } if (this.constraintImp != null) { if (!hX_5.regExp.testRegExp(test, this.constraintImp)) { this.msgFail=hX_5.ERR_constraint; return false; } } if (this.constraintExpImp != null) { if (!hX_5.regExp.testRegExp(test, this.constraintExpImp)) { this.msgFail=hX_5.ERR_constraint; return false; } } if (this.ELexpressionImp != null) { if (!hX_5.regExp.testELExp(test, this.ELexpressionImp)) { this.msgFail=hX_5.ERR_constraint; return false; } } return true; } HxG_5.prototype.MaskAssist=function (_elem, _state, _converter, _validator, _promptChar) { if (!_elem || !_converter || !_state) return; this.isFilled=isFilled; this.onFocus=onFocus; this.onBlur=onBlur; this.onClick=onClick; this.onCut=onCut; this.onPaste=onPaste; this.onChangeKeyCode= onChangeKeyCode; this.onChangeChrCode= onChangeChrCode; this.onValidate=onValidate; this.destroy=destroy; var elem=_elem; var state=_state; var cvt=_converter; var validator=_validator; var promptChar=_promptChar; this.getMask=function getMask() { return ((cvt.maskNFormat!=null)?cvt.maskNFormat:cvt.maskFormat); } this.getMaskLast=function getMaskLast() { return ((cvt.maskNFormat!=null)?cvt.maskNFormatLast:cvt.maskFormatLast); } this.getMaskFirst=function getMaskFirst() { return ((cvt.maskNFormat!=null)?cvt.maskNFormatFirst:cvt.maskFormatFirst); } var handler=null; handler=new hX_5.MaskAssist.prototype.maskHandler(elem, state, cvt, promptChar); function destroy() { if (handler!=null) { if (handler.destroy) handler.destroy(); delete handler; } } function isFilled (curpos) { var c, v=hX_5.Trim(elem.value), l=v.length; if (l < (this.getMask()).length) return false; c=v.charAt(this.getMaskLast()); return ((curpos > this.getMaskLast()) && (c != promptChar) && (c != hX_5._B)); } function onFocus () { var newValue=(elem.value) ? hX_5.trimR(elem.value) : null; newValue=(newValue && newValue.length > 0) ? cvt.stringToValue(newValue, promptChar, true) : null; newValue=(newValue) ? cvt.valueToString(newValue, promptChar) : handler.getEmptyMask(); elem.value=newValue; handler.rebuildMask(newValue); hX_5.sel.setCaretPos(elem, this.getMaskFirst(), null, hX_5.brw.isNavOrMoz()); return true; } function onBlur () { var v=elem.value; if (v.length==0) return true; var newValue=cvt.stringToValue(v, promptChar); if (newValue != null) newValue=(newValue.length==0) ? hX_5._E : cvt.valueToString(newValue); if (newValue != null) { elem.value=newValue; return true; } return false; } function onClick (evt) { return handler.onClick(evt); } function onCut (evt) { return handler.onCut(evt); } function onPaste (evt) { return handler.onPaste(evt); } function onChangeKeyCode (evt) { return handler.onChangeKeyCode (evt); } function onChangeChrCode (evt) { return handler.onChangeChrCode (evt); } function onValidate () { var newValue=cvt.stringToValue(state.getValue(), promptChar); if (newValue != null) newValue=cvt.valueToString(newValue, promptChar); if (newValue != null) return true; return false; } } HxG_5.prototype.MaskAssist.prototype.maskHandler=function(_element, _state, _converter, _promptChar) { var elem=_element; var state=_state; var cvt=_converter; var promptChar=_promptChar; var emptyMask=null; this.onClick=onClick; this.onCut=onCut; this.onPaste=onPaste; this.onChangeKeyCode= onChangeKeyCode; this.onChangeChrCode= onChangeChrCode; this.getEmptyMask=function getEmptyMask() {return emptyMask;} this.rebuildMask=function rebuildMask(v) {if (cvt.rebuildProtectMask) cvt.rebuildProtectMask(v); } var getKeyCode=hX_5.getKeyCode; var getMask=function getMask() { return ((cvt.maskNFormat!=null)?cvt.maskNFormat:cvt.maskFormat); } var getCChar=function (i) { return (i < 0 || i >= (getMask()).length) ? hX_5._E : (getMask()).charAt(i); } emptyMask=hX_5.replaceAll(cvt.maskFormat, hX_5._LB, promptChar); for (var i=1; i= v.length-1)?emptyMask:fillWithMaskPiece(v, rg.start, rg.end)); } else if (pos>=0 && pos l) ? l : pos); for (i=pos; i > 0; i--) { c=getCChar(i); c1=getCChar(i-1); if (cvt.isMarker(c) || cvt.isMarker(c1)) return (i); } return (0); } function getMoveForward(v, pos) { var i, l=v.length; pos=(pos < 0) ? 0 : ((pos > l) ? l : pos); for (i=pos; i <= l; i++) { if (cvt.isMarker(getCChar(i))) return (i); } return (l); } function fillWithMaskPiece (v, start, end) { return (v.substr(0,start) + emptyMask.substr(start, end-start) + v.substr(end)); } function onClick(evt) { if (state.hasSel()) return true; var v=state.getValue(), pos=state.getPos(); if (pos <= 0 || pos > (v.length-1)) return true; var cL=getCChar(pos-1), cR=getCChar(pos); if (cvt.isMarker(cL) || cvt.isMarker(cL)) return true; var MoveR=true, posLeft=getMovePrevious (v, pos), posRight=getMoveForward(v, pos); if ((pos-posLeft) < (posRight-pos)) state.setPos(posLeft); else state.setPos(posRight); return -2; } function onChangeKeyCode (evt) { switch (hX_5.getKeyCode(evt)) { case hX_5.KEY_BS: case hX_5.KEY_DEL: return doDelete(evt); case hX_5.KEY_LTARROW: return doCaretPrev(evt); case hX_5.KEY_RTARROW: return doCaretNext(evt); } return true; } function onCut(evt) { if (hX_5.brw.isIE() && state.hasSel()) { var cutText=hX_5.sel.getSelection(elem); window.clipboardData.setData("Text", cutText); return doDelete(evt); } return true; } function onPaste (evt) { if (hX_5.brw.isIE()) { var cutText=window.clipboardData.getData("Text"); var v=state.getValue(), pos=state.getPos(), sel=state.hasSel(); if (sel) { var rg=hX_5.sel.getSelectionR(elem); v=(rg.start <= 0 && rg.end >= v.length-1)?emptyMask:fillWithMaskPiece(v, rg.start, rg.end); } var mChars=false, c, m, i, r, l=cutText.length; for (i=0; i < l; i++) { m=getCChar(i); if (!cvt.isMarker(m)) { mChars=(m == cutText.charAt(i)); break; } } for (i=0; i < l; i++) { m=getCChar(i); c=cutText.charAt(i); if (!cvt.isMarker(m) && m == c) { } else { c=(c==hX_5._B)?promptChar:c; v=v.substr(0,pos) + c + v.substr(pos+1); } pos=(mChars) ? pos+1 : getMoveForward (v, pos+1); } state.setValue(v); pos=getMoveForward (v, pos); state.setPos(pos); return -2; } return true; } function onChangeChrCode (evt) { var v=state.getValue(), pos=state.getPos(), sel=state.hasSel(), ch=hX_5.getChrCode(evt); if (evt.keyCode == hX_5.KEY_TAB || evt.keyCode == hX_5.KEY_ENTER) return +2; return (doInsert(v, ch, pos, sel)); } } HxG_5.prototype.POP_STYLE_DRAG=0; HxG_5.prototype.POP_STYLE_CLICK= 1; HxG_5.prototype.POP_STYLE_MANAGED= 2; HxG_5.prototype.POP_STYLE_CLICK_SCROLLABLE= 3; HxG_5.prototype.POP_DIR_RIGHT=1; HxG_5.prototype.POP_DIR_CENTER=2; HxG_5.prototype.JSFPopup=function (parentid, ownerobj, style, altComp) { this.type="popup"; this.parentId=parentid; this.DOMobj=this.parentDOMobj=null; this.parentCOMPobj=(altComp!=null && altComp.type!=undefined)?altComp:null; this.ownerDoc=document; this.ownerObj=(ownerobj != null) ? ownerobj : document.body; this.clickStyle=(style != null) ? style : hX_5.POP_STYLE_CLICK; this.fullStyle=(this.clickStyle==hX_5.POP_STYLE_MANAGED); this.sticky=false; this.hideArray=this.hideArrayV=null; this.dropShadowWidth=this.dropShadowColor=null; this.dropDivs=[]; this.transparency=this.transDiv=null; this.getElem=function getElem() { return this.DOMobj; } this.getDoc=function getDoc() { return this.ownerDoc; } } HxG_5.prototype.JSFPopup.prototype.onPageLoad=function() { this.parentDOMobj=hX_5.getElementById(this.parentId); this.parentCOMPobj=(this.parentCOMPobj!=null)?this.parentCOMPobj:hX_5.getComponentById(this.parentId); if (this.parentDOMobj) { if (!this.HTMLrendered) { var elem=document.createElement(hX_5._DIV); elem.setAttribute(hX_5._ID, this.id); elem.setAttribute(hX_5._NAM, this.id + "_HXPOPUP"); elem.style.position=hX_5._ABS; elem.style.left=elem.style.top=hX_5._ZPX; elem.style.height=elem.style.width="10" + hX_5._PX; elem.style.zIndex="1000000"; if (!this.fullStyle) elem.style.margin=elem.style.padding=hX_5._ZPX; elem.style.verticalAlign=hX_5._TOP; elem.style.overflow=hX_5._HI; elem.style.display=hX_5._NO; this.ownerObj.insertBefore (elem, (this.ownerObj.firstChild)); this.DOMobj=elem; this.HTMLrendered=true; return true; } } return false; } HxG_5.prototype.JSFPopup.prototype.destroy=function() { if (this.DOMobj) { this.DOMobj.parentNode.removeChild(this.DOMobj); delete this.DOMobj; } if (this.transDiv) { this.transDiv.parentNode.removeChild(this.transDiv); delete this.transDiv; } if (this.dropDivs) { var e; while (this.dropDivs.length > 0) { e=this.dropDivs.pop(); e.parentNode.removeChild(e); delete e; } } if (this.hideArray) { while (this.hideArray.length>0) this.hideArray.pop(); delete this.hideArray; } if (this.hideArrayV) { while (this.hideArrayV.length>0) this.hideArrayV.pop(); delete this.hideArrayV; } return true; } HxG_5.prototype.JSFPopup.prototype.uivisible=function (dir, location, inline, absPt, overrideESC) { var pop=this.DOMobj; if (this.isPopped()) this.uirelease(); if (inline) { if (pop) { this.parentDOMobj=this.parentCOMobj=inline; this.parentDOMobj.insertBefore(pop, this.parentDOMobj.firstChild); pop.style.position="static"; pop.style.left=pop.style.top=hX_5._ZPX; pop.style.visibility=hX_5._VS; pop.style.display=hX_5._E; } } else { if (pop && this.parentDOMobj) { this.ownerObj.insertBefore (pop, this.ownerObj.firstChild); var tagtop, tagleft, i, ds, off, poptop, popleft; var base=(location != null) ? location : this.parentDOMobj; var tagheight=hX_5.g.getRendHeight(base), tagwidth=hX_5.g.getRendWidth(base); if (absPt) { tagtop=poptop=absPt.Y; popleft=tagLeft=absPt.X; } else { tagtop=hX_5.g.getAbsPosTop(base); tagleft=hX_5.g.getAbsPosLeft(base); if (dir != null && dir == hX_5.POP_DIR_RIGHT) { poptop=tagtop - 1; popleft=tagleft + tagwidth - 1; } else { poptop=tagtop + tagheight - 1; popleft=tagleft; } } pop.style.top=poptop + hX_5._PX; pop.style.left= popleft + hX_5._PX; pop.style.display=hX_5._BLK; pop.style.visibility=hX_5._HI; var x, y, h=hX_5.g.getRendHeight(pop), w=hX_5.g.getRendWidth(pop); var winheight=hX_5.g.getWindowClientHeight(), winwidth=hX_5.g.getWindowClientWidth(); var wintop=Math.max(document.body.scrollTop,document.body.parentNode.scrollTop), winleft=Math.max(document.body.scrollLeft,document.body.parentNode.scrollLeft); if (((poptop-wintop) + h > winheight) && (winheight > h)) pop.style.top=(tagtop - h + 1) + hX_5._PX; if (dir != null && dir==hX_5.POP_DIR_CENTER) { popleft+=((tagwidth - w)/2); pop.style.left= popleft + hX_5._PX; } if (popleft < winleft) pop.style.left= winleft + hX_5._PX; if (popleft+w >= (winleft+winwidth-1)) pop.style.left= (tagleft + tagwidth - w) + hX_5._PX; y=hX_5.g.getAbsPosTop(pop); x=hX_5.g.getAbsPosLeft(pop); if (hX_5.brw.isIE() && pop.filters && pop.filters.length > 0) { for (i=0; i < pop.filters.length; i++) if (hX_5.isDef(typeof pop.filters[i].Apply)) pop.filters[i].Apply(); } pop.style.visibility=hX_5._VS; if (hX_5.brw.isIE() && pop.filters && pop.filters.length > 0) { for (i=0; i < pop.filters.length; i++) if (hX_5.isDef(typeof pop.filters[i].Play)) pop.filters[i].Play(); } var t=hX_5.g.getP(pop, "opacity"); this.transparency=(t < 1) ? t : null; if (this.transparency && this.transDiv == null) { ds=this.transDiv=document.createElement(hX_5._DIV); ds.style.position=hX_5._ABS; ds.style.display=hX_5._NO; ds.style.padding=this.transDiv.style.margin=this.transDiv.style.left=this.transDiv.style.top=hX_5._ZPX; ds.style.backgroundColor=hX_5.g.getP(pop, hX_5._BCOR); ds.style.backgroundImage=hX_5.g.getP(pop, hX_5._BIMG); ds.style.backgroundRepeat=hX_5.g.getP(pop, hX_5._BREP); ds.style.backgroundAttachment=hX_5.g.getP(pop, "background-attachment"); if (hX_5.brw.isIE()) { ds.style.backgroundPositionX=hX_5.g.getP(pop, "background-position-x"); ds.style.backgroundPositionY=hX_5.g.getP(pop, "background-position-y"); } else { ds.style.backgroundPosition=hX_5.g.getP(pop, hX_5._BPOS); } pop.insertBefore (ds, pop.firstChild); } if (this.transparency && this.transDiv) { ds=this.transDiv; var lB=hX_5.g.parseBorder(pop, hX_5._LFT,0), rB=hX_5.g.parseBorder(pop, hX_5._RGT,0); var tB=hX_5.g.parseBorder(pop, hX_5._TOP,0), bB=hX_5.g.parseBorder(pop, hX_5._BOT,0); ds.style.left=ds.style.top=hX_5._ZPX; ds.style.width=(w-(lB+rB)) + hX_5._PX; ds.style.height=(h-(tB+bB)) + hX_5._PX; ds.style.display=hX_5._BLK; ds.style.zIndex=hX_5.__1; pop.style.backgroundColor=hX_5._TRN; pop.style.backgroundImage=hX_5._NO; if (hX_5.brw.isNavOrMoz()) pop.style.opacity=hX_5._1; this.addTransparency(ds, this.transparency); } if (hX_5.brw.isNavOrMoz()) { pop.style.MozOutlineStyle=hX_5._SLD; this.dropShadowWidth=parseInt(hX_5.g.getP(pop, "-moz-outline-width"),10); pop.style.MozOutlineStyle=hX_5._E; this.dropShadowColor=hX_5.g.getP(pop, "-moz-outline-color"); off=-1; } else { this.dropShadowWidth=parseInt(hX_5.g.getP(pop, null, "outline-width"),10); this.dropShadowColor=hX_5.g.getP(pop, null, "outline-color"); off=0; } if (this.dropShadowWidth > 0) { this.dropShadowWidth=(this.dropShadowWidth > 10) ? 10 : this.dropShadowWidth; var scale=(this.transparency) ? this.transparency : .8; var scaleStep=(scale-0.10)/this.dropShadowWidth; scaleStep=(scaleStep < 0) ? 0 : scaleStep; for (i=1; i <= this.dropShadowWidth; i++) { if (i > this.dropDivs.length) { ds=document.createElement(hX_5._DIV); ds.style.position=hX_5._ABS; ds.style.display=hX_5._NO; ds.style.padding=ds.style.margin=ds.style.left=ds.style.top=hX_5._ZPX; ds.style.backgroundColor=hX_5._TRN; ds.style.borderStyle=hX_5._SLD; ds.style.borderWidth=hX_5._ZPX; ds.style.borderBottomWidth=ds.style.borderRightWidth=hX_5._1PX; this.dropDivs.push(ds); this.ownerObj.insertBefore (ds, (this.ownerObj.firstChild)); } ds=this.dropDivs[i-1]; ds.style.borderColor=(this.dropShadowColor) ? this.dropShadowColor : hX_5.CLR_SHDW; this.addTransparency(ds, (scale-((i-1)*scaleStep))); } } for (i=0; i < this.dropShadowWidth; i++) { ds=this.dropDivs[i]; if (ds) { ds.style.left=(x+i+2+off) + hX_5._PX; ds.style.top=(y+i+2+off) + hX_5._PX; ds.style.width=(w-1) + hX_5._PX; ds.style.height=(h-1) + hX_5._PX; ds.style.zIndex=hX_5._E+(1000000-11+i); ds.style.display=hX_5._BLK; } } if (hX_5.brw.isIE() && document.elementFromPoint) { var x1, y1, test, sBase=(hX_5.brw.isIE6_CSS()) ? document.body.parentNode : document.body; x=x - sBase.scrollLeft; y=y - sBase.scrollTop; pop.style.display=hX_5._NO; for (x1=x; x1 < x+w; x1+=12) { for (y1=y; y1 < y+h; y1+=12) { test=document.elementFromPoint(x1, y1); if (test && test.tagName == hX_5._SEL && test.style.visibility != hX_5._HI && test.style.display != hX_5._NO) { if (!this.hideArray) { this.hideArray=[]; this.hideArrayV=[]; } this.hideArray.push(test); this.hideArrayV.push(test.style.visibility); test.style.visibility=hX_5._HI; } } test=document.elementFromPoint(x1, y+h-1); if (test && test.tagName == hX_5._SEL && test.style.visibility != hX_5._HI && test.style.display != hX_5._NO) { if (!this.hideArray) { this.hideArray=[]; this.hideArrayV=[]; } this.hideArray.push(test); this.hideArrayV.push(test.style.visibility); test.style.visibility=hX_5._HI; } } pop.style.display=hX_5._BLK; } } } if (pop && this.parentCOMPobj && this.clickStyle != hX_5.POP_STYLE_MANAGED) { hX_5.popMgr.start (pop, this.parentCOMPobj, (this.clickStyle==hX_5.POP_STYLE_CLICK_SCROLLABLE)); if (overrideESC && hX_5.brw.isNavOrMoz()) hX_5.popMgr.overrideESC=true; } return true; } HxG_5.prototype.JSFPopup.prototype.uirelease=function (force) { if (this.DOMobj && (force || !this.sticky)) { var i; for (i=0; i < this.dropShadowWidth; i++) if (this.dropDivs[i]) this.dropDivs[i].style.display=hX_5._NO; if (this.transparency && this.transDiv) { this.transDiv.style.display=hX_5._NO; this.DOMobj.style.backgroundColor=this.DOMobj.style.backgroundImage=hX_5._E; if (hX_5.brw.isNavOrMoz()) this.DOMobj.style.opacity=hX_5._E; } this.DOMobj.style.display=hX_5._NO; this.DOMobj.style.visibility=hX_5._HI; if (this.hideArray) { for (i=0; i < this.hideArray.length; i++) { if (this.hideArray[i] && this.hideArray[i].style) this.hideArray[i].style.visibility=this.hideArrayV[i]; } this.hideArray=null; } return true; } return false; } HxG_5.prototype.JSFPopup.prototype.isPopped=function() { return (this.DOMobj && this.DOMobj.style.display != hX_5._NO) ? true : false; } HxG_5.prototype.JSFPopup.prototype.addTransparency=function(o,t) { if (o) { if (o.filters) { o.style.filter="progid:DXImageTransform.Microsoft.Alpha(enabled=false)"; o.filters.item("DXImageTransform.Microsoft.Alpha").opacity=t*100; o.filters.item("DXImageTransform.Microsoft.Alpha").enabled=true; } else if (o.style) o.style.MozOpacity=t; } } HxG_5.prototype.JSFPopup.prototype.removeTransparency=function(o) { if (o) { if (o.filters) { o.style.filter="progid:DXImageTransform.Microsoft.Alpha(enabled=false)"; o.filters.item("DXImageTransform.Microsoft.Alpha").opacity=100; o.filters.item("DXImageTransform.Microsoft.Alpha").enabled=true; } else if (o.style) o.style.MozOpacity=1; } } HxG_5.prototype.tabNavigator=function() { this.getFocus=function (obj, dir, h, scope, ignVis) { return gFocus(obj, ((dir > 0)?+1:-1), h, scope, ignVis); } this.getTabItems= function () { return tabItems; } this.getFirst=getFirst; this.getLast=getLast; this.firstInScope=this.lastInScope=this.scope=null; var i, tabItems=[]; function elem(obj, s) { this.obj=obj; this.name=(obj.name) ? obj.name : hX_5._E; this.tabOrder=obj.getAttribute("tabIndex"); this.tabOrder=(this.tabOrder==null)?0:this.tabOrder; this.srcOrder=s; } collectTabElement(document.body); for (i=0; i < hX_5.HTMLTags.length; i++) collectTabElement(hX_5.HTMLTags[i]); tabItems.sort(compareTabIndex); function collectTabElement(iNode) { var child, node=iNode; if (node.tagName && node.tagName == hX_5._IFRM) node=(node.contentDocument) ? node.contentDocument : ((node.contentWindow) ? node.contentWindow.document.body : null); if (hX_5.isTabbable(node)) if (notDuplicateElement(node)) tabItems.push(new elem(node, tabItems.length)); for (child=node.firstChild; child != null; child=child.nextSibling) collectTabElement(child); } function notDuplicateElement(node) { if (node && node.nodeType!=undefined && node.nodeType == hX_5.ELEMENT_NODE) { if (node.tagName && node.tagName == hX_5._INP && node.type && node.type.toLowerCase() == hX_5._RAD) { if (node.name && node.name.length > 0) { var ix, l=tabItems.length; for (ix=0; ix 0 && b > 0) r=a-b; else if (a >= 0 && b <= 0) r=-1; else if (b >= 0 && a <= 0) r=+1; return ((r != 0)? r : (ia.srcOrder - ib.srcOrder)); } function getFirst(scope, skipVis) { var r=null, sV=(skipVis!=null && skipVis); if (tabItems.length==0) r=null; else { if (scope!=null && this.scope==scope && this.firstInScope!=null) r=this.firstInScope; else { if ((tabItems[0]).tabOrder>=0 && (sV || hX_5.i.isFocusable(tabItems[0].obj)) && (scope==null || hX_5.isChildTag(tabItems[0].obj, scope))) r=(tabItems[0].obj); else r=gFocus(tabItems[0].obj, 1, false, scope, sV); if (scope!=null) { if (this.scope!=scope) this.lastInScope=null; this.scope=scope; this.firstInScope=r; } } } return r; } function getLast(scope, skipVis) { var l=tabItems.length-1, r=null, sV=(skipVis!=null && skipVis); if (tabItems.length==0) r=null; else { if (scope!=null && this.scope==scope && this.lastOutScope!=null) r=this.lastInScope; else { if ((tabItems[l]).tabOrder >= 0 && (sV || hX_5.i.isFocusable(tabItems[l].obj)) && (scope==null || hX_5.isChildTag(tabItems[l].obj, scope))) r=(tabItems[l].obj); else r=gFocus(tabItems[l].obj, -1, false, scope, sV); if (scope!=null) { if (this.scope!=scope) this.firstInScope=null; this.scope=scope; this.lastInScope=r; } } } return r; } function gFocus(obj, delta, skipH, inscope, skipVis) { var r=null, ix, hit=false; for (ix=0;ix= tabItems.length) ix0=0; if (!skipH || tabItems[ix0].obj.id==undefined || !(skipH && tabItems[ix0].obj.id.length>10 && tabItems[ix0].obj.id.substr(tabItems[ix0].obj.id.length-10)=="_HXB_HPBTN")) { obj0=(tabItems[ix0]).obj; if ((tabItems[ix0]).tabOrder >= 0) hit=(inscope==null || (inscope!=null && hX_5.isChildTag(obj0, inscope))) && (skipVis || hX_5.i.isFocusable(obj0)); } ix0+=delta; i++; } r=(hit) ? obj0 : r; } return r; } } HxG_5.prototype.inputState=function (_obj, _behavior, _shortform) { var obj=_obj, behavior=_behavior, value=obj.value, orgvalue=obj.value; var pos=-1, sel=-1, orgpos=-1, autotab=0, skipC=false; var keydown=false, keypress=false, updating=false, autosubmit=false, focus=false, checkedComponent=false; var keypress_r=null, commitCallback=null, hasComponent=null, autotabtimer=null; this.rollback=rollback; this.commit=commit; this.uirelease=uirelease; this.destroy=destroy; this.setAutoTab=function setAutoTab(x) { autotab=x; } this.setAutoSubmit= function setAutoSubmit(){ autosubmit=true; } this.setCommitCallback= function setCommitCallback(x) { commitCallback=x; } this.setValue=function setValue(c) { value=c; } this.getValue=function getValue() { return value; } this.setPos=function setPos(c) { pos=c; } this.getPos=function getPos() { return pos; } this.hasSel=function hasSel() { return sel; } this.dispatch=dispatch; this.dispatchTimer=dispatchTimer; hX_5.attachInputStateEvent(obj, hX_5._onF); hX_5.attachInputStateEvent(obj, hX_5._onB); hX_5.attachInputStateEvent(obj, hX_5._onKD); hX_5.attachInputStateEvent(obj, hX_5._onKP); hX_5.attachInputStateEvent(obj, hX_5._onKU); if (_shortform == null) { hX_5.attachInputStateEvent(obj, hX_5._onMC); if (hX_5.brw.isIE()) { hX_5.attachInputStateEvent(obj, hX_5._onCP); hX_5.attachInputStateEvent(obj, hX_5._onCT); hX_5.attachInputStateEvent(obj, hX_5._onPST); } } function saveState () { value=obj.value; pos=hX_5.sel.getCaretPos(obj); sel=hX_5.sel.hasSelection(obj); orgvalue= value; orgpos=pos; } function dispatchTimer (item, action) { autotabtimer=null; if (focus && action == "autotab" && (autotab > 0)) doAutoTab(); } function destroy () { hX_5.removeAllEvents(obj, obj.id); } function uirelease () { keydown=keypress=false; updating=true; if (autotabtimer) { hX_5.i.killTimerTimed(autotabtimer); autotabtimer=null; } if (focus && behavior.assist && behavior.assist.onBlur) behavior.assist.onBlur(null); focus=false; hX_5.pendingPrompt=null; } function dispatch (evt) { var r=true, newR; if (hX_5.pendingFocusReturn && hX_5.pendingFocusReturn != obj.id) return true; hX_5.pendingFocusReturn=null; if ((obj.readOnly != null && obj.readOnly == true) || (obj.disabled != null && obj.disabled == true)) return true; skipC=false; switch (evt.type) { case hX_5._evF: focus=true; hX_5.pendingPrompt=this; keydown=keypress=false; updating=true; autotabtimer=null; if (!checkedComponent) { hasComponent=hX_5.getComponentById(obj.id); checkedComponent=true; } if (behavior.assist && behavior.assist.onFocus) behavior.assist.onFocus(evt); if (hX_5.pendingSelect && obj.select) obj.select(); hX_5.pendingSelect=false; saveState(); if (behavior.assist && pos >= 0) obj.style.imeMode=hX_5._DSB; break; case hX_5._evB: keydown=keypress=false; updating=true; if (autotabtimer) { hX_5.i.killTimerTimed(autotabtimer); autotabtimer=null; } if (focus && behavior.assist && behavior.assist.onBlur) behavior.assist.onBlur(evt); focus=false; hX_5.pendingPrompt=null; break; case hX_5._evKD: if (!focus) break; keydown=true; keypress=updating=false; saveState(); if (isDisposableKey(evt) && behavior.assist) return false; else if (isSubmitFcnKey(evt) && behavior.assist) { if (focus && behavior.assist && behavior.assist.onBlur) behavior.assist.onBlur(evt); focus=false; break; } else if (hX_5.isFcnKey(evt) && behavior.assist) { if (hasComponent && hasComponent.isRedirectFcnKey && hasComponent.isRedirectFcnKey(evt)) { var newValue=(behavior.assist.fromAssist) ? behavior.assist.fromAssist(value) : obj.value; newValue=(hasComponent.doRedirectFcnKey) ? hasComponent.doRedirectFcnKey(evt, newValue) : newValue; newValue=(behavior.assist.toAssist) ? behavior.assist.toAssist(newValue) : newValue; value=(newValue.v) ? newValue.v : value; commit(evt); if (pos >= 0) hX_5.sel.setCaretPos(obj, pos); r=false; } else if (behavior.assist.onChangeKeyCode && !isSkipFcnKey(evt)) { r=behavior.assist.onChangeKeyCode(evt); if (r == -1) r=true; else if (r) { newR=doChange(evt); r=(r == -2) ? false : newR; } if (!r) hX_5.i.cancelAction(evt, true); } if (!isPrintableFcnKey(evt)) { keypress=true; keypress_r=r; } } break; case hX_5._evKP: if (!focus) break; updating=false; if (hX_5.brw.isNavOrMoz() && evt.keyCode && (evt.keyCode == 191 || evt.keyCode == 229) && evt.charCode!=null && evt.charCode==0) return false; if (keypress) r=keypress_r; else { keypress=true; if (behavior.assist && behavior.assist.onChangeChrCode) { r=behavior.assist.onChangeChrCode(evt); newR=false; if (r > 1) { r=true; newR=true; } else if (r) { newR=doChange(evt); r=(r == -2) ? false : newR; } if (newR && (autotab > 0)) doAutoTab(); } else if (autotab > 0) autotabtimer=hX_5.i.startTimerTimed (obj.id, 0, "autotab", 1, hX_5.BHR_assist); } break; case hX_5._evKU: if (!focus) break; updating=false; if (behavior.assist && behavior.assist.onChangeKeyCode && (keydown && !keypress)) { if (hX_5.brw.isIE() && evt.keyCode == 67) r=false; else { r=behavior.assist.onChangeKeyCode(evt); if (r) { newR=doChange(evt); r=(r == -2) ? false : newR; } } } keydown=keypress=false; break; case hX_5._evMC: if (!focus) break; keydown=keypress=updating=false; saveState(); if (!sel) { if (behavior.assist && behavior.assist.onClick) { r=behavior.assist.onClick(evt); if (r == -2 && pos >= 0) { hX_5.sel.setCaretPos(obj, pos); r=false; } } } break; case hX_5._evCT: if (!focus) break; keydown=keypress=updating=false; saveState(); if (sel) { if (behavior.assist && behavior.assist.onCut) { r=behavior.assist.onCut(evt); if (r == -1) r=true; else if (r) { r=doChange(evt); r=(r == -2) ? false : r; } } } break; case hX_5._evCP: if (focus && sel && behavior.assist && behavior.assist.onCopy) behavior.assist.onCopy(evt); break; case hX_5._evPST: if (!focus) break; keydown=keypress=updating=false; saveState(); if (behavior.assist && behavior.assist.onPaste) { newR=false; r=behavior.assist.onPaste(evt); if (r) { newR=doChange(evt); r=(r == -2) ? false : newR; } var didTab=false; if (newR && (autotab > 0)) didTab=doAutoTab(); if (hX_5.brw.isIE() && newR && !didTab && pos >= 0) hX_5.sel.setCaretPos(obj, pos, null, true); } break; } return r; } function doChange(evt) { var r=true; if (behavior.assist && behavior.assist.onValidate) r=behavior.assist.onValidate(evt); if (r) commit(evt); else rollback(evt); return r; } function rollback (evt) { value=orgvalue; pos=orgpos; update(evt); } function commit (evt) { if (!skipC && commitCallback) commitCallback(obj); update (evt); } function update (evt) { if (!updating) { updating=true; if (obj.value != value) obj.value=value; if (pos >= 0) hX_5.sel.setCaretPos(obj, pos); updating=false; } } function doAutoTab() { if (isFilled(hX_5.sel.getCaretPos(obj))) { if (autosubmit) { var a=[], t=[]; a.push(hX_5.ACT_SUBMIT); t.push((behavior.autoSubmit.length > 0) ? behavior.autoSubmit : obj.form.id); return (hX_5.action.processAction (obj, null, null, a, true, t, null, null, null, true)); } else hX_5.gotoNextPrev(obj, true, true); return true; } return false; } function isFilled(curpos) { return ((behavior && behavior.assist && behavior.assist.isFilled)?behavior.assist.isFilled(curpos):(obj.value.length >= autotab && (curpos >= autotab))); } function isSubmitFcnKey (evt) { var code=(evt.keyCode && (evt.keyCode != 0)) ? evt.keyCode : -1; if (code == 13) if (!hX_5.isKeyBound(obj, "13", evt, hX_5.ACT_SUBMIT)) return true; return false; } function isDisposableKey (evt) { var code=(evt.keyCode && (evt.keyCode != 0)) ? evt.keyCode : -1; return (hX_5.isKeyBound(obj, code+hX_5._E, evt, hX_5.ACT_NOTHING, hX_5.ACT_NONE, hX_5.ACT_STOP)); } function isSkipFcnKey (evt) { var code=(evt.keyCode && (evt.keyCode != 0)) ? evt.keyCode : -1; if (code == 16 || code == 17 || code == 18 || code == 145 || code == 166 || code == 167) return true; return false; } function isPrintableFcnKey (evt) { var code=(evt.keyCode && (evt.keyCode != 0)) ? evt.keyCode : -1; return (code >= 223); } } hX_5.STR_SPINNER_INCREMENT="Increment"; hX_5.STR_SPINNER_DECREMENT="Decrement"; hX_5.STR_TABPANEL_SCROLLLEFT="Scroll Left"; hX_5.STR_TABPANEL_SCROLLRIGHT="Scroll Right"; hX_5.STR_SLIDER_LABEL="Show Slider"; hX_5.STR_COLOR_DN_TOGGLE="Show Colors"; hX_5.STR_TIME_DN_TOGGLE="Show Times"; hX_5.STR_DATE_DN_TOGGLE="Show Calendar"; hX_5.STR_DATE_PREVIOUS_YEAR="Previous year"; hX_5.STR_DATE_NEXT_YEAR="Next year"; hX_5.STR_DATE_PREVIOUS_MONTH="Previous month"; hX_5.STR_DATE_NEXT_MONTH="Next month"; hX_5.STR_TIMEZONES=[ ["+0000", "GMT", "+0000", "GMT", "Greenwich Mean Time"], ["-0400", "AST", "-0300", "ADT", "Atlantic Standard Time"], ["-0500", "EST", "-0400", "EDT", "Eastern Standard Time"], ["-0600", "CST", "-0500", "CDT", "Central Standard Time"], ["-0700", "MST", "-0600", "MDT", "Mountain Standard Time"], ["-0800", "PST", "-0700", "PDT", "Pacific Standard Time"], ["-1000", "HST", "-0900", "HDT", "Hawaii-Aleutian Standard Time"], ["","","",""]]; hX_5.ERR_datetime_parse_fail= "\"{0}\" cannot be interpreted as a date or time."; hX_5.ERR_epoch_name="\"{0}\" cannot be interpreted as a date. The epoch is not correct."; hX_5.ERR_day_name="\"{0}\" cannot be interpreted as a date. The day name is not correct."; hX_5.ERR_month_name="\"{0}\" cannot be interpreted as a date. The month name is not correct."; hX_5.ERR_month_range="\"{0}\" cannot be interpreted as a date. The month must be between 1 and 12."; hX_5.ERR_month_rangelimit="\"{0}\" cannot be interpreted as a date. {1} doesn't have {2} days."; hX_5.ERR_epoch_range="\"{0}\" cannot be interpreted as a date. The year is not correct."; hX_5.ERR_hour_range_long="\"{0}\" cannot be interpreted as a time. The hour must be between 0 and 23."; hX_5.ERR_hour_range_short="\"{0}\" cannot be interpreted as a time. The hour must be between 1 and 12."; hX_5.ERR_minute_range="\"{0}\" cannot be interpreted as a time. Minutes must be between 0 and 59."; hX_5.ERR_second_range="\"{0}\" cannot be interpreted as a time. Seconds must be between 0 and 59."; hX_5.ERR_ampm_name="\"{0}\" cannot be interpreted as a time. The time must have an AM or PM indicator."; hX_5.ERR_tzone_name="\"{0}\" cannot be interpreted as a time. The time zone is not correct."; hX_5.ERR_generic="This value cannot be interpreted."; hX_5.ERR_empty="This value cannot be interpreted as no value was provided."; hX_5.ERR_minimum="The value provided is less than the minimum allowed."; hX_5.ERR_maximum="The value provided is greater than the maximum allowed."; hX_5.ERR_required="This value is required."; hX_5.ERR_constraint="This value cannot be intepreted. The pattern of digits or alphabetic characters is not correct."; hX_5.ERR_number_fail="\"{0}\" cannot be interpreted as a number."; hX_5.ERR_number_char="\"{0}\" cannot be interpreted as a number. \"{1}\" is not a valid character.";