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.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.locales=[];
this.L=[];
this.mustDestroy= [];
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_submitlistener="submitlistener";
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.BHR_roweditshowhide="tableroweditshowhide";
HxG_5.prototype.BHR_roweditsave="tableroweditsave";
HxG_5.prototype.BHR_rowaction="tablerowaction";
HxG_5.prototype.BHR_rowcategory="tablerowcategory";
HxG_5.prototype.BHR_rowselect="tablerowselect";
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;
if (HxG_5.prototype.JSFBehaviorRowAction && !hX_5.JSFBehaviorRowAction) hX_5.JSFBehaviorRowAction=HxG_5.prototype.JSFBehaviorRowAction;
if (HxG_5.prototype.JSFBehaviorRowCategory && !hX_5.JSFBehaviorRowCategory) hX_5.JSFBehaviorRowCategory=HxG_5.prototype.JSFBehaviorRowCategory;
if (HxG_5.prototype.JSFBehaviorRowEditShowHide && !hX_5.JSFBehaviorRowEditShowHide) hX_5.JSFBehaviorRowEditShowHide=HxG_5.prototype.JSFBehaviorRowEditShowHide;
if (HxG_5.prototype.JSFBehaviorRowEditSave && !hX_5.JSFBehaviorRowEditSave) hX_5.JSFBehaviorRowEditSave=HxG_5.prototype.JSFBehaviorRowEditSave;
if (HxG_5.prototype.JSFWebPagerSubmit && !hX_5.JSFWebPagerSubmit) hX_5.JSFWebPagerSubmit=HxG_5.prototype.JSFWebPagerSubmit;
if (HxG_5.prototype.JSFBehaviorRowSelect && !hX_5.JSFBehaviorRowSelect) hX_5.JSFBehaviorRowSelect=HxG_5.prototype.JSFBehaviorRowSelect;
}
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_WHILEEVENT="WHILEEVENT";
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._NOW="nowrap";
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._onSS= "onselectstart";
HxG_5.prototype._evSS= "selectstart";
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._TH=HxG_5.prototype.tagCase("th");
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.HxICol.prototype.RGBtoHEX=function (c) {
return (hX_5.padL(c.R.toString(16),2)+""+hX_5.padL(c.G.toString(16),2)+""+hX_5.padL(c.B.toString(16),2)).toUpperCase();
}
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<m; j++) jD+=this.daysInMonth(j,y);
jD+=(d-1+1948440);
}
else {
if (y < 0) return 0;
jD=this.calcRoshHaShannah(y);
mX=(m>=6)?m:(this.monthsInYear(y));
for (j=6; j<mX; j++) jD+=this.daysInMonth(j,y);
if (mX!=m) for (j=0; j<m; j++) jD+=this.daysInMonth(j,y);
jD+=(d+347995);
}
return jD;
}
HxG_5.prototype.HxICal.prototype.julianToDatePc= function (jd) {
var i,j,x,z,y,d,m;
if (jd < 0) return {year:-4713, month:0, date:1};
if (jd > 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();
obj.lc=hX_5.currentLocale();
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; i<a.length; i++) {
if (a[i]) {
childId=parentId + hX_5._Y + (i+1);
this.SubComponents[childId]=a[i];
a[i].id=childId;
a[i].p=theParent;
theParent.addSubComponent(a[i], null);
}
}
}
}
return true;
}
return false;
}
HxG_5.prototype.addS=HxG_5.prototype.addSubComponent;
HxG_5.prototype.removeSubComponent=function (parentId, childId) {
if (parentId && this.brw.isW3C()) {
var theParent=this.getComponentById (parentId);
theParent=(theParent == null) ? this.getSubComponentById (parentId) : theParent;
if (theParent && childId) {
this.SubComponents[childId]=null;
theParent.removeSubComponent (childId);
return true;
}
}
return false;
}
HxG_5.prototype.remS=HxG_5.prototype.removeSubComponent;
HxG_5.prototype.destroySubComponent=function (childId) {
if (childId && this.brw.isW3C()) {
this.SubComponents[childId]=null;
return true;
}
return false;
}
HxG_5.prototype.addBehavior=function(id, eventname, obj) {
if (id && eventname && obj && obj.type && this.brw.isW3C()) {
var DOMobj=(id==hX_5._BODY)?document.body:this.getElementById(id);
if (DOMobj) {
var e=hX_5.getBehaviorEvent(obj.type, eventname), i=e.indexOf(hX_5._ON), thisid=id + hX_5._HX + obj.type + hX_5._U + ((i==0)?e.substr(2):e);
if (this.Behaviors[thisid] && this.Behaviors[thisid].addSubComponent) {
this.Behaviors[thisid].addSubComponent(obj);
} else {
this.Behaviors[thisid]=obj;
obj.id=id;
obj.eventname=e;
obj.DOMobj=DOMobj;
obj.HTMLrendered=false;
obj.p=this;
obj.r=hX_5.currentResource();
obj.lc=hX_5.currentLocale();
this.loadComponent(obj);
}
return true;
}
}
return false;
}
HxG_5.prototype.addB=HxG_5.prototype.addBehavior;
HxG_5.prototype.removeBehavior=function(obj) {
if (obj && obj.DOMobj && obj.DOMobj.id && this.brw.isW3C()) {
hX_5.removeAllEvents(obj.DOMobj, obj.DOMobj.id);
if (obj.destroy) obj.destroy();
var e=this.getBehaviorEvent(obj.type, obj.eventname),i=e.indexOf(hX_5._ON), thisid=obj.id + hX_5._HX + obj.type + hX_5._U + ((i==0)?e.substr(2):e);
hX_5.Behaviors[thisid]=null;
delete obj;
}
return;
}
HxG_5.prototype.addConverter=function(id, obj) {
if (id && obj && this.brw.isW3C()) {
this.Converters[id]=obj;
obj.id=id;
obj.p=this;
return true;
}
return false;
}
HxG_5.prototype.addC=HxG_5.prototype.addConverter;
HxG_5.prototype.addValidator=function(id, obj) {
if (id && obj && this.brw.isW3C()) {
this.Validators[id]=obj;
obj.id=id;
obj.p=this;
return true;
}
return false;
}
HxG_5.prototype.addV=HxG_5.prototype.addValidator;
HxG_5.prototype.addHTMLTag=function(id, type) {
if (id && type=="taborder" && this.brw.isW3C()) {
var DOMobj=this.getElementById(id);
if (DOMobj) {
this.HTMLTags.push(DOMobj);
return true;
}
}
return false;
}
HxG_5.prototype.addH=HxG_5.prototype.addHTMLTag;
HxG_5.prototype.addPopup=function(id, parentId, ownerObj, style, altComp) {
if (id && this.brw.isW3C()) {
if (this.Popups[id]) {
return this.Popups[id];
} else {
var obj=new this.JSFPopup(parentId, ownerObj, style, altComp);
this.Popups[id]=obj;
obj.id=id;
obj.HTMLrendered=false;
obj.p=this;
obj.r=hX_5.currentResource();
obj.lc=hX_5.currentLocale();
this.loadComponent(obj);
return obj;
}
}
return null;
}
HxG_5.prototype.addP=HxG_5.prototype.addPopup;
HxG_5.prototype.removePopup=function(id) {
if (id && this.brw.isW3C()) {
var obj=this.Popups[id];
if (obj) {
if (obj.destroy) obj.destroy();
delete obj;
}
this.Popups[id]=null;
}
}
HxG_5.prototype.onPageLoad=function () {
if (!this.bodyLoadRewritten) this.bodyLoadEventNum=this.attachEvent(document.body, hX_5._onL, hX_5._lL, this.pageLoadAction);
this.bodyLoadRewritten=true;
return true;
}
HxG_5.prototype.loadComponent=function(c) {
if (this.bodyLoadDone && c.onPageLoad) {
if (!c.HTMLrendered) c.onPageLoad();
c.HTMLrendered=true;
}
}
HxG_5.prototype.pageUnloadAction= function(evt) {
var i, varobj;
if (typeof(hX_5) != 'undefined') hX_5.removeEvent(document.body, hX_5._onUL, this.bodyUnloadEventNum);
hX_5.uirelease(null,true);
for (i=0; i<hX_5.mustDestroy.length; i++) if (hX_5.mustDestroy[i].destroy) hX_5.mustDestroy[i].destroy();
if (hX_5.tabNav != null) delete (hX_5.tabNav);
if (hX_5.CSSSelectors != null) delete (hX_5.CSSSelectors);
if((typeof ODCRegistry) != 'undefined' && ODCRegistry) if (typeof(unbindElements) != 'undefined') unbindElements();
return true;
}
HxG_5.prototype.pageLoadAction=function(evt) {
var varobj, inBodyLoad=hX_5.bodyLoadDone;
hX_5.bodyLoadDone=true;
hX_5.removeEvent(document.body, hX_5._onL, hX_5.bodyLoadEventNum);
for (varobj in hX_5.Components) if (hX_5.Components[varobj]) hX_5.loadComponent(hX_5.Components[varobj]);
for (varobj in hX_5.Behaviors) if (hX_5.Behaviors[varobj]) hX_5.loadComponent(hX_5.Behaviors[varobj]);
for (varobj in hX_5.Popups) if (hX_5.Popups[varobj]) hX_5.loadComponent(hX_5.Popups[varobj]);
if (hX_5.brw.isIE() || ((typeof ODCRegistry) != 'undefined' && ODCRegistry))
this.bodyUnloadEventNum=hX_5.attachEvent(document.body, "onunload", hX_5._lL, hX_5.pageUnloadAction);
if (!inBodyLoad && ((hX_5.bodyLoadRedrawA && hX_5.bodyLoadRedrawB) || (hX_5.globalResize && hX_5.brw.isNavOrMoz()))) hX_5.redraw();
hX_5.bodyLoadRedrawA=hX_5.bodyLoadRedrawB=false;
return;
}
HxG_5.prototype.pageReLoadAction=function() {
var varobj;
hX_5.bodyLoadDone=true;
for (varobj in hX_5.Components) if (hX_5.Components[varobj]) hX_5.loadComponent(hX_5.Components[varobj]);
for (varobj in hX_5.Behaviors) if (hX_5.Behaviors[varobj]) hX_5.loadComponent(hX_5.Behaviors[varobj]);
for (varobj in hX_5.Popups) if (hX_5.Popups[varobj]) hX_5.loadComponent(hX_5.Popups[varobj]);
if ((hX_5.bodyLoadRedrawA && hX_5.bodyLoadRedrawB) || (hX_5.globalResize && hX_5.brw.isNavOrMoz())) hX_5.redraw();
hX_5.bodyLoadRedrawA=hX_5.bodyLoadRedrawB=false;
return;
}
HxG_5.prototype.subscribe=function(eventName, handler, c) {
if ((c!=null && c.type!=undefined) || (c==null && hX_5.isFunction(handler))) {
this.topicUnq++;
if (this.topicUnq>10000) 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.redrawWithODC=function (thisC, param, noloop) {
this.redraw(param,noloop);
if (thisC.DOMobj && this.brw.isNavOrMoz() && hX_5.isDef(typeof(ODCRegistry)) && ODCRegistry!=null && ODCRegistry.Elements) {
for (var e in ODCRegistry.Elements) {
if (ODCRegistry.Elements[e] && ODCRegistry.Elements[e].JSObject && ODCRegistry.Elements[e].JSObject.type && ODCRegistry.Elements[e].JSObject.type.toLowerCase()=="tabpanel") {
var p=thisC.DOMobj.parentNode;
var t=ODCRegistry.Elements[e].JSObject;
var tp=(t.getDOMobj)?t.getDOMobj():null;
if (tp) {
while (p && p!=tp) p=p.parentNode;
if (p && p==tp) {
if (t.redraw) t.redraw();
break;
}
}
}
}
}
}
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;
}
if (hX_5.CSSSelectors !=null) {
delete (hX_5.CSSSelectors)
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, allTimers) {
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(allTimers);
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_isSafari=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.isSafari=function() { return (this.m_isSafari); }
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_isSafari=(window.navigator != null) ? (window.navigator.userAgent.indexOf("afari") != -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 (self.innerWidth) {
var sb=hX_5.getScrollbarWidth()
if (document.body.clientWidth!=undefined && document.body.clientWidth!=null && document.body.clientWidth > 0 && document.body.clientWidth==self.innerWidth-sb)
return self.innerWidth-sb;
else
 return self.innerWidth;
} else if (document.documentElement && document.documentElement.clientWidth)
return document.documentElement.clientWidth;
else if (this.p.brw.isIE6_CSS() && document.body.parentElement.clientWidth)
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 (self.innerHeight) {
var sb=hX_5.getScrollbarWidth()
if (document.body.clientHeight!=undefined && document.body.clientHeight!=null && document.body.clientHeight > 0 && document.body.clientHeight==self.innerHeight-sb)
return self.innerHeight-sb;
else
 return self.innerHeight;
} else if (document.documentElement && document.documentElement.clientHeight)
return document.documentElement.clientHeight;
else if (this.p.brw.isIE6_CSS() && document.body.parentElement.clientHeight)
return document.body.parentElement.clientHeight;
else if (document.body && document.body.clientHeight)
return document.body.clientHeight;
return 0;
}
HxG_5.prototype.HxGeometryMgr.prototype.getWinScrollOffsetX=function () {
if (self.pageXOffset)
return self.pageXOffset;
else if (document.documentElement && document.documentElement.scrollLeft)
return document.documentElement.scrollLeft;
else if (document.body)
return document.body.scrollLeft;
return 0;
}
HxG_5.prototype.HxGeometryMgr.prototype.getWinScrollOffsetY=function () {
if (self.pageYOffset)
return self.pageYOffset;
else if (document.documentElement && document.documentElement.scrollTop)
return document.documentElement.scrollTop;
else if (document.body)
return document.body.scrollTop;
return 0;
}
HxG_5.prototype.HxGeometryMgr.prototype.getPageWidth=function () {
if (hX_5.brw.isIE() || (document.body.scrollWidth > document.body.offsetWidth))
return document.body.scrollWidth;
else
 return document.body.offsetWidth;
}
HxG_5.prototype.HxGeometryMgr.prototype.getPageHeight=function () {
if (hX_5.brw.isIE() || (document.body.scrollHeight > document.body.offsetHeight))
return document.body.scrollHeight;
else
 return document.body.offsetHeight;
}
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<l; x++) {
s=hX_5.g.getP(src, arguments[x]);
hX_5.g.setP(dst, arguments[x], s);
}
}
HxG_5.prototype.HxGeometryMgr.prototype.CSStagToDOMtag=function(value) {
var w=value, q=w.indexOf(hX_5._Y);
while (q >= 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.L=[];
this.BIGNUM_converter=null;
this.STDDTP_converter=null;
}
HxG_5.prototype.HxLCache=function () {
this.MAX_STR_DATE_MONTHS=[];
this.MAX_STR_DATE_SHMONTHS=[];
this.MAX_STR_DATE_DAYS=[];
this.MAX_STR_DATE_SHDAYS=[];
}
HxG_5.prototype.HxCache.prototype.strInit=function(l) {
if (hX_5.c.L[l]==null) hX_5.c.L[l]=new hX_5.HxLCache();
if (hX_5.c.L[l].MAX_STR_DATE_MONTHS.length==0) {
var i,j,k;
for (i=0;i<3;i++) {
hX_5.c.L[l].MAX_STR_DATE_SHDAYS[i]=hX_5.c.L[l].MAX_STR_DATE_DAYS[i]=hX_5.c.L[l].MAX_STR_DATE_SHMONTHS[i]=hX_5.c.L[l].MAX_STR_DATE_MONTHS[i]=0;
for (j=0;j<hX_5.L[l].STRA_DATE_SHDAYS[i].length;j++) hX_5.c.L[l].MAX_STR_DATE_SHDAYS[i]=Math.max(hX_5.c.L[l].MAX_STR_DATE_SHDAYS[i], hX_5.L[l].STRA_DATE_SHDAYS[i][j].length);
for (j=0;j<hX_5.L[l].STRA_DATE_DAYS[i].length;j++) hX_5.c.L[l].MAX_STR_DATE_DAYS[i]=Math.max(hX_5.c.L[l].MAX_STR_DATE_DAYS[i], hX_5.L[l].STRA_DATE_DAYS[i][j].length);
for (j=0;j<hX_5.L[l].STRA_DATE_SHMONTHS[i].length;j++) hX_5.c.L[l].MAX_STR_DATE_SHMONTHS[i]=Math.max(hX_5.c.L[l].MAX_STR_DATE_SHMONTHS[i], hX_5.L[l].STRA_DATE_SHMONTHS[i][j].length);
for (j=0;j<hX_5.L[l].STRA_DATE_MONTHS[i].length;j++) hX_5.c.L[l].MAX_STR_DATE_MONTHS[i]=Math.max(hX_5.c.L[l].MAX_STR_DATE_MONTHS[i], hX_5.L[l].STRA_DATE_MONTHS[i][j].length);
}
}
}
HxG_5.prototype.currentResource=function () {
if (hX_5.res != null) {
if (hX_5.res.length <= 0) {
hX_5.res[0]=new hX_5.HxResourceMgr(hX_5);
hX_5.res[0].setAbsolutePaths();
}
return (hX_5.res[hX_5.res.length-1]);
}
return null;
}
HxG_5.prototype.HxResourceMgr=function (thisparent) {
this.p=thisparent;
this.bPathSet=false;
this.jsfRootToken="/faces";
this.protocol="http://";
this.baseLibPath=".ibmjsfres/";
this.baseImgPath=this.baseLibPath + "img/";
this.baseCssPath=this.baseLibPath + "css/";
this.baseDlgPath=this.baseLibPath + "dlg/";
this.getImgPath=function() { return this.baseImgPath; }
this.getCssPath=function() { return this.baseCssPath; }
this.getDlgPath=function() { return this.baseDlgPath; }
this.p.R_IMG_CNT=7;
this.p.R_IMG_SPACER=0;
this.p.R_IMG_HINKIES=1;
this.p.R_IMG_LG_HINKIES=2;
this.p.R_IMG_VLG_HINKIES=3;
this.p.R_IMG_CAL_HINKIES=4;
this.p.R_IMG_COL_HINKIES=5;
this.p.R_IMG_TIME_HINKIES=6;
this.RF_IMGS=[["1x1.gif", 1, 1, 0, 0, 0],
["hinkies_v3_0_8.gif", 16, 96, 2, 3, 4],
["hinkies_lg_v3_0_8.gif", 24, 24, 2, 2, 1],
["hinkies_vlg_v3_0_8.gif", 24, 24, 2, 2, 1],
["HinkiesC_v3_0_8.gif", 24, 156, 2, 12, 1],
["HinkiesCl_v3_0_8.gif", 24, 156, 2, 12, 1],
["HinkiesT_v3_0_8.gif", 24, 156, 2, 12, 1]];
this.images=[];
}
HxG_5.prototype.HxResourceMgr.prototype.recache=function () {
for (var i=0; i < this.p.R_IMG_CNT; i++) {
this.images[i]=new Image(this.RF_IMGS[i][1], this.RF_IMGS[i][2]);
this.images[i].src=this.getImgPath() + this.RF_IMGS[i][0];
}
}
HxG_5.prototype.HxResourceMgr.prototype.getURI=function (img) {
return hX_5._URL + hX_5._SQT + this.images[img].src + hX_5._SQT + ")";
}
HxG_5.prototype.HxResourceMgr.prototype.getURL=function (img) {
return this.images[img].src;
}
HxG_5.prototype.HxResourceMgr.prototype.wellPosition=function (id, row, col, grp) {
var cellX=(this.RF_IMGS[id][1]/this.RF_IMGS[id][3]), cellY=(this.RF_IMGS[id][2]/(this.RF_IMGS[id][4]*this.RF_IMGS[id][5]));
return 	((-(col * cellX)) + hX_5._PX + hX_5._B + (-((((grp)?grp:0)*(cellY*this.RF_IMGS[id][4]))+(row*cellY))) + hX_5._PX);
}
HxG_5.prototype.setResourceServer=function(path) {
var lchar, cr=this.res.length;
this.res[cr]=new this.HxResourceMgr(this);
lchar=path.charAt(path.length-1);
path=(lchar == "/") ? path : path + "/";
this.res[cr].baseImgPath=path + "img/";
this.res[cr].baseCssPath=path + "css/";
this.res[cr].baseDlgPath=path + "dlg/";
this.res[cr].bPathSet=true;
this.res[cr].recache();
}
HxG_5.prototype.HxResourceMgr.prototype.setAbsolutePaths=function() {
if (this.bPathSet == false) {
var sPathPrefix=this.getAbsolutePathPrefix(this.jsfRootToken);
this.baseImgPath=sPathPrefix + this.baseLibPath + "img/";
this.baseCssPath=sPathPrefix + this.baseLibPath + "css/";
this.baseDlgPath=sPathPrefix + this.baseLibPath + "dlg/";
this.bPathSet=true;
this.recache();
}
}
HxG_5.prototype.HxResourceMgr.prototype.getAbsolutePathPrefix=function (sToken) {
if (this.p.isUnDef(typeof sToken) || sToken == hX_5._E) sToken=this.jsfRootToken;
var sLocation=new String(document.location), sPathPrefix=hX_5._E, iCursor=sLocation.indexOf(sToken, 0) - 1;
var i, sl="/";
if (iCursor < 0) {
iCursor=sLocation.indexOf(this.protocol, 0);
if (iCursor != -1) {
var sTailPath=sLocation.slice(iCursor + this.protocol.length);
for (i=0; i < sTailPath.length; i++) {
if (sTailPath.charAt(i) == sl) {
sTailPath=sTailPath.slice(i);
for (i=1; i < sTailPath.length; i++) {
if (sTailPath.charAt(i) == sl) {
sPathPrefix=sTailPath.substring(0, i + 1);
break;
}
}
}
}
}
} else {
var bFoundProjectDir=false;
for (i=iCursor; i >= 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.setLocale=function(l) {
if (hX_5.locales!=null && l!=null && l.length && l.length>0) hX_5.locales.push(l);
}
HxG_5.prototype.currentLocale=function () {
if (hX_5.locales != null && hX_5.L!=null) {
var l=null;
for (l in hX_5.L) { break; }
if (hX_5.locales.length <= 0 || l==null) hX_5.createDefaultLocale();
return (hX_5.locales[hX_5.locales.length-1]);
}
return null;
}
HxG_5.prototype.createDefaultLocale=function () {
if (hX_5.locales!=null && hX_5.L!=null) {
var q=null, l=null;
if (hX_5.locales.length<=0) {
for (l in hX_5.L) {
hX_5.locales.push(l);
break;
}
}
if (l==null) {
l="default";
hX_5.locales.push(l);
}
for (q in hX_5.L) { break; }
if (q==null && hX_5.STR_TIMEZONES!=undefined) {
hX_5.L[l]=new Object();
if (hX_5.STR_SPINNER_INCREMENT!=undefined) hX_5.L[l].STR_SPINNER_INCREMENT=hX_5.STR_SPINNER_INCREMENT;
if (hX_5.STR_SPINNER_DECREMENT!=undefined) hX_5.L[l].STR_SPINNER_DECREMENT=hX_5.STR_SPINNER_DECREMENT;
if (hX_5.STR_TABPANEL_SCROLLLEFT!=undefined) hX_5.L[l].STR_TABPANEL_SCROLLLEFT=hX_5.STR_TABPANEL_SCROLLLEFT;
if (hX_5.STR_TABPANEL_SCROLLRIGHT!=undefined) hX_5.L[l].STR_TABPANEL_SCROLLRIGHT=hX_5.STR_TABPANEL_SCROLLRIGHT;
if (hX_5.STR_SLIDER_LABEL!=undefined) hX_5.L[l].STR_SLIDER_LABEL=hX_5.STR_SLIDER_LABEL;
if (hX_5.STR_COLOR_DN_TOGGLE!=undefined) hX_5.L[l].STR_COLOR_DN_TOGGLE=hX_5.STR_COLOR_DN_TOGGLE;
if (hX_5.STR_TIME_DN_TOGGLE!=undefined) hX_5.L[l].STR_TIME_DN_TOGGLE=hX_5.STR_TIME_DN_TOGGLE;
if (hX_5.STR_DATE_DN_TOGGLE!=undefined) hX_5.L[l].STR_DATE_DN_TOGGLE=hX_5.STR_DATE_DN_TOGGLE;
if (hX_5.STR_DATE_PREVIOUS_YEAR!=undefined) hX_5.L[l].STR_DATE_PREVIOUS_YEAR=hX_5.STR_DATE_PREVIOUS_YEAR;
if (hX_5.STR_DATE_NEXT_YEAR!=undefined) hX_5.L[l].STR_DATE_NEXT_YEAR=hX_5.STR_DATE_NEXT_YEAR;
if (hX_5.STR_DATE_PREVIOUS_MONTH!=undefined) hX_5.L[l].STR_DATE_PREVIOUS_MONTH=hX_5.STR_DATE_PREVIOUS_MONTH;
if (hX_5.STR_DATE_NEXT_MONTH!=undefined) hX_5.L[l].STR_DATE_NEXT_MONTH=hX_5.STR_DATE_NEXT_MONTH;
if (hX_5.STR_TIMEZONES!=undefined) hX_5.L[l].STR_TIMEZONES=hX_5.STR_TIMEZONES;
if (hX_5.ERR_datetime_parse_fail!=undefined) hX_5.L[l].ERR_datetime_parse_fail=hX_5.ERR_datetime_parse_fail;
if (hX_5.ERR_epoch_name!=undefined) hX_5.L[l].ERR_epoch_name=hX_5.ERR_epoch_name;
if (hX_5.ERR_day_name!=undefined) hX_5.L[l].ERR_day_name=hX_5.ERR_day_name;
if (hX_5.ERR_month_name!=undefined) hX_5.L[l].ERR_month_name=hX_5.ERR_month_name;
if (hX_5.ERR_month_range!=undefined) hX_5.L[l].ERR_month_range=hX_5.ERR_month_range;
if (hX_5.ERR_month_rangelimit!=undefined) hX_5.L[l].ERR_month_rangelimit=hX_5.ERR_month_rangelimit;
if (hX_5.ERR_epoch_range!=undefined) hX_5.L[l].ERR_epoch_range=hX_5.ERR_epoch_range;
if (hX_5.ERR_hour_range_long!=undefined) hX_5.L[l].ERR_hour_range_long=hX_5.ERR_hour_range_long;
if (hX_5.ERR_hour_range_short!=undefined) hX_5.L[l].ERR_hour_range_short=hX_5.ERR_hour_range_short;
if (hX_5.ERR_minute_range!=undefined) hX_5.L[l].ERR_minute_range=hX_5.ERR_minute_range;
if (hX_5.ERR_second_range!=undefined) hX_5.L[l].ERR_second_range=hX_5.ERR_second_range;
if (hX_5.ERR_ampm_name!=undefined) hX_5.L[l].ERR_ampm_name=hX_5.ERR_ampm_name;
if (hX_5.ERR_tzone_name!=undefined) hX_5.L[l].ERR_tzone_name=hX_5.ERR_tzone_name;
if (hX_5.ERR_generic!=undefined) hX_5.L[l].ERR_generic=hX_5.ERR_generic;
if (hX_5.ERR_empty!=undefined) hX_5.L[l].ERR_empty=hX_5.ERR_empty;
if (hX_5.ERR_minimum!=undefined) hX_5.L[l].ERR_minimum=hX_5.ERR_minimum;
if (hX_5.ERR_maximum!=undefined) hX_5.L[l].ERR_maximum=hX_5.ERR_maximum;
if (hX_5.ERR_required!=undefined) hX_5.L[l].ERR_required=hX_5.ERR_required;
if (hX_5.ERR_constraint!=undefined) hX_5.L[l].ERR_constraint=hX_5.ERR_constraint;
if (hX_5.ERR_number_fail!=undefined) hX_5.L[l].ERR_number_fail=hX_5.ERR_number_fail;
if (hX_5.ERR_number_char!=undefined) hX_5.L[l].ERR_number_char=hX_5.ERR_number_char;
if (hX_5.STRA_DATE_MONTHS!=undefined) hX_5.L[l].STRA_DATE_MONTHS=hX_5.STRA_DATE_MONTHS;
if (hX_5.STRA_DATE_SHMONTHS!=undefined) hX_5.L[l].STRA_DATE_SHMONTHS=hX_5.STRA_DATE_SHMONTHS;
if (hX_5.STRA_DATE_DAYS!=undefined) hX_5.L[l].STRA_DATE_DAYS=hX_5.STRA_DATE_DAYS;
if (hX_5.STRA_DATE_SHDAYS!=undefined) hX_5.L[l].STRA_DATE_SHDAYS=hX_5.STRA_DATE_SHDAYS;
if (hX_5.STRA_DATE_SHSHDAYS!=undefined) hX_5.L[l].STRA_DATE_SHSHDAYS=hX_5.STRA_DATE_SHSHDAYS;
if (hX_5.STRA_DATE_EPOCHS!=undefined) hX_5.L[l].STRA_DATE_EPOCHS=hX_5.STRA_DATE_EPOCHS;
if (hX_5.STR_AM_SUFFIX!=undefined) hX_5.L[l].STR_AM_SUFFIX=hX_5.STR_AM_SUFFIX;
if (hX_5.STR_PM_SUFFIX!=undefined) hX_5.L[l].STR_PM_SUFFIX=hX_5.STR_PM_SUFFIX;
}
}
}
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<b.length; i++) {
arg=new this.JSFargument(b[i]);
if (arg.attribute.length >= 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; i<r.length; i++) r1=r1+((i>0)?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) {
var varobj, f="function", s;
if (evt.dummyEvent) {
newEvt=new Object();
for (varobj in evt) {
newEvt[varobj]=evt[varobj];
}
} else {
if (document.createEventObject!=undefined)
newEvt=document.createEventObject(evt);
else {
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) {
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!=null) try {
if (hX_5.i.deferSetFocus.focus && hX_5.i.isFocusable(hX_5.i.deferSetFocus)) {
hX_5.i.deferSetFocus.focus();
if (hX_5.i.deferSetSelect && hX_5.i.deferSetFocus.select!=undefined) hX_5.i.deferSetFocus.select();
} else {
hX_5.pendingFocusReturn=hX_5.pendingBlurRefocus=null;
}
}
catch(e) {
hX_5.pendingFocusReturn=hX_5.pendingBlurRefocus=null;
}
}
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, permanent) {
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, null, permanent);
return t;
}
HxG_5.prototype.HxCompImpMgr.prototype.startTimerInterval=function(id, item, action, period, permanent) {
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, null, permanent);
return t;
}
HxG_5.prototype.HxCompImpMgr.prototype.startObjTimerTimed=function(obj, param, period, permanent) {
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, permanent);
return t;
}
HxG_5.prototype.HxCompImpMgr.prototype.startDspTimerTimed=function(strBack, period, arg0, permanent) {
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, null, permanent);
return t;
}
HxG_5.prototype.HxCompImpMgr.prototype.killAllTimers=function(force) {
var i, timerid, perm, iS="i", l=hX_5.Timers.length;
for (i=0; i<l; i++) {
timerid=hX_5.Timers[i][0];
perm =hX_5.Timers[i][4];
if (timerid != 0 && (force!=null || !perm)) {
if (hX_5.Timers[i][1]==iS) window.clearInterval(timerid);
else window.clearTimeout(timerid);
hX_5.Timers[i][0]=0;
}
}
}
HxG_5.prototype.HxCompImpMgr.prototype.killTimerTimed=function(timerid) {
if (timerid != null && timerid != 0) {
window.clearTimeout(timerid);
this.tKillTimer(timerid,"t");
}
}
HxG_5.prototype.HxCompImpMgr.prototype.killTimerInterval=function(timerid) {
if (timerid != null && timerid != 0) {
window.clearInterval(timerid);
this.tKillTimer(timerid,"i");
}
}
HxG_5.prototype.HxCompImpMgr.prototype.tKillTimer=function(timerid, typ) {
var i, l=hX_5.Timers.length;
for (i=0; i<l; i++) {
if ((timerid==hX_5.Timers[i][0]) && (typ==hX_5.Timers[i][1])) {
hX_5.Timers[i][0]=0;
break;
}
}
}
HxG_5.prototype.HxCompImpMgr.prototype.timerUnqToId=function(unq) {
var i, l=hX_5.Timers.length;
for (i=0; i<l; i++) {
if (hX_5.Timers[i][0]!=0 && hX_5.Timers[i][2]==unq) {
return(hX_5.Timers[i][0]);
}
}
return null;
}
HxG_5.prototype.HxCompImpMgr.prototype.qKillTimer=function(unq) {
if (unq==null) return;
var i, l=hX_5.Timers.length;
for (i=0; i<l; i++) {
if (unq==hX_5.Timers[i][2]) {
hX_5.Timers[i][0]=0;
break;
}
}
}
HxG_5.prototype.HxCompImpMgr.prototype.addTimer=function(timerid, type, objUnq, obj, permanent) {
var i, added=false, perm=((permanent!=null&&permanent)?true:false), l=hX_5.Timers.length, e=[timerid, type, objUnq, obj, perm];
for (i=0; i<l; i++) {
if (hX_5.Timers[i][0] == 0) {
hX_5.Timers[i]=e;
added=true;
break;
}
}
if (!added) hX_5.Timers[l]=e;
}
HxG_5.prototype.HxCompImpMgr.prototype.dispatchOTimer=function(unq, param) {
if ((typeof hX_5)!="undefined" && unq!=null) {
var t=null, i, l=hX_5.Timers.length;
for (i=0; i<l; i++) {
if (unq==hX_5.Timers[i][2]) {
t=hX_5.Timers[i][3];
break;
}
}
hX_5.i.qKillTimer(unq);
if (t && t.dispatchTimer) t.dispatchTimer(param);
}
return false;
}
HxG_5.prototype.HxCompImpMgr.prototype.dispatchTimer=function(unq, id, item, action) {
if ((typeof hX_5)!="undefined" && id) {
hX_5.i.qKillTimer(unq);
var elem=hX_5.getComponentById(id);
if (elem) {
elem.dispatchTimer(item, action);
return true;
}
}
return false;
}
HxG_5.prototype.HxCompImpMgr.prototype.dispatchITimer=function(unq, id, item, action) {
if ((typeof hX_5)!="undefined" && id) {
var elem=hX_5.getComponentById(id);
if (elem) {
elem.dispatchTimer(item, action);
return true;
}
}
return false;
}
HxG_5.prototype.HxCompImpMgr.prototype.dispatchTimerBehavior=function(unq, src, item, action, bname, ename) {
if ((typeof hX_5)!="undefined" && src) {
hX_5.i.qKillTimer(unq);
var aa=(bname==hX_5.BHR_assist), obj=hX_5.getBehaviorById(src,bname,((aa)?hX_5._onIN:ename));
if (obj != null) {
if (aa) {
if (obj.state && obj.state.dispatchTimer) return obj.state.dispatchTimer(item, action);
} else {
if (obj.dispatchTimer) return obj.dispatchTimer(item, action);
}
}
}
return false;
}
HxG_5.prototype.HxCompImpMgr.prototype.dlgEntry=function (dlg,isModal) {
this.dlg=dlg;
this.isModal=(isModal!=null)?isModal:false;
this.saveDisableSelects=null;
this.keyboard=null;
this.keyboard2=null;
this.mouse=null;
this.iframe=null;
this.resize=null;
}
HxG_5.prototype.HxCompImpMgr.prototype.dialogIframeStack=null;
HxG_5.prototype.HxCompImpMgr.prototype.pushOnDialogStack=function (dlg, isModal) {
var b, obj, e=new hX_5.i.dlgEntry(dlg, isModal), newLength=hX_5.DialogStack.push(e), z=(newLength*3)+hX_5.BIG_ZINDEX;
hX_5.g.setP(dlg.DOMobj, hX_5._POS, hX_5._ABS);
hX_5.g.setP(dlg.DOMobj, hX_5._ZND, z+hX_5._E);
if (isModal) {
var i, a, d, o, firstModal=true, lastModal=null;
for (i=0; firstModal && i<hX_5.DialogStack.length-1; i++) if (hX_5.DialogStack[i]!=null && hX_5.DialogStack[i].isModal) firstModal=false;
for (i=hX_5.DialogStack.length-2; lastModal==null && 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;
o.style.padding=hX_5._ZPX;
o.style.margin=hX_5._ZPX;
o.style.fontSize=hX_5._1PX;
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(),hX_5.g.getPageWidth()) + hX_5._PX);
hX_5.g.setP(o, hX_5._HT, Math.max(hX_5.g.getWindowClientHeight(),hX_5.g.getPageHeight()) + hX_5._PX);
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 && i<hX_5.DialogStack.length-1; i++) if (hX_5.DialogStack[i]!=null && hX_5.DialogStack[i].isModal) firstModal=false;
if (hX_5.brw.isIE()) {
if (firstModal) e.keyboard=hX_5.attachEvent(document.body, "onbeforeactivate", hX_5._lF, hX_5.dispatchDlgSkip);
} else {
if (hX_5.tabNav == null) hX_5.tabNav=new hX_5.tabNavigator();
obj=hX_5.tabNav.getLast(dlg.DOMobj);
e.keyboard=hX_5.attachEvent(obj, hX_5._onKD, hX_5._lF, hX_5.dispatchDlgSkip, null, null, true);
obj=hX_5.tabNav.getFirst(dlg.DOMobj);
e.keyboard2=hX_5.attachEvent(obj, hX_5._onKD, hX_5._lF, hX_5.dispatchDlgSkip, null, null, true);
e.mouse=hX_5.attachEvent(o, hX_5._onMD, hX_5._lF, hX_5.dispatchDlgSkip, null, null, true);
}
if (hX_5.brw.isIE()) {
if (lastModal!=null) {
a=lastModal.saveDisabledSelects;
for (i=0; i < a.length; i++) a[i].disabled=false;
}
if (e.saveDisabledSelects) delete (e.saveDisabledSelects);
e.saveDisabledSelects=[];
if (hX_5.tabNav == null) hX_5.tabNav=new hX_5.tabNavigator();
a=hX_5.tabNav.getTabItems();
for (i=0; i<a.length; i++) {
if (a[i]!=null && a[i].obj.tagName==hX_5._SEL && !a[i].obj.disabled && !hX_5.isChildTag(a[i].obj, e.dlg.DOMobj)) {
e.saveDisabledSelects.push(a[i].obj);
a[i].obj.disabled=true;
}
}
}
}
return (z);
}
HxG_5.prototype.HxCompImpMgr.prototype.removeFromDialogStack=function (dlg) {
var i, e, obj, lastModal=null, l=hX_5.DialogStack.length, z=(parseInt(hX_5.g.getP(dlg.DOMobj.id, hX_5._ZND),10)-hX_5.BIG_ZINDEX)/3;
if (l==z)
e=hX_5.DialogStack.pop();
else {
i=z-1;
e=hX_5.DialogStack[i];
hX_5.DialogStack[i]=null;
}
hX_5.g.setP(e.dlg.DOMobj, hX_5._ZND, -1);
if (e.iframe) {
document.body.appendChild(e.iframe);
e.iframe.style.display=hX_5._NO;
e.iframe.style.width=hX_5._ZPX;
e.iframe.style.height=hX_5._ZPX;
e.iframe.style.zIndex=-1;
}
while (hX_5.DialogStack.length>0 && 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; i<e.saveDisabledSelects.length; i++) e.saveDisabledSelects[i].disabled=false;
if (e.saveDisabledSelects!=null) delete (e.saveDisabledSelects);
if (lastModal!=null) {
if (hX_5.brw.isIE() && lastModal.saveDisabledSelects!=null && lastModal.saveDisabledSelects.length>0)
for (i=0; i<lastModal.saveDisabledSelects.length; i++) lastModal.saveDisabledSelects[i].disabled=true;
}
if (hX_5.brw.isIE()) {
if (lastModal==null && e.keyboard) hX_5.removeEvent(document.body, "onbeforeactivate", e.keyboard);
if (lastModal==null && e.resize) hX_5.removeEvent(document.body, hX_5._onR, e.resize);
} else {
if (hX_5.tabNav == null) hX_5.tabNav=new hX_5.tabNavigator();
obj=hX_5.tabNav.getLast(e.dlg.DOMobj);
hX_5.removeEvent(obj, hX_5._onKD, e.keyboard);
obj=hX_5.tabNav.getFirst(e.dlg.DOMobj);
hX_5.removeEvent(obj, hX_5._onKD, e.keyboard2);
hX_5.removeAllEvents(e.iframe, e.iframe.id);
if (lastModal==null && e.resize) hX_5.removeEvent(document.body, hX_5._onR, e.resize);
}
}
if (e) delete e;
return ((lastModal!=null)?lastModal.dlg:null);
}
HxG_5.prototype.dispatchDlgSkip=function(evt) {
evt=(evt) ? evt : ((event) ? event: null);
var d, tgt=hX_5.evtGetTarget(evt), r=true, obj=null, d=hX_5.DialogStack.length-1;
while (d>=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<hX_5.popEvents.length; j++) {
if (hX_5.brw.isIE()) {
if (noMouseCapture)
this.popObj.setAttribute(hX_5.popEvents[j], hX_5.popMgr.dispatchPopEvent);
else
 this.popObj.setAttribute(hX_5.popEvents[j], hX_5.popMgr.dispatchPopEvent);
} else
 this.popObj.addEventListener(hX_5.popEvents[j], hX_5.popMgr.dispatchPopEvent, true);
}
if (hX_5.brw.isIE()) {
if (noMouseCapture) {
hX_5.swapPopEvent(true, null, hX_5.popEvents, true);
this.popswap=true;
} else {
this.popObj.setCapture(false);
this.popcap=true;
}
} else {
hX_5.swapPopEvent(true, null, hX_5.popEvents);
this.popswap=true;
}
return true;
}
return false;
}
HxG_5.prototype.HxPopMgr.prototype.resetSize=function() {
this.rect.height=hX_5.g.getRendHeight(this.popObj);
this.rect.width=hX_5.g.getRendWidth(this.popObj);
}
HxG_5.prototype.HxPopMgr.prototype.endTimed=function (fast) {
if (hX_5.popMgr && hX_5.popMgr.ownObj)
hX_5.popMgr.timerid=hX_5.i.startDspTimerTimed("hX_5.popMgr.dispatchTimer", (fast)?100:(hX_5.brw.isIE()?500:400));
}
HxG_5.prototype.HxPopMgr.prototype.end=function () {
if (this.timerid != 0) hX_5.i.killTimerTimed (this.timerid);
if (this.popcap) this.popObj.releaseCapture();
if (this.popswap) hX_5.swapPopEvent(false, null, hX_5.popEvents);
this.popObj=this.ownObj=null;
this.popswap=this.popcap=false;
this.timerid=0;
}
HxG_5.prototype.HxPopMgr.prototype.dispatchTimer=function (unq) {
if ((typeof hX_5)=="undefined") return;
hX_5.i.qKillTimer(unq);
if (hX_5.popMgr && hX_5.popMgr.ownObj && hX_5.popMgr.ownObj.uirelease) hX_5.popMgr.ownObj.uirelease(true);
}
HxG_5.prototype.HxPopMgr.prototype.dispatchPopEvent=function(evt) {
var r=true;
if ((typeof hX_5)=="undefined" || !hX_5.popMgr || !hX_5.popMgr.ownObj) return r;
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;
var d=hX_5.popMgr, o=d.ownObj, pt=hX_5.g.toPoint(evt), isInPopup=(d.rect && d.rect.hitTest(pt));
if ((evt.type==hX_5._evMD || evt.type==hX_5._evKD) && d.timerid != 0) {
hX_5.i.killTimerTimed (d.timerid);
d.timerid=0;
}
if ((evt.type==hX_5._evKD && evt.keyCode == hX_5.KEY_ESC) || ((evt.type==hX_5._evMD || evt.type==hX_5._evMU) && !isInPopup)) {
if (!(evt.type==hX_5._evMU && !d.buttondown) && !(evt.type==hX_5._evKD && evt.keyCode == hX_5.KEY_ESC && d.overrideESC)) {
if (o.dispatchCancel) o.dispatchCancel(evt);
if (o.uirelease) o.uirelease(true);
r=false;
}
} else {
if (evt.type==hX_5._evMD || evt.type==hX_5._evKD) d.buttondown=true;
if (o.dispatchPopEvent && (evt.type != hX_5._evMM || isInPopup)) r=o.dispatchPopEvent(evt, src, pt);
}
}
}
if (!r)	hX_5.i.cancelAction(evt, true);
return r;
}
HxG_5.prototype.mouserMouseEvents=null;
HxG_5.prototype.HxMouseMgr=function (thisparent) {
this.p=thisparent;
this.root=this.basespot=this.baserect=this.savehotrect=this.basehotrect=null;
if (this.hotspots) delete (this.hotspots);
this.hotspots=[];
this.popswap=false;
this.timerid=0;
this.maxDelay=750;
}
HxG_5.prototype.HxMouseMgr.prototype.setBaseSpot=function (root, iLocation, longDelay) {
this.root=root;
var location=(iLocation) ? iLocation : root.DOMobj;
this.basespot=root.DOMobj;
if (this.baserect == null) this.baserect=new hX_5.HxRect(root.DOMobj);
else this.baserect.setRect(root.DOMobj);
if (this.basehotrect == null) this.basehotrect=new hX_5.HxRect(location);
else this.basehotrect.setRect(location);
if (this.savehotrect == null) this.savehotrect=new hX_5.HxRect(location);
else this.savehotrect.setRect(location);
this.maxDelay=(longDelay != null && longDelay) ? 5750:500;
if (this.timerid != 0) {
hX_5.i.killTimerTimed (this.timerid);
this.timerid=0;
}
}
HxG_5.prototype.HxMouseMgr.prototype.addHotSpot=function (obj) {
function sub (obj) {
this.obj=obj;
this.id=obj.id;
this.rect=new hX_5.HxRect(obj);
}
if (this.timerid != 0) {
hX_5.i.killTimerTimed (this.timerid);
this.timerid=0;
}
for (var i=0; i < this.hotspots.length; i++) {
if (this.hotspots[i].id == obj.id) return;
}
this.hotspots.push(new sub(obj));
if (this.hotspots.length == 1) this.tidyBaseRect();
this.trackMouse();
}
HxG_5.prototype.HxMouseMgr.prototype.removeHotSpot=function (obj) {
for (var i=0; i < this.hotspots.length; i++) {
if (this.hotspots[i].id  == obj.id) {
this.hotspots.splice(i,1);
break;
}
}
if (this.hotspots.length <= 0) this.killMouse();
}
HxG_5.prototype.HxMouseMgr.prototype.tidyBaseRect=function (obj) {
if (this.hotspots[0]) {
var r=this.hotspots[0].rect;
this.basehotrect.setRectR(this.savehotrect);
var b=this.basehotrect;
if (r.X > 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<hX_5.mouser.hotspots.length); i++) {
if (hX_5.mouser.hotspots[i]) isInPopup=hX_5.mouser.hotspots[i].rect.hitTest(point);
}
}
if (isInPopup) {
if (hX_5.mouser.timerid != 0) {
hX_5.i.killTimerTimed (hX_5.mouser.timerid);
hX_5.mouser.timerid=0;
}
if (src && src.tagName == hX_5._BBODY && hX_5.brw.isIE()) src=document.elementFromPoint(point.X, point.Y);
if (hX_5.mouser.root && hX_5.mouser.root.dispatchPopEvent) {
r=hX_5.mouser.root.dispatchPopEvent(src, evt, isBase);
}
} else {
if (evt.type!=hX_5._evMM) hX_5.mouser.root.dispatchTimer("popup", "MouseOut");
else if (hX_5.mouser.root.dispatchTimer) {
if (hX_5.mouser.baserect.hitTest(point)) hX_5.mouser.root.dispatchTimer("popup", "MouseOut");
else if (hX_5.mouser.timerid <= 0) hX_5.mouser.timerid=hX_5.i.startTimerTimed (hX_5.mouser.root.id, "popup", "MouseOut", hX_5.mouser.maxDelay);
}
}
}
}
}
if (r==false) hX_5.i.cancelAction(evt, true);
return r;
}
HxG_5.prototype.lookupEvent=function (kind, id, name) {
var j,l1,eObj=(id!=null && this.isString(id) && this.userEvents[id]!=undefined)?this.userEvents[id]:null;
if (eObj!=null) {
l1=eObj.events.length;
for (j=0; j<l1; j++) {
if (eObj.events[j].etype==kind && eObj.events[j].eventname==name) {
return (eObj.events[j]);
}
}
}
return null;
}
HxG_5.prototype.addNewEvent=function (id, obj, eventname, kind, handler1, args, MozDown) {
var uObj, eObj=(this.userEvents[id]!=undefined)?this.userEvents[id]:null;
if (eObj==null) {
eObj=new hX_5.JSFEventObject(id);
this.userEvents[id]=eObj;
}
uObj=new hX_5.JSFEvent(obj, eventname, kind, handler1, args, MozDown);
eObj.events.push(uObj);
return uObj;
}
HxG_5.prototype.removeAllEvents=function (obj, id) {
var evtObj, eObj=(this.userEvents[id]!=undefined)?this.userEvents[id]:null;
if (eObj!=null) {
while (eObj.events.length > 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);
if (f==null) f=document.body.getAttribute[eventname];
this.id=hX_5._BODY;
} else {
f=obj.getAttribute(eventname);
if (f==null) f=obj[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);
if (this.regexp[name].compile)
this.regexp[name].compile(x);
}
catch (e) {
var estr=(e==null)?"null":((e.message == undefined) ? e : e.message);
window.status="Internal error: Cannot consruct constraint: " + estr;
}
}
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);
if (this.regexp[name].compile)
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;
this.whileMOTrapOn=null;
this.whileMOTrapper=whileMOTrapper;
this.whileBTrapOn=null;
this.whileBTrapper=whileBTrapper;
function pauseActions() {
var i, empty=null, p;
p=new this.pauseBlock();
for (i=0; empty==null && i<this.pActions.length; i++) if (this.pActions[i]==null) empty=i;
if (empty==null)
this.pActions.push(p);
else
 this.pActions[empty]=p;
return p.id;
}
function unPauseActions(ID) {
var i, obj=null;
for (i=0; obj==null && i<this.pActions.length; i++) if (this.pActions[i]!=null && this.pActions[i].id==ID) obj=i;
if (obj!=null) {
delete this.pActions[obj];
this.pActions[obj]=null;
while (this.pActions.length > 0 && this.pActions[this.pActions.length-1]==null) this.pActions.pop();
}
}
function isPaused(ID) {
for (var i=0; i<this.pActions.length; i++) {
if (this.pActions[i]!=null && this.pActions[i].id==ID) return this.pActions[i];
}
return null;
}
function pauseBlock() {
this.id=hX_5.action.pRunningCount;
this.retryCount=0;
this.defer=defer;
function defer (timeout, obj, evt, fcn, action, globalAction, target, cssStyle, cancelBubble, retainFocus, isError,
error, label, cssLabelStyle, popLabels, infoSpan, infoShow, errorSpan, errorShow, k) {
this.retryCount=0;
var i, empty=null;
var p=new hX_5.action.pauseStateBlock(this.id, obj, evt, fcn, action, globalAction, target, cssStyle, cancelBubble, retainFocus, isError,
error, label, cssLabelStyle, popLabels, infoSpan, infoShow, errorSpan, errorShow, k);
for (i=0; empty==null && i<hX_5.action.pBlocks.length; i++) if (hX_5.action.pBlocks[i]==null) empty=i;
if (empty==null)
hX_5.action.pBlocks.push(p);
else
 hX_5.action.pBlocks[empty]=p;
hX_5.i.startDspTimerTimed("hX_5.action.doContinueActions", timeout, (this.id+hX_5._E), true);
}
return;
}
function pauseStateBlock (id, obj, evt, fcn, action, globalAction, target, cssStyle, cancelBubble, retainFocus, isError,
error, label, cssLabelStyle, popLabels, infoSpan, infoShow, errorSpan, errorShow, k) {
this.id=id;
this.obj=obj;
this.evt=new dummyEvent(evt.type, evt.target, evt);
this.fcn=fcn;
var i, str;
this.action=[];
for (i=0; i<action.length; i++) {
str=action[i];
this.action.push(str);
}
this.target=[];
for (i=0; i<target.length; i++) {
str=target[i];
this.target.push(str);
}
this.globalAction=globalAction;
this.cssStyle=cssStyle;
this.cancelBubble=cancelBubble;
this.retainFocus=retainFocus;
this.isError=isError;
this.error=error;
this.label=label;
this.cssLabelStyle=cssLabelStyle;
this.popLabels=popLabels;
this.infoSpan=infoSpan;
this.infoShow=infoShow;
this.errorSpan=errorSpan;
this.errorShow=errorShow;
this.actionK=k;
this.blockCancelled=false;
}
function doContinueActions (unq, ID) {
if ((typeof hX_5)=="undefined") return;
hX_5.i.qKillTimer(unq);
var i, p=hX_5.action.isPaused(ID);
if (p!=null) {
p.retryCount++;
if (p.retryCount <= 25 && !p.blockCancelled) {
hX_5.i.startDspTimerTimed("hX_5.action.doContinueActions", 100+((p.retryCount-1)*200), (p.id+hX_5._E), true);
} else {
if (p.blockCancelled) {
if (hX_5.action.whileMOTrapOn!=null) hX_5.removeEvent(document.body, hX_5._onMO, hX_5.action.whileMOTrapOn);
if (hX_5.action.whileBTrapOn!=null) hX_5.removeEvent(document.body, hX_5._onB, hX_5.action.whileBTrapOn);
hX_5.action.whileBTrapOn=hX_5.action.whileMOTrapOn=null;
}
p=null;
for (i=0; p==null && i<hX_5.action.pActions.length; i++) if (hX_5.action.pActions[i]!=null && hX_5.action.pActions[i].id==ID) p=i;
if (p!=null) {
delete hX_5.action.pActions[p];
hX_5.action.pActions[p]=null;
while (hX_5.action.pActions.length > 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<hX_5.action.pBlocks.length; i++) if (hX_5.action.pBlocks[i]!=null && hX_5.action.pBlocks[i].id==ID) p=i;
if (p!=null) {
delete hX_5.action.pBlocks[p];
hX_5.action.pBlocks[p]=null;
while (hX_5.action.pBlocks.length > 0 && hX_5.action.pBlocks[hX_5.action.pBlocks.length-1]==null) hX_5.action.pBlocks.pop();
}
}
} else {
for (i=0; p==null && i<hX_5.action.pBlocks.length; i++) if (hX_5.action.pBlocks[i]!=null && hX_5.action.pBlocks[i].id==ID) p=i;
if (p!=null) {
i=p;
p=hX_5.action.pBlocks[i];
if (p.blockCancelled) {
if (hX_5.action.whileMOTrapOn!=null) hX_5.removeEvent(document.body, hX_5._onMO, hX_5.action.whileMOTrapOn);
if (hX_5.action.whileBTrapOn!=null) hX_5.removeEvent(document.body, hX_5._onB, hX_5.action.whileBTrapOn);
hX_5.action.whileBTrapOn=hX_5.action.whileMOTrapOn=null;
} else {
if (p.evt.dummyEvent) rebuildDummyEvent (p.evt);
var r=hX_5.action.processActionEx(
p.obj, p.evt, p.fcn, p.action, p.globalAction, p.target, p.cssStyle, p.cancelBubble, p.retainFocus, p.isError,
p.error, p.label, p.cssLabelStyle, p.popLabels, p.infoSpan, p.infoShow, p.errorSpan, p.errorShow, p.actionK);
}
delete hX_5.action.pBlocks[i];
hX_5.action.pBlocks[i]=null;
while (hX_5.action.pBlocks.length > 0 && hX_5.action.pBlocks[hX_5.action.pBlocks.length-1]==null) hX_5.action.pBlocks.pop();
}
}
return false;
}
function whileMOTrapper(evt) {
if (hX_5.action.pBlocks && hX_5.action.pBlocks.length>0) {
evt=(evt) ? evt : ((event) ? event: null);
var i, t=hX_5.evtGetTarget(evt);
for (i=0; i< hX_5.action.pBlocks.length; i++) {
if (hX_5.action.pBlocks[i]!=null && hX_5.action.pBlocks[i].evt!=null &&
hX_5.action.pBlocks[i].evt.type==hX_5._evMV && hX_5.isChildTag(t,hX_5.action.pBlocks[i].obj)) {
hX_5.action.pBlocks[i].blockCancelled=true;
}
}
}
}
function whileBTrapper(evt) {
if (hX_5.action.pBlocks && hX_5.action.pBlocks.length>0) {
evt=(evt) ? evt : ((event) ? event: null);
var i, t=hX_5.evtGetTarget(evt);
for (i=0; i< hX_5.action.pBlocks.length; i++) {
if (hX_5.action.pBlocks[i] && hX_5.action.pBlocks[i].evt &&
hX_5.action.pBlocks[i].evt.type==hX_5._evF && hX_5.isChildTag(t,hX_5.action.pBlocks[i].obj)) {
hX_5.action.pBlocks[i].blockCancelled=true;
}
}
}
}
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; i<hX_5.action.sBlocks.length; i++) {
blk=hX_5.action.sBlocks[i];
if (blk!=null && blk[0]==tid) {
r=hX_5.action.doHideShow(blk[1], blk[2], blk[3], true);
delete hX_5.action.sBlocks[i];
hX_5.action.sBlocks[i]=null;
break;
}
}
while (hX_5.action.sBlocks.length>0 && 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);
var e, tp, p, a=hX_5.getComponentsInId(t);
for (i=0; a!=null && i<a.length; i++) {
s=hX_5.getComponentById(a[i]);
if (s) {
if (s.redraw) s.redraw();
if (!once) {
if ((doload==1 || doload==3) && s.onLoad!=undefined) s.onLoad(s.DOMobj, evt);
if ((doload==2 || doload==4) && s.unLoad!=undefined) s.unLoad(s.DOMobj, evt);
once=true;
}
}
}
if (a!=null) delete a;
if (hX_5.isDef(typeof(ODCRegistry)) && ODCRegistry!=null && ODCRegistry.Elements) {
for (var e in ODCRegistry.Elements) {
if (ODCRegistry.Elements[e] && ODCRegistry.Elements[e].JSObject && ODCRegistry.Elements[e].JSObject.type && ODCRegistry.Elements[e].JSObject.type.toLowerCase()=="tabpanel") {
tp=ODCRegistry.Elements[e].JSObject;
p=(tp.getDOMobj)?tp.getDOMobj():null;
while (p!=null && p!=t) p=p.parentNode;
if (p==t && tp.redraw)tp.redraw();
}
}
}
}
}
return r;
}
function doClear (obj) {
if (obj && obj.tagName && obj.value && obj.value.length > 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<obj.value.length) {
if (hX_5.brw.isIE()) hX_5.skipVCMonitor=true;
obj.value=obj.value.substr(0,p);
}
}
}
function dummyEvent (typ, tgt, evt, noclear) {
not=(noclear!=null && noclear==true);
this.dummyEvent=true;
this.type=typ;
this.target=tgt;
if (evt.errorMsg) this.errorMsg=evt.errorMsg;
if (evt.pageX!=undefined) {
this.pageX=evt.pageX;
this.pageY=evt.pageY;
}
if (evt.clientX!=undefined) {
this.clientX=evt.clientX;
this.clientY=evt.clientY;
}
if (evt.screenX!=undefined) {
this.screenX=evt.screenX;
this.screenY=evt.screenY;
}
if (evt.altKey!=undefined) this.altKey=evt.altKey;
if (evt.shiftKey!=undefined) this.shiftKey=evt.shiftKey;
if (evt.button!=undefined) this.button=evt.button;
if (evt.keyCode!=undefined) this.keyCode=evt.keyCode;
if (evt.fromElement!=undefined) {
if (evt.fromElement.id) this.fromElementId=evt.fromElement.id;
if (!not) this.fromElement=null;
}
if (evt.srcElement!=undefined) {
if (evt.srcElement.id) this.srcElementId=evt.srcElement.id;
if (!not) this.srcElement=null;
}
if (evt.toElement!=undefined) {
if (evt.toElement.id) this.toElementId=evt.toElement.id;
if (!not) this.fromElement=null;
}
if (evt.target!=undefined) {
if (evt.target.id) this.targetId=evt.target.id;
if (!not) this.target=null;
}
if (evt.currentTarget!=undefined) {
if (evt.currentTarget.id) this.currentTargetId=evt.currentTarget.id;
if (!not) this.currentTarget=null;
}
if (evt.originalTarget!=undefined) {
if (evt.originalTarget.id) this.originalTargetId=evt.originalTarget.id;
if (!not) this.originalTarget=null;
}
if (evt.relatedTarget!=undefined) {
if (evt.relatedTarget.id) this.relatedTargetId=evt.relatedTarget.id;
if (!not) this.relatedTarget=null;
}
}
function rebuildDummyEvent (evt) {
if (evt.fromElementId!=undefined) {
evt.fromElement=hX_5.getElemntById(evt.fromElementId);
}
if (evt.srcElementId!=undefined) {
evt.srcElement=hX_5.getElementById(evt.srcElementId);
}
if (evt.toElementId!=undefined) {
evt.toElement=hX_5.getElementById(evt.toElementId);
}
if (evt.targetId!=undefined) {
evt.target=hX_5.getElementById(evt.targetId);
}
if (evt.currentTargetId!=undefined) {
evt.currentTarget=hX_5.getElementById(evt.currentTargetId);
}
if (evt.originalTargetId!=undefined) {
evt.originalTarget=hX_5.getElementById(evt.originalTargetId);
}
if (evt.relatedTargetId!=undefined) {
evt.relatedTarget=hX_5.getElementById(evt.relatedTargetId);
}
}
function doAction (srcobj, action, globalAction, target, evt, hasSubmit, hasStop) {
var r=true, doload=0, redraw=false, redrawHS=false, a, b, s=null, i, t=target, domMaxLen, a=(action)?action.toUpperCase():null;
if (srcobj != null && t != null && a != null) {
hX_5.skipVCMonitor=false;
switch (a) {
case hX_5.ACT_NOTHING:
case hX_5.ACT_NONE:
case hX_5.ACT_STOP:
r=false;
break;
case hX_5.ACT_WHILEEVENT:
break;
case hX_5.ACT_GOTO:
if (t) window.location.href=t;
break;
case hX_5.ACT_ALERT:
if (t && t.toUpperCase()==hX_5.TGT_ATERROR) t=(evt.errorMsg)?evt.errorMsg:hX_5.TGT_ISERROR;
if (t) alert (t);
break;
case hX_5.ACT_CONFIRM:
if (t && t.toUpperCase()==hX_5.TGT_ATERROR) t=(evt.errorMsg)?evt.errorMsg:hX_5.TGT_ISERROR;
if (t) {
s=confirm(t);
r=(s)?true:false;
}
break;
case hX_5.ACT_LOCKED:
hX_5.applyNestedAttribute(t, hX_5._DSB, true, true);
redraw=true;
break;
case hX_5.ACT_UNLOCKED:
hX_5.applyNestedAttribute(t, hX_5._DSB, false, true);
redraw=true;
break;
case hX_5.ACT_INVERTLOCKED:
hX_5.applyNestedAttribute(t, hX_5._DSB, ((t.disabled)?false:true), true);
redraw=true;
break;
case hX_5.ACT_SHOW:
redrawHS=true;
doload=1;
break;
case hX_5.ACT_HIDE:
redrawHS=true;
doload=2;
break;
case hX_5.ACT_INVERTHIDE:
redrawHS=true;
doload=(hX_5.g.getP(t,hX_5._DSP)==hX_5._NO)?1:2;
break;
case hX_5.ACT_VISIBLE:
redrawHS=true;
doload=3;
break;
case hX_5.ACT_INVISIBLE:
redrawHS=true;
doload=4;
break;
case hX_5.ACT_INVERTVISIBLE:
redrawHS=true;
doload=(hX_5.g.getP(t,hX_5._VIS)==hX_5._HI)?3:4;
break;
case hX_5.ACT_NEXTTAB:
hX_5.gotoNextPrev (t, true);
break;
case hX_5.ACT_NEXTTABCLEAR:
if (evt) {
s=hX_5.evtGetTarget(evt);
doClear(s);
}
hX_5.gotoNextPrev (t, true);
break;
case hX_5.ACT_PREVTAB:
hX_5.gotoNextPrev (t, false);
break;
case hX_5.ACT_PREVTABCLEAR:
if (evt) {
s=hX_5.evtGetTarget(evt);
doClear(s);
}
hX_5.gotoNextPrev (t, false);
break;
case hX_5.ACT_CLICK:
doClick(t);
r=false;
break;
case hX_5.ACT_GET:
while (s==null && t!=null) {
b=hX_5.getBehaviorsById(t);
if (b && b.length > 0) for (i=0; i<b.length; i++) {
if (b[i].type==hX_5.BHR_ajaxgetexternal || b[i].type==hX_5.BHR_ajaxget || b[i].type==hX_5.BHR_ajaxsubmit) {
s=b[i];
break;
}
}
t=t.parentNode;
}
if (s && s.dispatchBehavior) s.dispatchBehavior(null, evt);
break;
case hX_5.ACT_SUBMIT:
var tagset=[];
tagset.push(new hX_5.tagListItem(hX_5._INP,hX_5._SBM));
tagset.push(new hX_5.tagListItem(hX_5._INP,hX_5._lIMG));
tagset.push(new hX_5.tagListItem(hX_5._BTN,hX_5._SBM));
if (hX_5.isTag(t, tagset))
doClick(t);
else {
var submit, form=(t.tagName==hX_5._FRM) ? t : t.form;
if (form) {
submit=hX_5.findFirstTag(form, tagset);
if (submit) doClick(submit);
}
}
return false;
break;
case hX_5.ACT_PADLEFT:
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.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) {
var se,tid,isDlg=false;
s=(t.id!=undefined)?hX_5.getComponentById(t.id):null;
if (s && s.type==hX_5.CMP_dialog && (doload==2 || doload==4) && hasSubmit!=null && hasStop!=null) {
isDlg=hasSubmit;
isDlg=(isDlg)?isDlg:((!hasStop && srcobj.tagName && srcobj.tagName==hX_5._INP && (srcobj.type.toLowerCase()==hX_5._SBM || srcobj.type.toLowerCase()==hX_5._RES || srcobj.type.toLowerCase()==hX_5._lIMG)));
isDlg=(isDlg)?isDlg:(srcobj.tagName && srcobj.tagName==hX_5._INP && srcobj.type.toLowerCase()==hX_5._RES);
if (isDlg) {
hX_5.pendingBlurRefocus=null;
hX_5.pendingFocusReturn=null;
}
}
if (s && globalAction && !isDlg && (s.onLoad || s.onPreLoad)) {
if (document.createEventObject!=undefined)
se=hX_5.i.duplicateEvent(evt);
else
 se=new dummyEvent(evt.type, evt.target, evt, true);
if (evt.submitFlag) se.submitFlag=evt.submitFlag;
tid=hX_5.i.startDspTimerTimed("hX_5.action.doHideShowCB", 1, null, true);
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<a.length; s++) {
s=hX_4.getComponentById(a[s]);
if (s) s.redraw();
}
}
if (!r) hX_5.i.cancelAction(evt, true);
return r;
}
function doClick (inObj, evttag) {
var o=hX_5.getElementById(inObj);
if (o.click && hX_5.brw.isIE())
return (o.click());
else {
var r=hX_5.i.fireEvent (o, hX_5._onMC, evttag);
if (r == null || r == true && (!hX_5.brw.isIE() && o.tagName && o.tagName==hX_5._ANC)) {
if (o.href) window.location.href=o.href;
}
return r;
}
}
function processAction (obj, evt, fcn, action, globalAction, target, cssStyle, cancelBubble, retainFocus, isError) {
return this.processActionEx (obj, evt, fcn, action, globalAction, target, cssStyle, cancelBubble, retainFocus, isError,
null, null, null, false, null, false, null, false, null);
}
function processActionEx (obj, evt, fcn, action, globalAction, target, cssStyle, cancelBubble, retainFocus, isError,
error, label, cssLabelStyle, popLabels, infoSpan, infoShow, errorSpan, errorShow, reEntry) {
if (reEntry==null) {
this.pRunningCount++;
if (this.pRunningCount > 10000) this.pRunningCount=1;
}
var id=this.pRunningCount;
var r=(reEntry!=null)?true:this.processFunction(obj,evt,fcn);
var k, u, t, a, initialr=r, pause=null, hasSubmit=false, hasStop=false, whileFound=null, whileTime=null, whileName=null;
if (r && action != null) {
for (k=((reEntry!=null)?reEntry:0); r && pause==null && k < action.length; k++) {
u=action[k].toUpperCase();
hasSubmit=(u==hX_5.ACT_SUBMIT || u==hX_5.ACT_CLICK || u==hX_5.ACT_DLG_OK || u==hX_5.ACT_DLG_CANCEL);
hasStop=(u==hX_5.ACT_NOTHING || u==hX_5.ACT_NONE || u==hX_5.ACT_STOP);
whileFound=(reEntry==null && u==hX_5.ACT_WHILEEVENT)?k:whileFound;
}
if (whileFound!=null) {
whileTime=(target[whileFound]!=null)?parseInt(target[whileFound],10):20;
if (evt!=null) whileName=(evt.type==hX_5._evMV)?hX_5._onMO:((evt.type==hX_5._evF)?hX_5._onB:null);
if (whileName==hX_5._onMO)
this.whileMOTrapOn=hX_5.attachEvent(obj, whileName, hX_5._lF, hX_5.action.whileMOTrapper);
if (whileName==hX_5._onB)
this.whileBTrapOn=hX_5.attachEvent(obj, whileName, hX_5._lF, hX_5.action.whileBTrapper);
var pauseFid=hX_5.action.pauseActions(), pauseF=this.isPaused(pauseFid);
pauseF.defer (whileTime, obj, evt, fcn, action, globalAction, target, cssStyle, cancelBubble, retainFocus, isError, error, label, cssLabelStyle, popLabels, infoSpan, infoShow, errorSpan, errorShow, 0);
hX_5.action.unPauseActions(pauseFid);
return false;
}
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, hasSubmit, hasStop);
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 (20, obj, evt, fcn, action, globalAction, target, cssStyle, cancelBubble, retainFocus, isError, error, label, cssLabelStyle, popLabels, infoSpan, infoShow, errorSpan, errorShow, k+1);
var isSbm, tagset=[];
tagset.push(new hX_5.tagListItem(hX_5._INP,hX_5._SBM));
tagset.push(new hX_5.tagListItem(hX_5._INP,hX_5._RES));
tagset.push(new hX_5.tagListItem(hX_5._INP,hX_5._lIMG));
tagset.push(new hX_5.tagListItem(hX_5._BTN,hX_5._SBM));
isSbm=hX_5.isTag(obj, tagset);
delete tagset;
if (isSbm || hasStop) r=false;
}
}
}
if (!pause) {
if (this.whileBTrapOn!=null || hX_5.action.whileMOTrapOn!=null) {
if (hX_5.action.whileMOTrapOn!=null) hX_5.removeEvent(document.body, hX_5._onMO, hX_5.action.whileMOTrapOn);
if (hX_5.action.whileBTrapOn!=null) hX_5.removeEvent(document.body, hX_5._onB, hX_5.action.whileBTrapOn);
hX_5.action.whileBTrapOn=hX_5.action.whileMOTrapOn=null;
}
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) {
if (evt.stopPropagation) evt.stopPropagation();
if (evt.preventDefault) 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);
o.src="javascript:'';";
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.open();
d.write("<body></body>");
d.close();
}
}
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<n; i++) s=s + ((pad) ? pad:hX_5._Z);
return s;
}
HxG_5.prototype.truncateRoundHalfEven=function (str, chars) {
var ostr=str, oflow=false;
if (ostr.length > 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.stripSuffix=function (s, ch1) {
if (null==s) return s;
var ch=((ch1==null)?hX_5._P:ch1), q=s.lastIndexOf(ch);
if (q<0) return s;
return (s.substr(0,q));
}
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; i<nv.length; i++) {
r=r+((!hasQ) ? hX_5._QM:hX_5._AMP);
r=r+this.encode(nv[i][0]);
r=r + ((nv[i][1])?(hX_5._EQ+this.encode(nv[i][1])):hX_5._E);
hasQ=true;
}
return r;
}
HxG_5.prototype.encode=function (s) {
return encodeURIComponent(s);
}
HxG_5.prototype.NLSFormatMsg=function (template, args) {
var i, r=hX_5._E, l1="{", l2="}";
if (template != null) {
r=template;
if (args != null) {
for (i=0; i < args.length; i++)  r=hX_5.replaceAll (r, l1 + i + l2, args[i]);
}
}
return r;
}
HxG_5.prototype.getParentOfType=function(obj,type) {
var p=obj.parentNode;
while (p!=null) {
if (p.tagName && p.tagName==type) return p;
p=p.parentNode;
}
return null;
}
HxG_5.prototype.getParentIdByType=function(id,type) {
var p=hX_5.getElementById(id);
p=hX_5.getParentOfType(p,type);
if (p==null) return null;
if (p.id==null || p.id=="") p.id=type + "_parentof_"+ id;
return p.id;
}
HxG_5.prototype.findNestedObject=function(obj, ichildtag) {
if(obj == null || obj.childNodes == null || obj.childNodes.length == 0)
return null;
var i, nested_child, children=obj.childNodes, childtag=ichildtag.toLowerCase();
for(i=0; i < children.length; i++) {
if(children[i].nodeName.toLowerCase() == childtag)
return children[i];
}
for(i=0; i < children.length; i++) {
nested_child=hX_5.findNestedObject(children[i], childtag);
if (nested_child != null) {
return nested_child;
}
}
return null;
}
HxG_5.prototype.applyNestedAttribute=function(root, attributeName, attributeValue, force) {
if (root.nodeType == hX_5.ELEMENT_NODE) {
if ((root.getAttribute(attributeName) != null) || force)
if (attributeName == hX_5._DSB) root.disabled=attributeValue;
else root.setAttribute(attributeName, attributeValue);
}
for (var child=root.firstChild; child != null; child=child.nextSibling)
this.applyNestedAttribute (child, attributeName, attributeValue, force);
}
HxG_5.prototype.applyNestedProperty=function(root, propertyName, propertyValue) {
if (root.nodeType == hX_5.ELEMENT_NODE)  hX_5.g.setP(root, propertyName, propertyValue);
for (var child=root.firstChild; child != null; child=child.nextSibling)
this.applyNestedProperty (child, propertyName, propertyValue);
}
HxG_5.prototype.getFirstChildInCell=function (cell) {
var r=(cell) ? cell.firstChild : null;
while (r && r.nodeType != hX_5.ELEMENT_NODE) r=r.nextSibling;
return r;
}
HxG_5.prototype.gotoNextPrev=function (t, forward, skipHelper) {
if (hX_5.tabNav == null) hX_5.tabNav=new hX_5.tabNavigator();
var o=hX_5.tabNav.getFocus(t, forward, skipHelper);
if (o) hX_5.i.setFocus(o, (o.tagName==hX_5._INP && o.type.toLowerCase()==hX_5._XT), true);
}
HxG_5.prototype.getTabElements=function () {
if (hX_5.tabNav == null) hX_5.tabNav=new hX_5.tabNavigator();
return hX_5.tabNav.getTabItems();
}
HxG_5.prototype.tabbableElements=null;
HxG_5.prototype.getTabbableElements=function () {
if (hX_5.tabbableElements == null)
hX_5.tabbableElements=[
new hX_5.tagListItem(hX_5._INP,null),
new hX_5.tagListItem(hX_5._SEL,null),
new hX_5.tagListItem(hX_5._TXT,null),
new hX_5.tagListItem(hX_5._BTN,null),
new hX_5.tagListItem(hX_5._ANC,null),
new hX_5.tagListItem(hX_5._EMB,null),
new hX_5.tagListItem(hX_5._OBJ,null),
new hX_5.tagListItem(hX_5._APP,null)];
return hX_5.tabbableElements;
}
HxG_5.prototype.isTabbable=function (node) {
if (hX_5.isTag(node, hX_5.getTabbableElements())) {
if (node.tagName==hX_5._INP) {
if (node.type.toLowerCase()==hX_5._HI) return false;
if (node.id && node.id.length>9 && 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; j<c.length; j++) {
node=c[j];
if (!submittable || !node.disabled) {
if (node.tagName==hX_5._TXT || node.tagName==hX_5._INP) {
lc=node.type.toLowerCase();
if (node.tagName==hX_5._TXT || lc==hX_5._XT || lc==hX_5._PWD || lc==hX_5._HI) {
r=node.value;
break;
} else if (lc==hX_5._CHK) {
if (r==null) {
r=((node.checked)?((node.value!=undefined && node.value.length>0)?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; j<c.length; j++) {
node=c[j];
if (node.tagName==hX_5._TXT || node.tagName==hX_5._INP) {
lc=node.type.toLowerCase();
if (node.tagName==hX_5._TXT || lc==hX_5._XT || lc==hX_5._PWD || lc==hX_5._HI) {
node.value=(v==null)?hX_5._E:v;
r=true;
} else if (lc==hX_5._CHK) {
node.checked=false;
if (v!=null) {
if (hX_5.isString(v)) {
node.checked=(v=="on" || (node.value!=undefined && node.value.length>0 && node.value==v));
} else {
if (node.value!=undefined && node.value.length>0) {
for (i=0; !node.checked && i<v.length; i++) if (node.value == v[i]) node.checked=true;
}
}
}
r=true;
} else if (lc==hX_5._RAD) {
node.checked=(node.value!=undefined && node.value==v);
r=true;
}
} else if (node.tagName==hX_5._OPT) {
node.selected=false;
if (v!=null) {
if (hX_5.isString(v)) {
node.selected=(node.value!=undefined &&  node.value==v);
} else {
if (node.value!=undefined && node.value.length>0) {
for (i=0; !node.selected && i<v.length; i++) if (node.value == v[i]) node.selected=true;
}
}
}
r=true;
}
}
}
return r;
}
HxG_5.prototype.tagListItem=function (tag, type) {
this.tag=tag.toLowerCase();
this.type=(type != null) ? type.toLowerCase() : null;
}
HxG_5.prototype.isTag=function (inobj, tagset) {
var i, hit=false, obj=hX_5.getElementById(inobj);
if (obj && obj.nodeType!=undefined && obj.nodeType == hX_5.ELEMENT_NODE) {
for (i=0; i < tagset.length && !hit; i++) {
if (tagset[i].tag == obj.tagName.toLowerCase()) {
if ((tagset[i].type == null) || (obj.getAttribute(hX_5._TYP).toLowerCase() == tagset[i].type))
hit=true;
}
}
}
return hit;
}
HxG_5.prototype.findFirstTag=function (inroot, tagset) {
var obj, root=hX_5.getElementById(inroot);
if (hX_5.isTag(root, tagset))
return root;
if (root && root.firstChild!=undefined) {
for (var child=root.firstChild; child != null; child=child.nextSibling) {
obj=this.findFirstTag (child, tagset);
if (obj != null)
return obj;
}
}
return null;
}
HxG_5.prototype.isChildTag=function (child, parent, parentname) {
var c=hX_5.getElementById(child), p=hX_5.getElementById(parent);
while (c!=null) {
if (c==p) return true;
if (parentname!=null && c.name!=undefined && c.name.indexOf(parentname)>=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) {
if (hX_5.CSSSelectors) delete (hX_5.CSSSelectors);
hX_5.CSSSelectors=[];
var i, l=document.styleSheets.length;
for (i=0; i < l; i++) hX_5.readSheet(document.styleSheets[i]);
}
var tname=hX_5._P+((hX_5.brw.isSafari())?testname.toLowerCase():testname);
if (hX_5.CSSSelectors[(tname)]!=null) return true;
return false;
}
HxG_5.prototype.readSheet=function (sheets) {
var rulelist, rule, selector, j, k, l;
if (sheets.imports!=null && sheets.imports.length) {
l=sheets.imports.length;
for (j=0; j<l; j++) {
try {
hX_5.readSheet(sheets.imports[j]);
} catch(e) {
}
}
}
rulelist=(sheets.cssRules!=undefined) ? sheets.cssRules : ((sheets.rules!=undefined) ? sheets.rules : null);
if (rulelist != null) {
l=rulelist.length
 for (j=0; j < l; j++) {
if (rulelist[j].styleSheet!=undefined) {
try {
hX_5.readSheet(rulelist[j].styleSheet);
} catch (e) {
}
} else {
if (rulelist[j].selectorText!=null) {
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;
}
}
}
}
}
}
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="</Script>", sty="style", obj=root, objStack=[root], inHead=((nohead!=null) && nohead);
try {
while (ch!=null && ch<l) {
chL=ch;
while (ch<l && s.charAt(ch)!=hX_5._LT) ch++;
if (ch!=chL) {
txt=s.substring(chL,ch);
if (txt.indexOf(hX_5._AMP)>=0) {
ch1=0; tx1=hX_5._E;
while (ch1<txt.length) {
if (txt.charAt(ch1)==hX_5._AMP) {
ch1++; ch2=hX_5._E;
while (txt.charAt(ch1)!=hX_5._SM) { ch2=ch2+txt.charAt(ch1); ch1++; }
if (ch2.length>0) {
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<hX_5.AMP_ABBS.length;ch3++) {
if (ch2==hX_5.AMP_ABBS[ch3][0]) {
tx1=tx1 + hX_5.AMP_ABBS[ch3][1];
ch3=-1;
break;
}
}
if (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 && (c==32 || c==9 || c==10 || c==13)) {ch++;c=s.charCodeAt(ch);}
return ch;
}
HxG_5.prototype.htmlSkipNotWS=function(s, ch, eq1, eq2, eq3) {
var c=s.charCodeAt(ch), cc1=((eq1!=null)?eq1.charCodeAt(0):32), cc2=((eq2!=null)?eq2.charCodeAt(0):32), cc3=((eq3!=null)?eq3.charCodeAt(0):32), l=s.length;
while (ch<l && c!=32 && c!=9 && c!=10 && c!=13 && c!=cc1 && c!=cc2 && c!=cc3) {ch++;c=s.charCodeAt(ch);}
return ch;
}
HxG_5.prototype.htmlParseTag=function(s, ch, saveArgs) {
var a,v, chL, tag=null, attN=null, attV=null, l=s.length, ended=false;
if (saveArgs!=null && saveArgs) {attN=[]; attV=[];}
if (ch>=l || s.charAt(ch)!=hX_5._LT) return null;
ch++;
if (s.charAt(ch)==hX_5._EX) {
while (ch<l && s.charAt(ch)!=hX_5._GT) ch++;
tag=hX_5._E;
} else {
chL=ch;
if (s.charAt(ch)==hX_5._SL) ch++;
ch=hX_5.htmlSkipNotWS(s,ch,hX_5._SL,hX_5._GT);
tag=s.substring(chL,ch);
ch=hX_5.htmlSkipWS(s,ch);
while (ch<l && s.charAt(ch)!=hX_5._GT && s.charAt(ch)!=hX_5._SL) {
chL=ch;
ch=hX_5.htmlSkipNotWS(s, ch, hX_5._EQ, hX_5._SL, hX_5._GT);
a=s.substring(chL,ch);
v=hX_5._E;
if (s.charAt(ch)!=hX_5._SL && s.charAt(ch)!=hX_5._GT) {
ch=hX_5.htmlSkipWS(s,ch);
if (s.charAt(ch)==hX_5._EQ) ch++;
chL=ch=hX_5.htmlSkipWS(s,ch);
if (s.charAt(ch)==hX_5._SQT) {
chL++;ch++;
while (ch<l && s.charAt(ch)!=hX_5._SQT) ch++;
v=s.substring(chL,ch);
ch++;
} else if (s.charAt(ch)==hX_5._DQT) {
chL++;ch++;
while (ch<l && s.charAt(ch)!=hX_5._DQT) ch++;
v=s.substring(chL,ch);
ch++;
} else {
ch=hX_5.htmlSkipNotWS(s, ch, hX_5._SL, hX_5._GT);
v=s.substring(chL,ch);
}
}
if (saveArgs!=null && saveArgs) {
attN.push(a);
attV.push(v);
}
ch=hX_5.htmlSkipWS(s,ch);
}
}
if (s.charAt(ch)==hX_5._SL) {ended=true; ch++};
ch=hX_5.htmlSkipWS(s,ch);
if (s.charAt(ch)==hX_5._GT) ch++;
if (saveArgs!=null && saveArgs) {
return{ch:ch, tag:hX_5.tagCase(tag), ended:ended, attN:attN, attV:attV};
} else {
return{ch:ch, tag:hX_5.tagCase(tag), ended:ended};
}
}
HxG_5.prototype.findHonourableDir=function(obj) {
if(obj == null) return null;
var curr=obj, curr_dir=null, thedir=hX_5._LTR, notfound=true;
do{
if(curr.dir != null) curr_dir=curr.dir;
if(curr_dir!= null && curr_dir != hX_5._E)
{
if(curr_dir.toLowerCase() == hX_5._LTR)
{
thedir=hX_5._LTR;
notfound=false;
}
else if(curr_dir.toLowerCase() == hX_5._RTL)
{
thedir=hX_5._RTL;
notfound=false;
}
}
curr=curr.parentNode;
}while(notfound && (curr != null))
return thedir;
}
if ((typeof hX_5) == 'undefined' || !hX_5) { var hX_5=new HxG_5(); }
if ((typeof hX) == 'undefined' || !hX) { var hX=hX_5; }
HxG_5.prototype.JSFSubButton=function (component, btnOrg, btnBorder, btnColor, btn1label, btn2label, blurIsOn, hinky, inputIsButton) {
if (!component || !component.DOMobj || !component.DOMobj.id || component.DOMobj.id.length <= 0 || !component.DOMobj.tagName || component.DOMobj.tagName != hX_5._INP) return;
this.c=component;
this.btnOrg=(btnOrg) 			? btnOrg : 1;
this.btnBorder=(btnBorder!=null) ? btnBorder : -1;
this.btnColor=(btnColor)		? btnColor : hX_5.CLR_BTN;
this.btn1label=(btn1label)		? btn1label: hX_5._E;
this.btn2label=(this.btnOrg > 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.style.overflow=hX_5._HI;
tag.style.whiteSpace=hX_5._NOW;
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.style.overflow=hX_5._HI;
tag.style.whiteSpace=hX_5._NOW;
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.brw.isIE())?(hX_5.g.getP(c.DOMobj, hX_5._VIS)):c.DOMobj.style.visibility;
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 (hX_5.brw.isIE() && c.DOMobj.offsetLeft != 0) hX_5.g.setP(c.DOMobj, hX_5._LFT, hX_5._Y+c.DOMobj.offsetLeft+hX_5._PX);
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.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)?"&nbsp;":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.lc=hX_5.currentLocale();
this.plc=this.lc;
this.locale=null;
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.L[this.lc].STR_AM_SUFFIX;
this.sPM=hX_5.L[this.lc].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.lc);
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 ['locale']=['locale', 		hX_5.ARG_TO_NAN,	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);
if (this.locale && this.locale != this.lc) {
this.lc=this.locale;
hX_5.c.strInit(this.lc);
this.sAM=hX_5.L[this.lc].STR_AM_SUFFIX;
this.sPM=hX_5.L[this.lc].STR_PM_SUFFIX;
}
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.L[this.lc].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.L[this.lc].MAX_STR_DATE_DAYS[this.epochIndex()] : hX_5.c.L[this.lc].MAX_STR_DATE_SHDAYS[this.epochIndex()]);
break;
case hX_5._uM:
this.DF_MaxLength+=((l < 3)?2:((l > 3) ? hX_5.c.L[this.lc].MAX_STR_DATE_MONTHS[this.epochIndex()] : hX_5.c.L[this.lc].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.L[this.plc].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.L[this.lc].STRA_DATE_SHMONTHS[this.epochIndex()][0]);
var bNumberInMonth=this.matchDigit(hX_5.L[this.lc].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<tokenC && tok[tokI+1].type < 1 && (tok[tokI+1].token==hX_5._lZ || tok[tokI+1].token==hX_5._uZ))
this.SEPChars=this.FMTSEPChars.substr(1);
if (tok[tokI].type == hX_5._lX) {
} else if (tok[tokI].type >= 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.L[this.plc].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.L[this.plc].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.L[this.plc].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.L[this.plc].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.L[this.plc].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<sDate.length && n<pose.length && sDate.charAt(n).toUpperCase()==pose.charAt(n)) n++;
pose=pose.substr(0,n);
for (j=0; j<this.descLbEpoch.length; j++) {
if (j!=i && pose==this.descLbEpoch[j][((token.length <= 3)?1:0)].substr(0,n).toUpperCase()) j=99;
}
if (j<99) {
sDate=sDate.substr(n); j=0; ch=sDate.charAt(j);
while (j < sDate.length && ((ch==hX_5._P) || !this.matchDigit(ch) && !hX_5.isChar(ch,this.SEPChars))) {
j++; ch=sDate.charAt(j);
}
sDate=sDate.substr(j);
iEpoch=i;
r=true;
break;
}
}
}
if (!r) this.msgFail=hX_5.L[this.plc].ERR_epoch_name;
break;
case hX_5._uM:  case hX_5._u2M:  case hX_5._u3M:  case hX_5._u4M:
if (token.length <= 2 || this.nStrict <= 1) {
n=this.matchDigits (sDate, 2, false);
if (n.fail && this.nStrict > 1) {
this.msgFail=hX_5.L[this.plc].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.L[this.lc].STRA_DATE_MONTHS[this.epochIndex()][intMonth-1]:hX_5.L[this.lc].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<pose.length && sDate.charAt(0)==pose.charAt(i)) {
sDate=sDate.substr(1);
i++;
}
}
}
break;
}
}
r=false;
for (i=0; i < hX_5.cal.monthsInYear(); i++) {
pose=((token.length > 3 || monthStrict <= 1)?hX_5.L[this.lc].STRA_DATE_MONTHS[this.epochIndex()][i]:hX_5.L[this.lc].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.L[this.lc].STRA_DATE_MONTHS[this.epochIndex()][i].toUpperCase();
if (monthStrict <= 1 && sDate.charAt(0).toUpperCase()==pose.charAt(0)) {
n=1;
while (n<sDate.length && n<pose.length && sDate.charAt(n).toUpperCase()==pose.charAt(n)) n++;
pose=pose.substr(0,n);
for (j=0; j<hX_5.cal.monthsInYear(); j++)
if (j!=i && pose==hX_5.L[this.lc].STRA_DATE_MONTHS[this.epochIndex()][j].substr(0,n).toUpperCase()) j=99;
if (j<99) {
sDate=sDate.substr(n); j=0; ch=sDate.charAt(j);
while (j < sDate.length && (!this.matchDigit(ch) && !hX_5.isChar(ch,this.SEPChars))) {
j++; ch=sDate.charAt(j);
}
sDate=sDate.substr(j);
intMonth=i+1;
r=true;
}
}
}
if (!r)	this.msgFail=hX_5.L[this.plc].ERR_month_name;
break;
case hX_5._uE:  case hX_5._u2E:
case hX_5._u3E: case hX_5._u4E:
if (this.nStrict <= 1)
if (this.skipIfMissing(sDate)) break;
r=false;
for (i=0; i<7; i++) {
pose=((token.length <= 3)?hX_5.L[this.lc].STRA_DATE_SHDAYS[this.epochIndex()][i]:hX_5.L[this.lc].STRA_DATE_DAYS[this.epochIndex()][i]).toUpperCase();
if (sDate.substr(0, pose.length).toUpperCase() == pose) {
sDate=sDate.substr(pose.length);
r=true;
break;
}
}
if (!r && this.nStrict <= 1) {
sDate=(token.length <= 3)?(this.skipToSeparator(sDate,(this.nStrict==0)?-1:hX_5.c.L[this.lc].MAX_STR_DATE_SHDAYS[this.epochIndex()])):(this.skipToSeparator(sDate,-1));
r=true;
}
if (!r) this.msgFail=hX_5.L[this.plc].ERR_day_name;
break;
case hX_5._lA:
if (this.nStrict <= 1)
if (this.skipIfMissing(sDate)) break;
if (sDate.length >= 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.L[this.plc].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.L[this.lc].STR_TIMEZONES.length; i++) {
if (hX_5.L[this.lc].STR_TIMEZONES[i][1] != null && hX_5.L[this.lc].STR_TIMEZONES[i][1].length > 0) {
pose=hX_5.L[this.lc].STR_TIMEZONES[i][1].toUpperCase();
if (sDate.substr(0, pose.length).toUpperCase() == pose) {
zOffset=this.readTimeZoneOffset(hX_5.L[this.lc].STR_TIMEZONES[i][0]);
sDate=sDate.substr(pose.length);
r=true;
break;
}
pose=hX_5.L[this.lc].STR_TIMEZONES[i][3].toUpperCase();
if (sDate.substr(0, pose.length).toUpperCase() == pose) {
zOffset=this.readTimeZoneOffset(hX_5.L[this.lc].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.L[this.plc].ERR_tzone_name;
break;
default:
break;
}
}
tokI++;
}
if (this.msgFail.length == 0 && this.nStrict > 1 && (tokI != tokenC || sDate.length > 0)) {
this.msgFail=hX_5.L[this.plc].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<this.descLbEpoch.length-2) {
if (this.nStrict > 1 && intYear>(1+this.descYrEpoch[iEpoch+1]-this.descYrEpoch[iEpoch]))
this.msgFail=hX_5.L[this.plc].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.L[this.plc].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.L[this.plc].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.L[this.plc].ERR_month_rangelimit;
args[1]= hX_5.L[this.lc].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.L[this.plc].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.L[this.plc].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.L[this.plc].ERR_minute_range;
if (this.msgFail.length == 0 && (intSec < 0 || intSec > 59))
this.msgFail=hX_5.L[this.plc].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);
if (this.locale)		args.push("locale:"+this.locale);
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),((args.length>10)?args[10]: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.L[this.lc].STR_TIMEZONES.length;
for (j=znames-1; !ISO && (j>0); j--) {
if (hX_5.L[this.lc].STR_TIMEZONES[j][0] == null || hX_5.L[this.lc].STR_TIMEZONES[j][0].length == 0) {
} else {
zoffset=this.readTimeZoneOffset(hX_5.L[this.lc].STR_TIMEZONES[j][z1]);
if (zoffset == z) {
r=hX_5.L[this.lc].STR_TIMEZONES[j][z2];
for (k=0;k<r.length;k++) {
if (this.matchDigit(r.charAt(k))) {
r=r.substr(0,k) + this.cvtToDigits(r.charAt(k)) + r.substr(k+1);
}
}
break;
}
}
}
if (r.length == 0) {
r=((ISO)?hX_5._E:hX_5.L[this.lc].STR_TIMEZONES[0][1]) + ((z < 0) ? this._MIN : this._PLS);
z=Math.abs(z);
var hr=Math.floor(z/60);
var mn=z-(hr*60);
hr=hX_5.padL(this.cvtToDigits(hr),2);
mn=hX_5.padL(this.cvtToDigits(mn),2);
r=r + hr + ((ISO)?hX_5._E:this.TZSeparator) + mn;
}
return (r);
}
HxG_5.prototype.DateTimeConverter.prototype.isDateFormat=function() {
return this.bHasDate;
}
HxG_5.prototype.DateTimeConverter.prototype.isTimeFormat=function() {
return this.bHasTime;
}
HxG_5.prototype.DateTimeConverter.prototype.setCalendar=function() {
hX_5.cal.setCalendar(this.bIsGregorian, this.bIsHebrew, this.bIsHijiri);
}
HxG_5.prototype.DateTimeConverter.prototype.valueToDayLabel=function(oDate) {
return hX_5.L[this.lc].STRA_DATE_DAYS[this.epochIndex()][hX_5.cal.getDay(oDate)];
}
HxG_5.prototype.DateTimeConverter.prototype.valueToShortDayLabel=function(oDate) {
return hX_5.L[this.lc].STRA_DATE_SHDAYS[this.epochIndex()][hX_5.cal.getDay(oDate)];
}
HxG_5.prototype.DateTimeConverter.prototype.valueToSShortDayLabel=function(i) {
return hX_5.L[this.lc].STRA_DATE_SHSHDAYS[this.epochIndex()][i];
}
HxG_5.prototype.DateTimeConverter.prototype.valueToMonthLabel=function(oDate) {
var o=hX_5.cal.dateToCalendar(oDate);
return hX_5.L[this.lc].STRA_DATE_MONTHS[this.epochIndex()][o.month];
}
HxG_5.prototype.DateTimeConverter.prototype.valueToShortMonthLabel=function(oDate) {
var o=hX_5.cal.dateToCalendar(oDate);
return hX_5.L[this.lc].STRA_DATE_SHMONTHS[this.epochIndex()][o.month];
}
HxG_5.prototype.DateTimeConverter.prototype.valueToYearLabel=function (oDate) {
if (this.bShowEpoch)
return (this.isShortYr) ? this.valueToString(oDate, hX_5.DTFMT_GEYEAR) : this.valueToString(oDate, hX_5.DTFMT_GCYEAR);
else
 return this.valueToString(oDate, hX_5.DTFMT_YEAR);
}
HxG_5.prototype.DateTimeConverter.prototype.valueToYearEpoch=function (oDate) {
var n,sn,i=1,o=hX_5.cal.dateToCalendar(oDate), y=o.year;
if (!this.isShortYr) {
if (this.bIsGregorian) {
i=(y < this.descYrEpoch[0])?0:1;
if (this.bIsChristianEra)
y=(y<0)?-y:y;
else {
y -= this.descYrEpoch[0];
if (this.bIsBuddhistEra) y++;
}
}
} else {
for (i=this.descDtEpoch.length-1; i>=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.lc=hX_5.currentLocale();
this.required=false;
this.minimumBound=this.maximumBound=this.minimumDate=this.maximumDate=this.minimumTime=this.maximumTime=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, wasmin=this.minimumBound;
if (hX_5.c.STDDTP_converter==null) hX_5.c.STDDTP_converter=new hX_5.DateTimeConverter();
var DTP=hX_5.c.STDDTP_converter;
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.maximumDate) {
this.maximumTime=this.maximumDate.Hx4Clone(2);
if (this.maximumTime.getFullYear() > 1970) {
this.maximumTime.setYear(1970);
this.maximumTime.setMonth(0);
this.maximumTime.setDate(1);
}
this.maximumTime.setMilliseconds(0);
}
if (this.minimumDate) {
this.minimumTime=this.minimumDate.Hx4Clone(2);
if (this.minimumTime.getFullYear() > 1970) {
this.minimumTime.setYear(1970);
this.minimumTime.setMonth(0);
this.minimumTime.setDate(1);
}
this.minimumTime.setMilliseconds(0);
}
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.L[this.lc].ERR_required;
return r;
}
e=hX_5.allTrim (testV);
if (e.length == 0) {
this.msgFail=(r) ? hX_5._E : hX_5.L[this.lc].ERR_required;
return r;
}
test=DTP.stringToValue(e);
} else
 if (testV.Hx4Clone) test=testV.Hx4Clone(2);
if (test==null) {
this.msgFail=hX_5.L[this.lc].ERR_required;
return false;
}
var testMax=(bTOnly)?this.maximumTime:this.maximumDate;
var testMin=(bTOnly)?this.minimumTime:this.minimumDate;
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.L[this.lc].ERR_minimum;
return false;
}
}
if (this.minimumDate) {
if (-1 == test.Hx4CompareDate(testMin, bTCompare)) {
this.msgFail=hX_5.L[this.lc].ERR_minimum;
return false;
}
}
if (this.maximumDate) {
if (1 == test.Hx4CompareDate(testMax, bTCompare)) {
this.msgFail=hX_5.L[this.lc].ERR_maximum;
return false;
}
}
if (this.ELexpressionImp != null) {
if (!hX_5.regExp.testELExp(test, this.ELexpressionImp)) {
this.msgFail=hX_5.L[this.lc].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.L[this.lc].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 ();
var testMax=(bTOnly)?this.maximumTime:this.maximumDate;
var testMin=(bTOnly)?this.minimumTime:this.minimumDate;
var oY=o.getFullYear(), oM=o.getMonth(), oD=o.getDate();
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(testMin, bTCompare))
o=testMin.Hx4Clone(2);
}
if (this.maximumDate) {
if (1 == o.Hx4CompareDate(testMax, bTCompare)) {
o=testMax.Hx4Clone(2);
}
}
if (bTOnly && (this.minimumDate || this.maximumDate)) {
o.setYear(oY);
o.setMonth(oM);
o.setDate(oD);
o.setMilliseconds(0);
}
return o;
}
HxG_5.prototype.DateTimeAssist=function (_elem, _state, _converter, _validator, _promptChar) {
if (!_elem || !_converter || !_state) return;
this.lc=hX_5.currentLocale();
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<l; i++) {
if (cvt.maskFormat.charAt(i) == hX_5._LB && test.charAt(i) != pChar && test.charAt(i) != hX_5._B)
empty=false;
}
if (ending && empty) return {reset:false, value:hX_5._E};
if (l < cvt.maskFormat.length)
test=test + handler.getEmptyMask().substr(l);
else if (!ending && l > 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)<l) ? cvt.getDigit(test.charAt(i+1)) : hX_5._B;
if (c1 == pChar && c2 == pChar) {
c1=hX_5._Z;
c2=(m==hX_5._lH || m==hX_5._lS || m==hX_5._uA) ? hX_5._Z:hX_5._1;
} else if (c1 == pChar && c2 != pChar) {
c1=hX_5._Z;
} else if (c1 != pChar && c2 == pChar) {
c2=(c1==hX_5._Z) ? hX_5._1 : c1;
c1=hX_5._Z;
} else if (c1 == hX_5._Z && c2 == hX_5._Z && m != hX_5._lH) {
c1=hX_5._Z;
c2=(m==hX_5._lH || m==hX_5._lS || m==hX_5._uA) ? hX_5._Z:hX_5._1;
}
if (!cvt.matchDigit(c1) || !cvt.matchDigit(c2))
return {reset:true, value:null};
j=parseInt(c1+c2,10);
if (m==hX_5._lH) intH=j;
else if (m==hX_5._uA) intMn=j;
else if (m==hX_5._lS) intS=j;
else if (m==hX_5._lM) intM=j;
else intD=j;
i=i+1;
} else {
j=(cvt.isShortYr)?2:4;
c2=((i+1)<l) ? test.charAt(i+1) : hX_5._B;
c3=((i+2)<l) ? test.charAt(i+2) : hX_5._B;
c4=((i+3)<l) ? test.charAt(i+3) : hX_5._B;
if (!ending) {
if (cvt.isShortYr) {
if (c1 == pChar || c1 == hX_5._B) c1=hX_5._1;
if (c2 == pChar || c2 == hX_5._B) c2=hX_5._B;
c3=c4=hX_5._E;
} else {
c5=c4;
if (c1 == pChar || c1 == hX_5._B) c1=hX_5._2;
if (c2 == pChar || c2 == hX_5._B) c2=hX_5._Z;
if (c3 == pChar || c3 == hX_5._B) c3=hX_5._Z;
if (c4 == pChar || c4 == hX_5._B) c4=hX_5._Z;
leapT=(c5!=c4);
}
} else {
var arranged=false, today=new Date(), thisyr=today.getFullYear()+hX_5._E;
if (c1 == pChar && c2 == pChar && c3 == pChar && c4 == pChar) {
if (cvt.isShortYr) {
c1=hX_5._Z; c2=hX_5._1;	c3=c4=hX_5._E;
} else {
if (epoch) { c1=thisyr.charAt(0); c2=c3=c4=hX_5._Z; }
else { c1=thisyr.charAt(0); c2=thisyr.charAt(1); c3=thisyr.charAt(2); c4=thisyr.charAt(3); }
}
} else {
if (cvt.isShortYr) {
if (c1 == pChar || c1 == hX_5._B) c1=hX_5._Z;
if (c2 == pChar || c2 == hX_5._B) c2=hX_5._B;
c3=c4=hX_5._E;
} else {
if (c1 != pChar && c1 != hX_5._B && c4 == pChar) {
if (cvt.bShowEpoch) {
arranged=true;
if (c2==pChar && c3==pChar) {
c4=c1; c1=hX_5._Z; c2=hX_5._Z; c3=hX_5._Z;
} else if (c3==pChar) {
c3=c1; c4=c2; c1=hX_5._Z; c2=hX_5._Z;
} else {
c2=c1; c3=c2; c4=c3; c1=hX_5._Z;
}
} else {
if (c3==pChar) {
var intYr=parseInt(c1+((c2!=pChar)?c2:hX_5._E),10);
var o=hX_5.cal.twoYearToFourYear(intYr, today, cvt.getBaseYear(today)) + hX_5._E;
while (o.length < 4) o=hX_5._Z + o;
c1=o.charAt(0); c2=o.charAt(1); c3=o.charAt(2); c4=o.charAt(3);
}
}
}
if (!arranged) {
if (c1 == pChar || c1 == hX_5._B) c1=(epoch)?hX_5._Z:thisyr.charAt(0);
if (c2 == pChar) c2=hX_5._Z;
if (c3 == pChar) c3=hX_5._Z;
if (c4 == pChar) c4=hX_5._Z;
}
}
}
}
if (!cvt.matchDigit(c1) || !cvt.matchDigit(c2) || !cvt.matchDigit(c3) || !cvt.matchDigit(c4))
return {reset:true, value:null};
c1=cvt.getDigit(c1)+cvt.getDigit(c2)+cvt.getDigit(c3)+cvt.getDigit(c4);
intYL=intY=parseInt(c1,10);
intYL=hX_5.cal.nearestLeapYear(intY);
i+=(j-1);
}
}
}
if (!ending) {
m=cvt.maskFormatDigits.charAt(pos);
m1=cvt.maskFormatDigits.charAt(pos+1);
intYT=(intY>=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.lc=hX_5.currentLocale();
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.L[this.lc].ERR_empty;
return null;
}
if (this.invalidPattern) {
this.msgFail=hX_5.L[this.lc].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.L[this.lc].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.L[this.lc].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.L[this.lc].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.L[this.lc].ERR_number_char;
break;
}
} else {
argsFail[1]=right.charAt(0);
this.msgFail=hX_5.L[this.lc].ERR_number_char;
break;
}
}
if ((this.msgFail.length == 0) && (leftc.length == 0) && (rightc.length==0))
this.msgFail=hX_5.L[this.lc].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.L[this.lc].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.L[this.lc].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.lc=hX_5.currentLocale();
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.L[this.lc].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.L[this.lc].ERR_required;
return r;
}
e=hX_5.allTrim (testnum);
if (e.length == 0) {
this.msgFail=(r) ? hX_5._E : hX_5.L[this.lc].ERR_required;
return r;
}
test=NP.stringToValue(e);
} else test=testnum;
if (test == null || isNaN (test)) {
this.msgFail=hX_5.L[this.lc].ERR_required;
return false;
}
if (this.minimum && test < this.minimum) {
this.msgFail=hX_5.L[this.lc].ERR_minimum;
return false;
}
if (this.maximum && test > this.maximum) {
this.msgFail=hX_5.L[this.lc].ERR_maximum;
return false;
}
if (this.ELexpressionImp != null) {
if (!hX_5.regExp.testELExp(test, this.ELexpressionImp)) {
this.msgFail=hX_5.L[this.lc].ERR_constraint;
return false;
}
}
if (this.modulus) {
this.msgFail=hX_5.L[this.lc].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.L[this.lc].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.lc=hX_5.currentLocale();
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<l; ++i) {
h=v.charAt(i);
if (i < prefix)
c=c + (((!plus) && h == cvt.LC_minusSymbol) ? hX_5._QM : hX_5._VB);
else if (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.L[this.lc].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.lc=hX_5.currentLocale();
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.L[this.lc].ERR_empty;
return null;
}
if (inString.length<=0) return hX_5._E;
var v=inString, l=v.length, l1=this.maskFormat.length;
if (l > l1 && (!promptChar && l != l1)) {
this.msgFail=hX_5.L[this.lc].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.L[this.lc].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 || inStr.length<=0) 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.L[this.lc].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.lc=hX_5.currentLocale();
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.L[this.lc].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.L[this.lc].ERR_required;
return false;
} else
 return true;
}
if (this.minimumLength && test.length < this.minimumLength) {
this.msgFail=hX_5.L[this.lc].ERR_minimum;
return false;
}
if (this.maximumLength && test.length > this.maximumLength) {
this.msgFail=hX_5.L[this.lc].ERR_maximum;
return false;
}
if (this.constraintImp != null) {
if (!hX_5.regExp.testRegExp(test, this.constraintImp)) {
this.msgFail=hX_5.L[this.lc].ERR_constraint;
return false;
}
}
if (this.constraintExpImp != null) {
if (!hX_5.regExp.testRegExp(test, this.constraintExpImp)) {
this.msgFail=hX_5.L[this.lc].ERR_constraint;
return false;
}
}
if (this.ELexpressionImp != null) {
if (!hX_5.regExp.testELExp(test, this.ELexpressionImp)) {
this.msgFail=hX_5.L[this.lc].ERR_constraint;
return false;
}
}
return true;
}
HxG_5.prototype.MaskAssist=function (_elem, _state, _converter, _validator, _promptChar) {
if (!_elem || !_converter || !_state) return;
this.lc=hX_5.currentLocale();
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) {
var m=handler.getEmptyMask();
m=hX_5.replaceAll(m,promptChar,hX_5._B);
if (m!=newValue)
elem.value=newValue;
else
 elem.value=hX_5._E;
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<cvt.markers.length; i++)
emptyMask=hX_5.replaceAll(emptyMask, cvt.markers.charAt(i), promptChar);
function doDelete (evt) {
var v, s, cR, 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;
cR=getCChar(pos);
if (!cvt.isMarker(cR) && cR != hX_5._EQ && !state.hasSel()) {
if (evt.type!=hX_5._evCT) {
pos=(evt.keyCode==hX_5.KEY_BS) ? (pos) : (pos+1);
state.setPos(pos);
return -2;
}
return false;
}
v=state.getValue(); s=state.hasSel();
if (s) {
var rg=hX_5.sel.getSelectionR(elem);
state.setValue((rg.start <= 0 && rg.end >= v.length-1)?emptyMask:fillWithMaskPiece(v, rg.start, rg.end));
} else
 if (pos>=0 && pos<v.length) state.setValue (v.substr(0,pos) + promptChar + v.substr(pos+1));
pos=(s || (evt.type!=hX_5._evCT && evt.keyCode==hX_5.KEY_BS)) ? pos : pos+1;
state.setPos(pos);
return -2;
}
function doInsert (v, chi, pos, sel) {
var ch=(chi==hX_5._B)?promptChar:chi;
if (sel) {
var rg=hX_5.sel.getSelectionR(elem);
v=fillWithMaskPiece(v, rg.start, rg.end);
var i, l=v.length;
for (i=rg.start; i < rg.end; i++) {
if (cvt.isMarker(getCChar(i))) break;
}
if (i < rg.end)
v=v.substr(0,i) + ch + v.substr(i+1);
state.setPos(rg.start+1);
} else {
v=v.substr(0,pos) + ((ch==hX_5._B)?promptChar:ch) + v.substr(pos+1);
pos=getMoveForward (v, pos+1);
state.setPos(pos);
}
state.setValue(v);
return -2;
}
function doCaretPrev (evt) {
if (evt.shiftKey || state.hasSel())
return -1;
else {
var pos=getMovePrevious (state.getValue(), state.getPos()-1);
state.setPos(pos);
return -2;
}
}
function doCaretNext (evt) {
if (evt.shiftKey || state.hasSel())
return -1;
else {
var pos=getMoveForward (state.getValue(), state.getPos()+1);
state.setPos(pos);
return -2;
}
}
function getMovePrevious (v, pos) {
var i, c, c1, l=v.length;
pos=(pos < 0) ? 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 (hX_5.brw.isIE() && base.tagName==hX_5._SPN && base.parentNode && base.parentNode.tagName && base.parentNode.tagName==hX_5._TD) {
var p=hX_5.g.getP(base,hX_5._POS), q=hX_5.g.getP(base.parentNode,hX_5._POS);
if (p.toLowerCase()==hX_5._REL && q.toLowerCase()=="static") {
base.parentNode.style.position=hX_5._REL;
tagtop=hX_5.g.getAbsPosTop(base);
base.parentNode.style.position="static";
}
}
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), popTopOff, popLeftOff;
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)) {
if ((tagtop-h+1)>=0) 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);
popTopOff=popLeftOff=0;
if (pop.offsetParent && pop.offsetParent.tagName) {
poptop=parseInt(pop.style.top,10); popleft=parseInt(pop.style.left,10);
if (y!=poptop) {
y=hX_5.g.getAbsPosTop(pop.offsetParent);
pop.style.top=(poptop-y)+hX_5._PX;
y=hX_5.g.getAbsPosTop(pop);
}
if (x!=popleft){
x=hX_5.g.getAbsPosLeft(pop.offsetParent);
pop.style.left=(popleft-x)+hX_5._PX;
x=hX_5.g.getAbsPosLeft(pop);
}
}
popTopOff=parseInt(pop.style.top,10);
popLeftOff=parseInt(pop.style.left,10);
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);
}
var offX, offY, mgnTop, mgnLft;
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");
mgnTop=parseInt(hX_5.g.getP(pop, "margin-top"),10);
mgnLft=parseInt(hX_5.g.getP(pop, "margin-left"),10);
offY=mgnTop-1;
offX=mgnLft-1;
} else {
this.dropShadowWidth=parseInt(hX_5.g.getP(pop, null, "outline-width"),10);
this.dropShadowColor=hX_5.g.getP(pop, null, "outline-color");
mgnTop=parseInt(hX_5.g.getP(pop, "margin-top"),10);
mgnLft=parseInt(hX_5.g.getP(pop, "margin-left"),10);
offY=mgnTop;
offX=mgnLft;
}
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=(popLeftOff+i+2+offX) + hX_5._PX;
ds.style.top=(popTopOff+i+2+offY) + 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 x, child, node=iNode;
if (node.tagName && node.tagName == hX_5._IFRM) {
try {
node=(node.contentDocument) ? node.contentDocument : ((node.contentWindow) ? node.contentWindow.document.body : null);
x=(node.nodeType);
}
catch(e) {
node=null;
}
}
if (node!=null) {
if (hX_5.isTabbable(node)) if (notDuplicateElement(node)) tabItems.push(new elem(node, tabItems.length));
if (!node.tagName || (node.tagName && node.tagName!=hX_5._SEL)) {
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<l; ix++) if (tabItems[ix].name == node.name) return false;
}
}
}
return true;
}
function compareTabIndex(ia, ib) {
var r=0, a=ia.tabOrder, b=ib.tabOrder;
if ((a == b) || (a < 0 && b < 0))	r=0;
else if (a > 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; ix++) {
if (tabItems[ix].obj == obj) { hit=true; break; }
}
if (hit) {
r=(tabItems[ix]).obj;
var obj0=r, ix0=ix+delta, i=0;
hit=false;
while (ix!=ix0 && !hit && i<tabItems.length) {
if (ix0 < 0) ix0=tabItems.length-1;
if (ix0 >= 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;
}
if (r==false && hX_5.brw.isIE() && evt.type==hX_5._evKP) evt.returnValue=false;
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.";
