/* *+------------------------------------------------------------------------+ *| Licensed Materials - Property of IBM *| *| IBM Cognos Products: PS *| *| (C) Copyright IBM Corp. 2011 *| *| US Government Users Restricted Rights - Use, duplication or *| disclosure restricted by GSA ADP Schedule Contract with IBM Corp. *| *+------------------------------------------------------------------------+ */ var G_HAL={}; G_HAL.M_oLibraries={hal:{name:"hal",path:"",appImagePath:"images/",imagePath:"",isApplication:true,iframeUnderlay:false,enableRoundButtons:false,enableDialogChrome:false,enableDialogShowAnimation:false,enableDialogMoveAnimation:false,enableDialogResizeAnimation:false,menuAnimation:false,enableComboBoxAnimation:false,enableComboBoxFrameBorder:false,enableWigetFrameBorder:false,enableMenuPopupFrameBorder:false,transferDialogFrameborderClass:"",transferPopupDialogFrameborderClass:"",dialogFrameBorderWidthBuffer:0,dialogFrameBorderHeightBuffer:0,menuPopupFrameBorderWidthBuffer:0,menuPopupFrameBorderHeightBuffer:0,transferMenuFrameborderClass:"",comboBoxFrameBorderWidthBuffer:0,comboBoxFrameBorderHeightBuffer:0,useExponentialEasing:false,animationDurationMultiplier:1,enablePaneAnimation:false,disableMSThemesOverride:false,enableHighContrastMode:false,enableAccessibility:false,defaultGuiDirection:"",fireDOMContentLoaded:false,enableFastClick:false,enablePointerSupport:false}}; if(window["G_HALOptions"]){ var v_oOptions=G_HAL.M_oLibraries["hal"]; for(var s in G_HALOptions){ v_oOptions[s]=G_HALOptions[s]; } } G_HAL.F_AddLibrary=function(_1,_2){ this.M_oLibraries[_1]=_2; }; G_HAL.M_oBuiltInDialogs={D_MsgBox:true,D_InputBox:true,D_XmlError:true,D_Progress:true,D_PropertySheetListView:true}; G_HAL.m_oLoaded={}; G_HAL.M_sPath=G_HAL.M_oLibraries["hal"]["path"]; G_HAL.M_sAppImagePath=G_HAL.M_oLibraries["hal"]["appImagePath"]; G_HAL.M_sImagePath=G_HAL.M_oLibraries["hal"]["imagePath"]||(G_HAL.M_sPath+"hal/images/"); G_HAL.F_GetImageURL=function(_3){ if(this.f_isNonResolvableFilePath(_3)){ return _3; } var _4=this.f_getLibraryNameFromSrc(_3); if(_4&&this.M_oLibraries[_4]["imagePath"]){ _3=_3.replace(_4+"/images/",this.M_oLibraries[_4]["imagePath"]); } _3=U_HighContrast.F_GetHighContrastImgIfNecessary(_3); return (_4?(this.M_oLibraries[_4]["path"]+_3):(this.M_sAppImagePath+_3)); }; G_HAL.F_GetFileURL=function(_5){ if(this.f_isNonResolvableFilePath(_5)){ return _5; } var _6=this.f_getLibraryNameFromSrc(_5); return (_6?(this.M_oLibraries[_6]["path"]+_5):_5); }; G_HAL.f_isNonResolvableFilePath=function(_7){ switch(_7.charAt(0)){ case "h": case "H": var s=_7.toLowerCase(); if((s.substr(0,7)=="http://")||(s.substr(0,8)=="https://")){ return true; } break; case "u": case "U": var s=_7.toLowerCase(); if(s.substr(0,8)=="unmht://"){ return true; } break; case "/": case ".": return true; } return false; }; G_HAL.f_getLibraryNameFromSrc=function(_8){ var i=_8.indexOf("/"); if(i!=-1){ var _9=_8.substr(0,i); if(_9&&this.M_oLibraries[_9]){ return _9; } } return ""; }; G_HAL.f_getFileSrc=function(_a){ var _b=this.f_getLibraryNameFromSrc(_a); return (_b?(this.M_oLibraries[_b]["path"]+_a):_a); }; G_HAL.F_FileHasBeenLoaded=function(_c){ _c=this.f_getFileSrc(_c); return Boolean(this.m_oLoaded[_c]); }; G_HAL.F_AddFileToLoadedList=function(_d){ _d=this.f_getFileSrc(_d); this.m_oLoaded[_d]=true; }; G_HAL.F_RemoveFileFromLoadedList=function(_e){ _e=this.f_getFileSrc(_e); delete this.m_oLoaded[_e]; }; G_HAL.F_RemoveFilesFromLoadedList=function(_f){ if(_f){ var _10=_f.length; for(var i=0;i<_10;i++){ this.F_RemoveFileFromLoadedList(_f[i]); } } }; G_HAL.F_GetFilesNotLoaded=function(_11){ var _12=[]; for(var i=0;i<_11.length;i++){ if(!this.F_FileHasBeenLoaded(_11[i])){ _12.F_PushUnique(_11[i]); } } return _12; }; G_HAL.F_AlertError=function(s){ alert("HAL ERROR:\r\n\r\n"+s); }; G_HAL.F_OnDomContentLoaded=function(e){ e=e||window.event; if(G_BrowserInfo.M_bIsIE6){ document.body.className+=" clsHalNoPngAlpha"; } if(window["G_DragDrop"]||window["C_Dialog"]||window["C_PropertySheet"]||window["C_ModelessDialog"]){ var d=document; d.body.appendChild(d.createElement("DIV")).innerHTML=G_HAL.F_GetHtmlToWrite(); } if(window["U_CoolButton"]){ U_CoolButton.F_InitCoolButtons(document); } if(window["F_HAL_OnDomContentLoaded"]){ F_HAL_OnDomContentLoaded(e); }else{ var _13=window["G_App"]; if(_13&&_13["F_HAL_OnDomContentLoaded"]){ _13.F_HAL_OnDomContentLoaded(e); } } }; G_HAL.F_OnLoad=function(e){ e=e||window.event; if(!G_HAL.M_oLibraries["hal"]["fireDOMContentLoaded"]){ G_HAL.F_OnDomContentLoaded(e); } if(window["F_HAL_OnLoad"]){ F_HAL_OnLoad(e); }else{ var _14=window["G_App"]; if(_14&&_14["F_HAL_OnLoad"]){ _14.F_HAL_OnLoad(e); } } if(window.onresize){ G_HAL.f_originalWindowOnResize=window.onresize; } window.onresize=G_HAL.F_OnResize; if(G_BrowserInfo.M_bIsTouchDevice){ if(window.onorientationchange){ G_HAL.f_originalOrientationChange=window.onorientationchange; } window.onorientationchange=G_HAL.F_OnOrientationChange; } if(G_HAL.f_originalWindowOnLoad){ G_HAL.f_originalWindowOnLoad(e); } }; G_HAL.F_OnUnLoad=function(e){ e=e||window.event; U_DOM.F_DisplayTDs(document); var _15=window["G_App"]; if(window["F_HAL_OnUnLoad"]){ F_HAL_OnUnLoad(e); }else{ var _15=window["G_App"]; if(_15&&_15["F_HAL_OnUnLoad"]){ _15.F_HAL_OnUnLoad(e); } } if(window["C_WebRequest"]){ C_WebRequest.F_AbortActiveRequests(); } G_Debug.F_CloseConsole(); G_HAL.f_detach(); if(G_HAL.f_originalWindowOnUnLoad){ G_HAL.f_originalWindowOnUnLoad(e); } G_HAL.f_originalWindowOnResize=null; G_HAL.f_originalWindowOnLoad=null; G_HAL.f_originalWindowOnUnLoad=null; }; G_HAL.f_detach=function(){ if(window["C_Dialog"]){ C_Dialog.F_Detach(); } if(window["C_ModelessDialog"]){ C_ModelessDialog.F_Detach(); } if(window["C_ComboBox"]){ C_ComboBox.F_Detach(); } }; G_HAL.F_OnResize=function(e){ e=e||window.event; var _16=document.body.clientWidth; var _17=document.body.clientHeight; if((_16==G_HAL.m_iClientWidth)&&(_17==G_HAL.m_iClientHeight)){ return; } G_HAL.m_iClientWidth=_16; G_HAL.m_iClientHeight=_17; if(window["U_Dialog"]){ U_Dialog.F_KeepDialogsVisible(); } var _18=window["G_App"]; if(window["F_HAL_OnResize"]){ F_HAL_OnResize(e); }else{ var _18=window["G_App"]; if(_18&&_18["F_HAL_OnResize"]){ _18.F_HAL_OnResize(e); } } if(G_HAL.f_originalWindowOnResize){ G_HAL.f_originalWindowOnResize(e); } }; G_HAL.F_OnOrientationChange=function(e){ e=e||window.event; var _19=window["G_App"]; if(window["F_HAL_OnOrientationChange"]){ F_HAL_OnOrientationChange(e); }else{ var _19=window["G_App"]; if(_19&&_19["F_HAL_OnOrientationChange"]){ _19.F_HAL_OnOrientationChange(e); } } if(G_HAL.f_originalOrientationChange){ G_HAL.f_originalOrientationChange(e); } }; if(!G_HAL.M_oLibraries["hal"]["fireDOMContentLoaded"]){ }else{ if((navigator.product=="Gecko")||(navigator.userAgent.toLowerCase().indexOf("webkit")!=-1)){ document.addEventListener("DOMContentLoaded",function(){ document.removeEventListener("DOMContentLoaded",arguments.callee,false); G_HAL.F_OnDomContentLoaded(); },false); }else{ document.attachEvent("onreadystatechange",function(){ if(document.readyState==="complete"){ document.detachEvent("onreadystatechange",arguments.callee); G_HAL.F_OnDomContentLoaded(); } }); } } if(window.onload){ G_HAL.f_originalWindowOnLoad=window.onload; } window.onload=G_HAL.F_OnLoad; if(window.onunload){ G_HAL.f_originalWindowOnUnLoad=window.onunload; } window.onunload=G_HAL.F_OnUnLoad; G_HAL.F_VerifyDependencies=function(){ return; }; G_HAL.F_GetHtmlToWrite=function(){ var a=[]; if(window["G_DragDrop"]){ a.push(G_DragDrop.F_GetCursorsHtml()); if(window["C_TreeView"]){ a.push(C_TreeView.F_GetCaretsHtml()); } if(window["C_OrgTreeView"]){ a.push(C_OrgTreeView.F_GetCaretsHtml()); } if(window["C_ListView"]){ a.push(C_ListView.F_GetCaretsHtml()); } } if(window["C_ModelessDialog"]){ a.push(C_ModelessDialog.F_GetModelessDialogTemplateHtml()); } if(window["C_Dialog"]){ a.push(C_Dialog.F_GetModalDialogTemplateHtml()); for(var s in this.M_oBuiltInDialogs){ if((s=="D_PropertySheetListView")&&!window["C_PropertySheet"]){ continue; } var _1a=window[s]; if(_1a){ a.push(_1a.F_GetDialogHtml()); } } } return a.join(""); }; G_HAL.F_GetWidgetFrameBorderHtml=function(_1b){ if(!this.m_oWidgetFrameBorderHtmlStream){ var os=new C_StringStream(); os.F_Write("
"); os.F_Write(""); os.F_Write(""); os.F_Write(""); os.F_Write(""); os.F_Write(""); os.F_Write(""); os.F_Write(""); os.F_Write(""); os.F_Write(""); os.F_Write(""); os.F_Write(""); os.F_Write(""); os.F_Write(""); os.F_Write(""); os.F_Write(""); os.F_Write(""); os.F_Write(""); os.F_Write(""); os.F_Write(""); os.F_Write(""); os.F_Write(""); os.F_Write(""); os.F_Write(""); os.F_Write(""); os.F_Write(""); os.F_Write(""); os.F_Write(""); os.F_Write(""); os.F_Write(""); os.F_Write(""); os.F_Write(""); os.F_Write(""); os.F_Write(""); os.F_Write(""); os.F_Write(""); os.F_Write(""); os.F_Write("
\"\"
\"\"
"); os.F_Write("
"); os.F_Write("
"); os.F_Write("
"); os.F_Write("
"); os.F_Write("
"); os.F_Write("
\"\"
\"\"
"); os.F_Write("
"); this.m_oWidgetFrameBorderHtmlStream=os; } this.m_oWidgetFrameBorderHtmlStream.F_WriteToPlaceHolder(1,_1b); this.m_oWidgetFrameBorderHtmlStream.F_WriteToPlaceHolder(2,_1b); return this.m_oWidgetFrameBorderHtmlStream.F_ToString(); }; G_HAL.F_UpdateWidgetFrameBorderClass=function(_1c,_1d){ if(_1c.className!=_1d){ _1c.className=_1d; } var tbl=_1c.firstChild; if(tbl.className!=_1d){ tbl.className=_1d; } }; G_HAL.F_EnableHighContrastMode=function(){ this.M_oLibraries["hal"]["enableHighContrastMode"]=true; (new C_ClassList(document.body)).F_Add("clsHighContrast"); var _1e=document.getElementsByTagName("IMG"); for(var i=0;i<_1e.length;i++){ _1e[i].src=U_HighContrast.F_GetHighContrastImgIfNecessary(_1e[i].getAttribute("src")); } }; G_HAL.F_EnableAccessibility=function(_1f,_20){ this.M_oLibraries["hal"]["enableAccessibility"]=_1f; if(!_1f&&!G_BrowserInfo.M_bIsIE&&!_20){ var _21=U_DOM.F_GetStyleSheet("idHalBrowserStyles"); if(_21){ _21.addRule("*:focus","outline:none"); } } }; G_HAL.F_EnableAllAnimation=function(_22){ G_HAL.M_oLibraries["hal"]["enableDialogShowAnimation"]=_22; G_HAL.M_oLibraries["hal"]["enableDialogMoveAnimation"]=_22; G_HAL.M_oLibraries["hal"]["enableDialogResizeAnimation"]=_22; G_HAL.M_oLibraries["hal"]["menuAnimation"]=_22; G_HAL.M_oLibraries["hal"]["enableComboBoxAnimation"]=_22; G_HAL.M_oLibraries["hal"]["enablePaneAnimation"]=_22; }; G_HAL.F_SetTestListener=function(_23){ G_HAL.M_oTestListener=_23; }; G_HAL.F_RemoveTestListener=function(){ delete G_HAL.M_oTestListener; }; var G_BrowserInfo={}; G_BrowserInfo.M_bIsGecko=false; G_BrowserInfo.M_bIsFirefox=false; G_BrowserInfo.M_bIsIE=false; G_BrowserInfo.M_bIsWebKit=false; G_BrowserInfo.M_bIsSupported=false; G_BrowserInfo.M_bIsSupportedIE=false; G_BrowserInfo.M_bIsSupportedFirefox=false; G_BrowserInfo.f_init=function(){ var _24=navigator.userAgent.toLowerCase(); this.M_bIsIPhone=_24.indexOf("iphone")!=-1; this.M_bIsIPod=_24.indexOf("ipod")!=-1; this.M_bIsIPad=_24.indexOf("ipad")!=-1; this.M_bIsIOS=this.M_bIsIPhone||this.M_bIsIPod||this.M_bIsIPad; this.M_bIsAndroid=_24.indexOf("android")!=-1; this.M_bIsWebKit=_24.indexOf("webkit")!=-1; this.M_bIsChrome=_24.indexOf("chrome")!=-1; this.M_bIsAndroidBrowser=this.M_bIsAndroid&&!this.M_bIsChrome; this.M_bIsGecko=!this.M_bIsWebKit&&(navigator.product=="Gecko"); this.M_bIsPointerEnabled=G_HAL.M_oLibraries["hal"]["enablePointerSupport"]&&navigator.msPointerEnabled; this.M_bIsTouchDevice=this.M_bIsIOS||this.M_bIsAndroid||(navigator.msMaxTouchPoints>1); this.M_bIsFirefox=(_24.match(/firefox|minefield|shiretoko|namoroka/)!=null); var _25=0; if(_24.search(/(?:firefox|minefield|shiretoko|namoroka)\/([0-9]+\.[0-9]+)/)!=-1){ _25=parseFloat(RegExp.$1); } this.M_bIsSupportedFirefox=(this.M_bIsFirefox&&(_25>=1.5)); this.M_bFirefox3OrLater=(this.M_bIsFirefox&&(_25>=3)); this.M_bFirefox4OrLater=(this.M_bIsFirefox&&(_25>=4)); this.M_bFirefox13OrLater=(this.M_bIsFirefox&&(_25>=13)); this.M_bFirefox35OrLater=(this.M_bIsFirefox&&(_25>=3.5)); this.M_bIsIE=((_24.indexOf("msie")!=-1)&&(_24.indexOf("opera")==-1)); var _26=0; if(_24.search(/msie\s+([0-9]+\.[0-9]+)/)!=-1){ _26=RegExp.$1; } var _27=parseInt(navigator.appVersion); var _28=(_24.search(/trident\/([0-9]+\.[0-9]+)/)!=-1)?parseFloat(RegExp.$1):NaN; this.M_bIsIE6=(this.M_bIsIE&&(_26>=6)&&(_26<7)); this.M_bIE8OrLater=(this.M_bIsIE&&((_26>=8)||(!isNaN(_28)&&(_28>=4)))); this.M_bIE9OrLater=(this.M_bIE8OrLater&&(!isNaN(_28)&&(_28>=5))); this.M_bIE10OrLater=(this.M_bIE9OrLater&&(!isNaN(_28)&&(_28>=6))); this.M_bIsSupportedIE=(this.M_bIsIE&&_26>=6); this.M_bIsHtml5QuirksMode=(this.M_bIE10OrLater&&(document.documentMode==10)&&(document.compatMode=="BackCompat")); this.M_bIsIE5QuirksMode=(this.M_bIsIE&&!this.M_bIsHtml5QuirksMode); var _29=0; if(_24.match(/chrome/)!=null&&_24.search(/chrome\/([0-9]+\.[0-9]+)/)!=-1){ _29=RegExp.$1; } var _2a=0; if(_24.match(/safari/)!=null&&_24.search(/version\/([0-9]+\.[0-9]+)/)!=-1){ _2a=RegExp.$1; } this.M_bIsChrome21OrLater=(_29>=21); this.M_bIsSafari5OrLater=(_2a>=5); this.M_bIsSupported=(this.M_bIsSupportedIE||this.M_bIsSupportedFirefox||this.M_bIsChrome21OrLater||this.M_bIsSafari5OrLater); }; G_BrowserInfo.f_init(); var U_DOM={}; U_DOM.K_iKeyBackSpace=8; U_DOM.K_iKeyTab=9; U_DOM.K_iKeyEnter=13; U_DOM.K_iKeyEscape=27; U_DOM.K_iKeySpace=32; U_DOM.K_iKeyPgUp=33; U_DOM.K_iKeyPgDn=34; U_DOM.K_iKeyEnd=35; U_DOM.K_iKeyHome=36; U_DOM.K_iKeyArrowLeft=37; U_DOM.K_iKeyArrowUp=38; U_DOM.K_iKeyArrowRight=39; U_DOM.K_iKeyArrowDown=40; U_DOM.K_iKeyInsert=45; U_DOM.K_iKeyDelete=46; U_DOM.K_iKeyA=65; U_DOM.K_iKeyF5=116; U_DOM.K_iKeyF1=112; U_DOM.K_iKeyF10=121; U_DOM.K_iKeyPlus=107; U_DOM.K_iKeyMinus=109; U_DOM.K_iLeftMouseButton=G_BrowserInfo.M_bIsIE5QuirksMode?1:0; U_DOM.K_iRightMouseButton=2; U_DOM.F_CancelEvent=function(e){ e=e||window.event; e.returnValue=false; e.cancelBubble=true; }; U_DOM.F_CancelBubble=function(e){ (e||window.event).cancelBubble=true; }; U_DOM.F_CancelKeyboardEvent=function(e){ e.returnValue=false; try{ e.keyCode=0; } catch(e){ } e.cancelBubble=true; }; U_DOM.F_DeleteTableRows=function(tbl){ if(tbl.rows){ for(var i=tbl.rows.length-1;i>=0;i--){ tbl.deleteRow(i); } } }; U_DOM.F_SetActiveOrFocus=function(el){ try{ if(G_BrowserInfo.M_bIsIE){ el.setActive(); }else{ if(el.focus){ el.focus(); }else{ G_Debug.F_Print("focus not supported on "+el.tagName); G_Debug.F_Assert(false); } } } catch(e){ } }; U_DOM.F_RemoveAllChildren=function(_2b){ if(!_2b){ return; } var _2c=null; for(var i=_2b.childNodes.length-1;i>=0;i--){ _2c=_2b.childNodes[i]; _2b.removeChild(_2c); _2c=null; } }; U_DOM.F_GetNextSiblingElement=function(el){ for(var _2d=el.nextSibling;_2d;_2d=_2d.nextSibling){ if(_2d.nodeType==U_XML.K_iNODE_ELEMENT){ return _2d; } } return null; }; U_DOM.F_HandleContextMenu=function(e){ e=e||window.event; if(!U_DOM.F_IsSelectable(e.srcElement)){ U_DOM.F_CancelEvent(e); return false; } return true; }; U_DOM.F_HandleSelectStart=function(e){ e=e||window.event; if(!U_DOM.F_IsSelectable(e.srcElement)){ U_DOM.F_CancelEvent(e); return false; } return true; }; U_DOM.F_IsSelectable=function(el){ if(el.getAttribute){ switch(el.getAttribute("HAL_isSelectable")){ case "true": return true; case "false": return false; } } switch(el.nodeName){ case "TEXTAREA": return true; case "INPUT": return (el.type=="text"); } return false; }; U_DOM.F_HasCaret=function(el){ if(G_BrowserInfo.M_bIsIE){ return (document.selection.createRange().parentElement()==el); } return (((window.s_IdCurrentTextBox!="")&&(window.s_IdCurrentTextBox==el.id))||(window.h_elActiveElement&&(window.h_elActiveElement==el)&&U_DOM.F_IsTextBoxOrTextArea(el))); }; U_DOM.F_GetSelectedTextPosition=function(_2e){ var _2f; var _30; if(G_BrowserInfo.M_bIsIE){ var _31=document.selection.createRange(); if(_31.parentElement()!=_2e){ return null; } var _32=_31.duplicate(); _32.moveToElementText(_2e); _32.setEndPoint("EndToStart",_31); _2f=_32.text.length-this.f_getNewLinesCount(_32.text); _30=_2f+_31.text.length-this.f_getNewLinesCount(_31.text); }else{ _2f=_2e.selectionStart; _30=_2e.selectionEnd; } return {M_iStart:_2f,M_iEnd:_30}; }; U_DOM.f_getNewLinesCount=function(_33){ var i=0; var _34=-1; do{ i=_33.indexOf("\r\n",i); _34++; }while(i++>=0); return _34; }; U_DOM.F_IsTextSelected=function(){ if(G_BrowserInfo.M_bIsIE){ return (document.selection.type=="Text")&&(document.selection.createRange().text.length>0); } if(window.getSelection()!=""){ return true; } if(window.s_IdCurrentTextBox){ var _35=document.getElementById(window.s_IdCurrentTextBox); return Boolean(_35&&(_35.selectionStart!=_35.selectionEnd)); } return false; }; U_DOM.F_GetSelectedText=function(){ if(G_BrowserInfo.M_bIsIE){ return document.selection.createRange().text; } if(window.getSelection()!=""){ return window.getSelection().toString(); } if(window.s_IdCurrentTextBox){ var _36=document.getElementById(window.s_IdCurrentTextBox); if(_36){ return _36.value.substring(_36.selectionStart,_36.selectionEnd); } } }; U_DOM.F_ClearSelection=function(){ if(window.getSelection){ window.getSelection().removeAllRanges(); }else{ if(document.selection){ document.selection.empty(); } } }; U_DOM.F_SetSelectionRange=function(_37,_38,_39){ if(G_BrowserInfo.M_bIsIE){ var rng=_37.createTextRange(); rng.collapse(true); rng.moveEnd("character",_39); rng.moveStart("character",_38); rng.select(); }else{ _37.focus(); if(_37.setSelectionRange){ _37.setSelectionRange(_38,_39); }else{ G_Debug.F_Print("U_DOM.F_SetSelectionRange (non-ie): This should only be called for textareas and text boxes, not for "+_37.tagName); } } }; U_DOM.F_MoveCaretToMousePos=function(_3a,e){ if(G_BrowserInfo.M_bIsIE){ var rng=_3a.createTextRange(); rng.moveToPoint(e.x,e.y); rng.select(); }else{ if(G_BrowserInfo.M_bFirefox3OrLater){ _3a.focus(); G_Debug.F_Print("Unable to determine cursor position with Firefox 3"); }else{ if(e.rangeParent&&e.rangeParent!=null){ _3a.focus(); var _3b=0; try{ _3b=e.rangeOffset; _3b=this.f_findLocation(e.rangeParent,e.rangeOffset); } catch(ex){ G_Debug.F_Print("U_DOM.F_MoveCaretToMousePos: selection failed: "+ex); _3b=e.srcElement.selectionStart; } _3a.setSelectionRange(_3b,_3b); }else{ G_Debug.F_Print("U_DOM.F_MoveCaretToMousePos: selection failed"); } } } }; U_DOM.f_findLocation=function(_3c,_3d){ while(_3c.previousSibling){ _3c=_3c.previousSibling; if(_3c.length){ _3d+=_3c.length; }else{ _3d+=1; } } return _3d; }; U_DOM.F_ReplaceTextSelection=function(_3e,_3f){ if(G_BrowserInfo.M_bIsIE){ var rng=document.selection.createRange(); var _40=(rng.text==""); rng.text=_3e; if(!_40&&_3f){ rng.moveStart("character",-_3e.length); rng.select(); } return; } var _41=null; if(window.s_IdCurrentTextBox!=""){ _41=document.getElementById(window.s_IdCurrentTextBox); }else{ if(window.h_elActiveElement&&window.h_elActiveElement.tagName=="TEXTAREA"||(window.h_elActiveElement.tagName=="INPUT"&&window.h_elActiveElement.type=="text")){ _41=window.h_elActiveElement; } } if(_41){ var _42=_41.selectionStart; var _43=_41.selectionEnd; _41.value=_41.value.substring(0,_42)+_3e+_41.value.substring(_43); var _44=_42+_3e.length; if(_3f){ U_DOM.F_SetSelectionRange(_41,_42,_44); }else{ U_DOM.F_SetSelectionRange(_41,_44,_44); } }else{ if(window.getSelection()!=""){ var _45=window.getSelection().getRangeAt(0); if(_45.startContainer!=_45.endContainer){ G_Debug.F_Print("U_DOM.F_ReplaceTextSelection does not support selection across elements"); return; } var _46=_45.startContainer.nodeValue; var _47=_45.endOffset; var _48=_46.substring(_45.startOffset,_47); var _49=_46.substring(0,_45.startOffset); var _4a=_46.substring(_47); _45.startContainer.nodeValue=_49+_3e+_4a; if(_3f){ _45.selectNode(_45.startContainer.parentNode); } } } }; U_DOM.F_IsTextBoxOrTextArea=function(el){ if(!el){ return false; } if(el.tagName=="INPUT"&&el.type=="text"){ return true; } return (el.tagName=="TEXTAREA"); }; U_DOM.F_HandleTab=function(e){ e=e||window.event; this.F_CancelEvent(e); if(G_BrowserInfo.M_bIsIE){ if(document.selection.type=="Text"){ document.selection.clear(); } document.selection.createRange().text=String.fromCharCode(e.keyCode); }else{ if(this.F_IsTextBoxOrTextArea(e.srcElement)){ var _4b=e.srcElement; var _4c=_4b.selectionStart; var _4d=_4b.selectionEnd; _4b.value=_4b.value.substring(0,_4c)+String.fromCharCode(e.keyCode)+_4b.value.substring(_4d); var _4e=String.fromCharCode(e.keyCode).length; this.F_SetSelectionRange(_4b,_4d+_4e,_4d+_4e); }else{ G_Debug.F_Print("U_DOM.F_HandleTab (non IE) only works for text areas and text inputs, not "+e.srcElement.tagName); } } }; U_DOM.F_IsVisible=function(el){ if(el.currentStyle.visibility=="visible"){ return true; } if(el.currentStyle.visibility=="hidden"){ return false; } return (!el.parentNode||!el.parentNode.currentStyle||this.F_IsVisible(el.parentNode)); }; U_DOM.F_IsDisplayNone=function(el){ for(;el&&el.currentStyle;el=el.parentNode){ if(el.currentStyle.display=="none"){ return true; } } return false; }; U_DOM.F_SetRadioButtonEnabled=function(_4f,_50){ _4f.disabled=!_50; var _51=_4f.parentElement; if(_51.tagName=="LABEL"){ _51.disabled=!_50; if(!G_BrowserInfo.M_bIsIE){ _51.setAttribute("HAL_disabled",_50?"false":"true"); } } U_Accessibility.F_SetAriaStateAndProperty(_4f,"aria-disabled",!_50); }; U_DOM.F_SetCheckboxEnabled=function(_52,_53){ _52.disabled=!_53; var _54=_52.parentElement; if(_54.tagName=="LABEL"){ _54.disabled=!_53; if(!G_BrowserInfo.M_bIsIE){ _54.setAttribute("HAL_disabled",_53?"false":"true"); } } U_Accessibility.F_SetAriaStateAndProperty(_52,"aria-disabled",!_53); }; U_DOM.F_SetTextEnabled=function(_55,_56){ _55.disabled=!_56; if(!G_BrowserInfo.M_bIsIE){ _55.setAttribute("HAL_disabled",_56?"false":"true"); } U_Accessibility.F_SetAriaStateAndProperty(_55,"aria-disabled",!_56); if(G_HAL.M_oLibraries["hal"]["enableAccessibility"]){ var _57=_55.getAttribute("tabIndex"); if(_57=="0"&&!_56){ U_Accessibility.F_SetTabIndex(_55,"-1"); }else{ if(_57=="-1"&&_56){ U_Accessibility.F_RestoreIndex(_55); } } } }; U_DOM.F_SetTextInputEnabled=function(_58,_59){ _58.disabled=!_59; if(!G_BrowserInfo.M_bIsIE){ _58.setAttribute("HAL_disabled",_59?"false":"true"); } U_Accessibility.F_SetAriaStateAndProperty(_58,"aria-disabled",!_59); }; U_DOM.F_SetButtonEnabled=function(_5a,_5b,_5c){ var btn=document.getElementById(_5a); var _5d=!btn.disabled; this.F_SetButtonEnabledFromButton(btn,_5b,_5c); if(G_HAL.M_oTestListener&&G_HAL.M_oTestListener.F_DOM_OnButtonEnabled&&(_5d!=Boolean(_5b))){ G_HAL.M_oTestListener.F_DOM_OnButtonEnabled(_5a,_5b); } }; U_DOM.F_SetButtonEnabledFromButton=function(btn,_5e,_5f){ if(!btn){ return; } var _60=!_5e; if((_60!=btn.disabled)||(btn.getAttribute("v_sImage")!=_5f)){ if(_5f){ btn.setAttribute("v_sImage",_5f); var nl=btn.getElementsByTagName("IMG"); if(nl.length>0){ var _61=btn.disabled; if(_61){ btn.disabled=false; if(!G_BrowserInfo.M_bIsIE){ btn.setAttribute("HAL_disabled","false"); } } var _62=(_60?"_disabled.gif":".gif"); var _63=nl.item(0); var _64=nl.item(nl.length-1); _63.src=G_HAL.F_GetImageURL(_5f+_62); if(_64.src.indexOf("dropdown_arrow")!=-1){ _64.src=U_HighContrast.F_GetHighContrastImgIfNecessary(G_HAL.M_sImagePath+"dropdown_arrow"+_62); } if(btn.getAttribute("v_sButtonType")=="tblDropdown"){ btn.nextSibling.disabled=_60; btn.nextSibling.firstChild.src=U_HighContrast.F_GetHighContrastImgIfNecessary(G_HAL.M_sImagePath+"dropdown_arrow"+_62); } if(_61){ btn.disabled=true; if(!G_BrowserInfo.M_bIsIE){ btn.setAttribute("HAL_disabled","true"); } } if(_60&&(btn.getAttribute("HAL_isCoolButton")=="true")){ btn.className=btn.v_sClassPrefix; } } } btn.disabled=_60; if(!G_BrowserInfo.M_bIsIE){ btn.setAttribute("HAL_disabled",_60?"true":"false"); } if(btn.v_bIsDlgButton){ var _65=btn.v_sClassPrefix; if(btn.v_bIsDotDotDotButton||btn.v_bIsDlgButtonDropDownArrow){ btn.className=_65+(_60?"_disabled":""); }else{ btn.className=(_60?_65+" "+_65+"_disabled":_65); } } } U_Accessibility.F_SetAriaStateAndProperty(btn,"aria-disabled",!_5e); }; U_DOM.F_SetFirstClassName=function(el,_66){ var i=el.className.indexOf(" "); el.className=_66+((i==-1)?"":el.className.substring(i)); }; U_DOM.F_GetFirstClassName=function(el){ if(!el.className){ return ""; } var i=el.className.indexOf(" "); return (i==-1)?el.className:el.className.substr(0,i); }; U_DOM.F_ShowChildWindow=function(_67,_68,_69,_6a,_6b,_6c,_6d,_6e){ var _6f=_6a?_6a.width:700; var _70=_6a?_6a.height:250; var _71=_6b?_6b.top:Math.F_NonNeg(screen.availHeight-_70); var _72=_6b?_6b.left:Math.F_NonNeg(screen.availWidth-_6f); if(_6c){ _72=(document.body.clientWidth/2)-(_6f/2); _71=(document.body.clientHeight/2)-(_70/2); } if(_6e){ var _73=""; for(var i=0;i"; } } } var _74=_6d?"yes":"no"; var _75=false; if(G_BrowserInfo.M_bIsIE){ try{ _75=true; var _76=window.showModelessDialog(G_HAL.F_GetFileURL("hal/blank.htm"),document,"edge:sunken; dialogWidth:"+_6f+"px; dialogHeight:"+_70+"px; resizable:"+_74+"; status:no; dialogTop:"+_71+"; dialogLeft:"+_72); } catch(e){ _75=false; } } if(!_75){ var _76=window.open("","","directories=no,location=no,status=no,toolbar=no,resizable="+_74+",scrollbars=yes,dependent=yes,height="+_70+",width="+_6f+",top="+_71+",left="+_72); if(this.F_WindowOpenWasBlocked(_76)){ return null; } } var _77=[]; _77.push(""+_68+"                                                                                                                                         "); _77.push(_73); _77.push(""); _77.push(_67); _77.push(""); _76.document.open(); _76.document.write(_77.join("")); _76.document.close(); _76.document.title=_68+" "; _76.focus(); return _76; }; U_DOM.F_IsInElement=function(e,el){ var _78=this.F_GetRelativeOffset(el,el.ownerDocument.body); return Math.F_PointInRect(e.clientY+el.ownerDocument.body.scrollTop,e.clientX+el.ownerDocument.body.scrollLeft,_78.top,_78.left,el.offsetWidth,el.offsetHeight); }; U_DOM.F_GetOffsetTop=function(el){ if(G_BrowserInfo.M_bIsIE){ return el.offsetTop; } if(el.offsetParent&&el.offsetParent.currentStyle.overflow!="hidden"){ return (el.offsetTop-this.F_GetBorderTopWidth(el.offsetParent)); } return el.offsetTop; }; U_DOM.F_GetOffsetLeft=function(el){ if(G_BrowserInfo.M_bIsIE){ return el.offsetLeft; } if(el.offsetParent&&el.offsetParent.currentStyle.overflow!="hidden"){ return (el.offsetLeft-this.F_GetBorderLeftWidth(el.offsetParent)); } return el.offsetLeft; }; U_DOM.F_GetHorizontalBorderWidth=function(el){ return this.F_GetBorderLeftWidth(el)+this.F_GetBorderRightWidth(el); }; U_DOM.F_GetVerticalBorderWidth=function(el){ return this.F_GetBorderTopWidth(el)+this.F_GetBorderBottomWidth(el); }; U_DOM.F_GetBorderTopWidth=function(el){ return this.f_getBorderValue(el,"Top"); }; U_DOM.F_GetBorderRightWidth=function(el){ return this.f_getBorderValue(el,"Right"); }; U_DOM.F_GetBorderBottomWidth=function(el){ return this.f_getBorderValue(el,"Bottom"); }; U_DOM.F_GetBorderLeftWidth=function(el){ return this.f_getBorderValue(el,"Left"); }; U_DOM.f_getBorderValue=function(el,_79){ var _7a=el.currentStyle["border"+_79+"Width"]; var _7b=parseInt(_7a,10); if(isNaN(_7b)){ return ((_7a=="medium")&&(el.currentStyle["border"+_79+"Style"]!="none"))?4:0; } return _7b; }; U_DOM.F_GetVerticalPadding=function(el){ return parseInt(el.currentStyle.paddingTop,10)+parseInt(el.currentStyle.paddingBottom,10); }; U_DOM.F_GetHorizontalPadding=function(el){ return parseInt(el.currentStyle.paddingLeft,10)+parseInt(el.currentStyle.paddingRight,10); }; U_DOM.F_GetContentDimensions=function(el){ return (new C_Dimension(el.offsetHeight,el.offsetWidth)).F_Subtract(this.F_GetNonContentDimensions(el)); }; U_DOM.F_GetNonContentDimensions=function(el){ return new C_Dimension(this.F_GetVerticalPadding(el)+this.F_GetVerticalBorderWidth(el),this.F_GetHorizontalPadding(el)+this.F_GetHorizontalBorderWidth(el)); }; U_DOM.F_SetOpacity=function(el,_7c){ el.style[G_BrowserInfo.M_bIsIE5QuirksMode?"filter":"opacity"]=G_BrowserInfo.M_bIsIE5QuirksMode?("progid:DXImageTransform.Microsoft.Alpha(opacity="+_7c+");"):(_7c/100); }; U_DOM.F_RemoveOpacity=function(el){ if(G_BrowserInfo.M_bIsIE5QuirksMode){ el.style.removeAttribute("filter"); }else{ el.style.opacity=""; } }; U_DOM.F_GetBasePath=function(d){ var re=/^(\/.*?)\//; re.test((d||document).location.pathname); return RegExp.$1; }; U_DOM.F_NumbersOnlyOnChange=function(e,_7d,_7e,_7f,_80){ e=e||window.event; var txt=e.srcElement; if(G_HAL.M_oLibraries["hal"]["enableAccessibility"]){ this.F_ValidateNumberInput(txt,_7e,_7d,_7f,_80); return; } switch(_7e){ case "integer": txt.value=txt.value.replace(_7d?/[^0-9-]/g:/[^0-9]/g,""); break; case "float": txt.value=txt.value.replace(_7d?/[^0-9.,-eE]/g:/[^0-9.,eE]/g,""); break; case "decimal": default: txt.value=txt.value.replace(_7d?/[^0-9.,-]/g:/[^0-9.,]/g,""); break; } }; U_DOM.F_NumbersOnlyOnKeyPress=function(e,_81,_82){ e=e||window.event; if(e.ctrlKey){ return; } var _83=e.keyCode; if(!G_BrowserInfo.M_bIsIE){ _83=e.charCode; if(_83==0){ return; } } switch(_83){ case this.K_iKeyEnter: case this.K_iKeyEscape: case 190: return; case 44: case 46: if(_82=="integer"){ break; } return; case 69: case 101: if(_82=="float"){ return; } break; case 45: if(_82=="float"){ return; } if(_81){ return; } } if(!G_HAL.M_oLibraries["hal"]["enableAccessibility"]){ if((_83<"0".charCodeAt(0))||(_83>"9".charCodeAt(0))){ e.returnValue=false; if(G_BrowserInfo.M_bIsIE){ e.keyCode=0; } e.cancelBubble=true; } } }; U_DOM.F_PercentOnlyOnChange=function(e,_84,_85,_86){ e=e||window.event; var txt=e.srcElement; _86=_86||100; if(G_HAL.M_oLibraries["hal"]["enableAccessibility"]){ this.F_ValidateNumberInput(txt,_85,_84,_86); return; } switch(_85){ case "integer": txt.value=txt.value.replace(_84?/[^0-9-]/g:/[^0-9]/g,""); var _87=parseInt(txt.value,10); if(_87>_86){ txt.value=_86.toString(10); } break; case "decimal": default: txt.value=txt.value.replace(_84?/[^0-9.,-]/g:/[^0-9.,]/g,""); var _88=parseFloat(txt.value,10); if(_88>_86){ txt.value=_86.toString(10); } break; } }; U_DOM.F_NumbersOnlyOnChangeHandler=function(e){ U_DOM.F_NumbersOnlyOnChange(e); }; U_DOM.F_NumbersOnlyOnKeyPressHandler=function(e){ U_DOM.F_NumbersOnlyOnKeyPress(e); }; function C_Position(_89,_8a){ this.left=_89; this.top=_8a; }; C_Position.prototype.F_Add=function(_8b){ return new C_Position(this.left+_8b.left,this.top+_8b.top); }; C_Position.prototype.F_Subtract=function(_8c){ return new C_Position(this.left-_8c.left,this.top-_8c.top); }; function C_Dimension(_8d,_8e){ this.height=_8d?_8d:0; this.width=_8e?_8e:0; }; C_Dimension.prototype.F_Add=function(_8f){ return new C_Dimension(this.height+_8f.height,this.width+_8f.width); }; C_Dimension.prototype.F_Subtract=function(_90){ return new C_Dimension(Math.F_NonNeg(this.height-_90.height),Math.F_NonNeg(this.width-_90.width)); }; function C_Rectangle(_91,_92,_93,_94){ this.left=_91; this.top=_92; this.right=_93; this.bottom=_94; this.width=_93-_91; this.height=_94-_92; }; C_Rectangle.prototype.F_Subtract=function(_95){ return new C_Rectangle(this.left-_95.left,this.top-_95.top,this.right-_95.right,this.bottom-_95.bottom); }; C_Rectangle.prototype.F_Add=function(_96){ return new C_Rectangle(this.left+_96.left,this.top+_96.top,this.right+_96.right,this.bottom+_96.bottom); }; C_Rectangle.prototype.F_GetWidth=function(){ return (this.right-this.left); }; C_Rectangle.prototype.F_GetHeight=function(){ return (this.bottom-this.top); }; C_Rectangle.prototype.F_Intersects=function(_97){ return (Math.F_PointInRect(this.top,this.left,_97.top,_97.left,_97.width,_97.height)||Math.F_PointInRect(this.top,this.right,_97.top,_97.left,_97.width,_97.height)||Math.F_PointInRect(this.bottom,this.left,_97.top,_97.left,_97.width,_97.height)||Math.F_PointInRect(this.bottom,this.right,_97.top,_97.left,_97.width,_97.height)||Math.F_PointInRect(_97.top,_97.left,this.top,this.left,this.width,this.height)||Math.F_PointInRect(_97.top,_97.right,this.top,this.left,this.width,this.height)||Math.F_PointInRect(_97.bottom,_97.left,this.top,this.left,this.width,this.height)||Math.F_PointInRect(_97.bottom,_97.right,this.top,this.left,this.width,this.height)); }; function C_Polygon(_98){ this.m_aCoords=_98; }; C_Polygon.prototype.F_GetLeft=function(){ var _99=Infinity; for(var i=0;i_9c){ _9c=this.m_aCoords[i].left; } if(this.m_aCoords[i].left<_9b){ _9b=this.m_aCoords[i].left; } } return (_9c-_9b); }; C_Polygon.prototype.F_GetHeight=function(){ var _9d=Infinity; var _9e=-Infinity; for(var i=0;i_9e){ _9e=this.m_aCoords[i].top; } if(this.m_aCoords[i].top<_9d){ _9d=this.m_aCoords[i].top; } } return (_9e-_9d); }; C_Polygon.prototype.F_IsInRect=function(_9f){ var _a0=this.F_GetLeft(); if(_9f.left>=_a0&&_9f.left<=(_a0+this.F_GetWidth())){ var _a1=this.F_GetTop(); if(_9f.top>=_a1&&_9f.top<=(_a1+this.F_GetHeight())){ return true; } } return false; }; C_Polygon.prototype.F_IsInPolygon=function(_a2){ if(!this.F_IsInRect(_a2)){ return false; } var _a3=0; var j=this.m_aCoords.length-1; for(var i=0;i=this.m_aCoords[i].left&&_a5<=this.m_aCoords[j].left)||(_a5>=this.m_aCoords[j].left&&_a5<=this.m_aCoords[i].left)){ if(_a5<_a2.left){ if(_a2.top==this.m_aCoords[i].top){ if(this.m_aCoords[j].top>_a2.top){ _a3++; } }else{ if(_a2.top==this.m_aCoords[j].top){ if(this.m_aCoords[i].top>_a2.top){ _a3++; } }else{ _a3++; } } } } }else{ if(_a4==0){ j=i; continue; }else{ var _a5=this.m_aCoords[i].left; var _a6=_a2.top; if((_a6>=this.m_aCoords[i].top&&_a6<=this.m_aCoords[j].top)||(_a6>=this.m_aCoords[j].top&&_a6<=this.m_aCoords[i].top)){ if(_a5<_a2.left){ if(_a6==this.m_aCoords[i].top){ if(this.m_aCoords[j].top>_a2.top){ _a3++; } }else{ if(_a6==this.m_aCoords[j].top){ if(this.m_aCoords[i].top>_a2.top){ _a3++; } }else{ _a3++; } } } } } } j=i; } return Boolean(_a3%2); }; U_DOM.F_GetBoundingRect=function(el,_a7){ var _a8=this.F_GetRelativeOffset(el,_a7||el.ownerDocument.body); return new C_Rectangle(_a8.left,_a8.top,_a8.left+el.offsetWidth,_a8.top+el.offsetHeight); }; U_DOM.F_GetBoundingRectForElements=function(_a9,_aa){ var _ab=U_DOM.F_GetRelativeOffset(_a9[0],_aa); var _ac=_ab.top; var _ad=_ab.left; var _ae=_ac+_a9[0].offsetHeight; var _af=_ad+_a9[0].offsetWidth; var _b0=_a9.length; for(var i=1;i<_b0;i++){ var el=_a9[i]; var _ab=U_DOM.F_GetRelativeOffset(el,_aa); if(_ab.top<_ac){ _ac=_ab.top; } if(_ab.left<_ad){ _ad=_ab.left; } var _b1=_ab.top+el.offsetHeight; if(_b1>_ae){ _ae=_b1; } var _b2=_ab.left+el.offsetWidth; if(_b2>_af){ _af=_b2; } } return new C_Rectangle(_ad,_ac,_af,_ae); }; U_DOM.F_GetRelativeOffset=function(el,_b3){ if(G_BrowserInfo.M_bIsIE||G_BrowserInfo.M_bIsWebKit){ var _b4=el.getBoundingClientRect(); var _b5=new C_Position(_b4.left,_b4.top); if(_b3){ var _b6=_b3.getBoundingClientRect(); _b5.top-=_b6.top; _b5.left-=_b6.left; if(_b3.tagName!="BODY"){ _b5.top-=this.F_GetBorderTopWidth(_b3); _b5.left-=this.F_GetBorderLeftWidth(_b3); } if(_b3.scrollLeft){ _b5.left+=_b3.scrollLeft; } if(_b3.scrollTop){ _b5.top+=_b3.scrollTop; } } return _b5; } var _b7=el.ownerDocument.body; if(!_b3){ _b3=_b7; } if(!G_BrowserInfo.M_bIsIE){ return this.f_getRelativeOffsetFirefox(el,_b3); } }; U_DOM.f_getOffsetFromHtml=function(el,_b8){ var _b9=el.ownerDocument.body; if((el==_b9)||(el.nodeName=="HTML")||(el.nodeName=="#document")){ return new C_Position(0,0); } var _ba=el.getBoundingClientRect(); var _bb=Math.round(_ba.left); var _bc=Math.round(_ba.top); var _bd=el.parentNode; if(G_BrowserInfo.M_bFirefox3OrLater){ return new C_Position(_bb,_bc); } var _be=(el!=_b8); while(_bd&&(_bd!=_b9)){ if(_bd!=_b8&&_bd.currentStyle.overflow!="visible"){ _bb-=_bd.scrollLeft; _bc-=_bd.scrollTop; } if(_bd.currentStyle.overflow!="visible"){ _bc+=this.F_GetBorderTopWidth(_bd); _bb+=this.F_GetBorderLeftWidth(_bd); } _bd=_bd.parentNode; } if(_be){ _bb-=this.F_GetBorderLeftWidth(el); var _bf=this.F_GetBorderTopWidth(el); _bc-=_bf; } return new C_Position(_bb,_bc); }; U_DOM.f_getRelativeOffsetFirefox=function(el,_c0){ var _c1=U_DOM.f_getOffsetFromHtml(el,_c0); if(_c0!=el.ownerDocument.body){ var _c2=U_DOM.f_getOffsetFromHtml(_c0,_c0); var _c3=_c1.left-_c2.left; var _c4=_c1.top-_c2.top; if(G_BrowserInfo.M_bFirefox3OrLater){ _c3-=this.F_GetBorderLeftWidth(_c0); _c4-=this.F_GetBorderTopWidth(_c0); } }else{ var _c3=_c1.left; var _c4=_c1.top; } if(G_BrowserInfo.M_bFirefox3OrLater){ if(_c0.scrollLeft){ _c3+=_c0.scrollLeft; } if(_c0.scrollTop){ _c4+=_c0.scrollTop; } } return new C_Position(_c3,_c4); }; U_DOM.m_iUniqueIdCounter=1; U_DOM.F_GetUniqueId=function(_c5,d){ if(!_c5){ return ("hal__dom__uniqueID__"+this.m_iUniqueIdCounter++); } var _c6=_c5; if(!d){ d=document; } var i=1; while(d.getElementById(_c6)){ _c6=_c5+i++; } return _c6; }; U_DOM.F_GetStyleSheet=function(_c7,d){ if(!d){ d=document; } if(G_BrowserInfo.M_bIsIE){ return d.styleSheets(_c7); } var _c8=d.getElementById(_c7); return _c8?_c8.sheet:null; }; U_DOM.F_AddScript=function(_c9,d){ if(!d){ d=document; } var _ca=d.getElementsByTagName("HEAD").item(0).appendChild(d.createElement("SCRIPT")); _ca.text=_c9; return _ca; }; U_DOM.F_LoadScript=function(_cb,_cc,d){ if(!d){ d=document; } var _cd=d.createElement("script"); _cd.type="text/javascript"; if(_cc){ if(_cd.readyState){ _cd.onreadystatechange=function(){ if(_cd.readyState=="loaded"||_cd.readyState=="complete"){ _cd.onreadystatechange=null; _cc(); } }; }else{ _cd.onload=_cc; } } _cd.src=_cb; d.getElementsByTagName("head")[0].appendChild(_cd); }; U_DOM.F_ShowEventBlocker=function(_ce){ if(!this.m_divEventBlocker){ this.m_divEventBlocker=document.body.appendChild(document.createElement("DIV")); this.m_divEventBlocker.onkeydown=this.f_stopTabKey; this.m_divEventBlocker.className="clsBlocker"; } this.m_divEventBlocker.style.zIndex=_ce; this.m_divEventBlocker.style.visibility="visible"; return this.m_divEventBlocker; }; U_DOM.F_HideEventBlocker=function(){ if(this.m_divEventBlocker){ this.m_divEventBlocker.style.visibility="hidden"; var _cf=["onmousedown","onmouseup","onmousemove","onclick","ondblclick","onmouseover","onmouseout"]; for(var i=0;i<_cf.length;i++){ this.m_divEventBlocker[_cf[i]]=null; } } }; U_DOM.f_stopTabKey=function(e){ e=e||window.event; if(e.keyCode==U_DOM.K_iKeyTab){ U_DOM.F_CancelEvent(e); } }; U_DOM.F_EmptyFunction=function(){ }; U_DOM.F_GetPropertyInTryCatch=function(o,_d0){ try{ return o[_d0]; } catch(e){ G_Debug.F_Print("U_DOM.F_GetPropertyInTryCatch caught exception accessing o["+_d0+"]"); return null; } }; U_DOM.F_SetColorButtonColor=function(btn,_d1,_d2){ if(btn){ var div=btn.getElementsByTagName("DIV").item(0); div.className=(_d1=="transparent")?"clsColorButtonDIV_transparent":"clsColorButtonDIV_normal"; div.style.backgroundColor=_d1?_d1:""; if(_d2){ div.innerText=_d2; } if(G_HAL.M_oLibraries["hal"]["enableAccessibility"]&&_d1){ U_Accessibility.F_AddAriaHiddenSpan(btn,"aria-describedby",this.F_GetColorAriaLabel(_d1)); } } }; U_DOM.F_DisplayTDs=function(el){ if(!G_BrowserInfo.M_bIsIE){ return; } var nl=el.getElementsByTagName("TD"); var _d3=nl.length; for(var i=0;i<_d3;i++){ var td=nl.item(i); if(td.style.display=="none"){ td.style.display=""; } } }; U_DOM.F_IsVmlSupported=function(){ if(G_BrowserInfo.M_bIsIE5QuirksMode){ var _d4=document.body.appendChild(document.createElement("")); var s=typeof _d4.points; _d4.parentNode.removeChild(_d4); return (s!="string"); } return false; }; U_DOM.F_WindowOpenWasBlocked=function(win,_d5){ var b=Boolean(win); if(!b&&(_d5!=false)){ var _d6=window["G_ResManager"]?G_ResManager.F_GetOptionalString("IDS_HAL_POPUP_BLOCKER_ERROR"):null; alert(_d6||"A window could not be opened. This is most likely caused by a popup blocker. Please disable your popup blocker."); } return !b; }; U_DOM.F_HookTextInputOnChangeEvent=function(_d7,_d8){ _d7.onchange=function(e){ _d8(); }; _d7.oncut=function(){ setTimeout(_d8,0); }; _d7.onpaste=function(){ setTimeout(_d8,0); }; _d7.onkeyup=function(){ setTimeout(_d8,0); }; _d7.ondrop=function(){ setTimeout(_d8,0); }; _d7.onmouseup=function(){ setTimeout(_d8,0); }; }; U_DOM.F_UnHookTextInputOnChangeEvent=function(_d9){ _d9.onkeypress=null; _d9.onchange=null; _d9.oncut=null; _d9.onpaste=null; _d9.onkeyup=null; _d9.ondrop=null; _d9.onmouseup=null; }; U_DOM.F_HookNumericInputOnChangeEvent=function(_da,_db,_dc,_dd){ _da.onkeypress=function(e){ U_DOM.F_NumbersOnlyOnKeyPress(e,_dc,_dd); }; _da.onchange=function(e){ U_DOM.F_NumbersOnlyOnChange(e,_dc,_dd); _db(); }; _da.oncut=function(){ setTimeout(_db,0); }; _da.onpaste=function(){ setTimeout(_db,0); }; _da.onkeyup=function(){ setTimeout(_db,0); }; _da.ondrop=function(){ setTimeout(_db,0); }; _da.onmouseup=function(){ setTimeout(_db,0); }; }; U_DOM.F_UnHookNumericInputOnChangeEvent=function(_de){ _de.onkeypress=null; _de.onchange=null; _de.oncut=null; _de.onpaste=null; _de.onkeyup=null; _de.ondrop=null; _de.onmouseup=null; }; U_DOM.F_CreateArgumentsArray=function(_df,_e0){ var a=[]; for(var i=_e0||0;i<_df.length;i++){ a.push(_df[i]); } return a; }; U_DOM.F_GetColorAriaLabel=function(_e1){ var _e2=G_ResManager.F_GetOptionalString("IDS_HAL_COLOR_"+_e1.toUpperCase()); return _e2?_e2:_e1; }; U_DOM.F_ValidateNumber=function(_e3,_e4,_e5,_e6,_e7){ if(!G_HAL.M_oLibraries["hal"]["enableAccessibility"]||(_e3=="")){ return true; } var _e8; var _e9; switch(_e4){ case "integer": _e8=_e5?/[^0-9-]/g:/[^0-9]/g; _e9=parseInt(_e3,10); break; case "float": _e8=_e5?/[^0-9.,-eE]/g:/[^0-9.,eE]/g; _e9=parseFloat(_e3,10); break; case "decimal": default: _e8=_e5?/[^0-9.,-]/g:/[^0-9.,]/g; _e9=parseFloat(_e3,10); break; } if(_e3.match(_e8)||isNaN(_e9)){ F_MsgBox(G_ResManager.F_GetString("IDS_HAL_ERR_INVALID_NUMBER")); return false; }else{ if(_e6!==undefined&&_e6!==null&&_e9>_e6){ F_MsgBox(G_ResManager.F_GetString("IDS_HAL_ERR_INVALID_MAX",Number.F_ToLocalizedString(_e6))); return false; }else{ if(_e7!==undefined&&_e7!==null&&_e9<_e7){ F_MsgBox(G_ResManager.F_GetString("IDS_HAL_ERR_INVALID_MIN",Number.F_ToLocalizedString(_e7))); return false; } } } return true; }; U_DOM.F_ValidateNumberInput=function(_ea,_eb,_ec,_ed,_ee){ if(!G_HAL.M_oLibraries["hal"]["enableAccessibility"]){ return true; } var _ef=this.F_ValidateNumber(_ea.value,_eb,_ec,_ed,_ee); if(!_ef){ _ea.value=""; } return _ef; }; if(G_BrowserInfo.M_bIsIE){ U_DOM.m_oActiveTimeouts={}; U_DOM.m_iNextTimeoutIDX=1; U_DOM.F_CreateClearableTimeout=function(_f0,_f1){ var _f2=this.m_iNextTimeoutIDX++; this.m_oActiveTimeouts[_f2]=setTimeout(this.f_timeoutHandler.F_CreateMethodCallback(this,_f0,_f2),_f1); return _f2; }; U_DOM.F_ClearTimeout=function(_f3){ var _f4=this.m_oActiveTimeouts[_f3]; if(_f4){ delete this.m_oActiveTimeouts[_f3]; clearTimeout(_f4); } }; U_DOM.f_timeoutHandler=function(_f5,_f6){ if(this.m_oActiveTimeouts[_f6]){ delete this.m_oActiveTimeouts[_f6]; _f5(_f6); } }; }else{ U_DOM.F_CreateClearableTimeout=function(_f7,_f8){ return setTimeout(_f7,_f8); }; U_DOM.F_ClearTimeout=function(_f9){ clearTimeout(_f9); }; } U_DOM.f_splitRules=function(_fa){ var _fb=[]; var _fc=[]; _fc=_fa.selectorText.split(", "); for(var i=0;i<_fc.length;i++){ var _fd={}; _fd.selectorText=_fc[i]; for(var s in _fa){ if(s!="selectorText"){ _fd[s]=_fa[s]; } } _fb.push(_fd); } return _fb; }; U_DOM.F_GetCssRules=function(_fe){ if(G_BrowserInfo.M_bIsIE&&_fe.rules){ return _fe.rules; } var _ff=[]; for(var i=0;i<_fe.cssRules.length;i++){ var _100=_fe.cssRules.item(i); if(_100.type==1){ _ff=_ff.concat(this.f_splitRules(_100)); }else{ if(_100.type==4){ var _101=_100.cssRules.length; for(var j=0;j<_101;j++){ var _102=_100.cssRules.item(j); if(_102.type==1){ _ff=_ff.concat(this.f_splitRules(_102)); } } } } } _ff.item=this.F_Item; return _ff; }; U_DOM.F_Item=function(i){ return this[i]; }; if("".trimLeft){ String.prototype.F_LTrim=function(){ return this.trimLeft(); }; }else{ String.prototype.F_LTrim=function(){ return this.replace(/(^\s*)/g,""); }; } if("".trimRight){ String.prototype.F_RTrim=function(){ return this.trimRight(); }; }else{ String.prototype.F_RTrim=function(){ return this.replace(/(\s*$)/g,""); }; } if("".trim){ String.prototype.F_Trim=function(){ return this.trim(); }; }else{ String.prototype.F_Trim=function(){ return this.replace(/(^\s*)|(\s*$)/g,""); }; } String.prototype.F_RemoveNewLines=function(){ return this.replace(/[\r\n]/g,""); }; String.prototype.F_Truncate=function(_103,_104){ if(this.length<=_103){ return this.valueOf(); } var b=(_104!=false); if(this.F_ContainsSurrogatePairs()){ var _105=this.F_CharLength(); if(_105>_103){ return this.F_CharSubStr(0,b?_105-3:_105)+(b?"...":""); } return this.valueOf(); } return this.substr(0,b?_103-3:_103)+(b?"...":""); }; String.prototype.F_JScriptEscape=function(){ return this.replace(/\\/g,"\\\\").replace(/\'/g,"\\'").replace(/\"/g,"\\\"").replace(/\r?\n/g,"\\r\\n"); }; String.prototype.F_ToXPathString=function(){ if(this.indexOf("'")==-1){ return ("'"+this+"'"); } if(this.indexOf("\"")==-1){ return ("\""+this+"\""); } var a=[]; a.push("concat("); var _106=this.split("'"); for(var i=0;i<_106.length;i++){ if(a.length>1){ a.push(","); } if(i>0){ a.push("\"'\""); } var _107=_106[i]; if(_107){ if(this.indexOf("\"")==-1){ if(a.length>1){ a.push(","); } a.push("\""+_107+"\""); }else{ var _108=_107.split("'"); for(var j=0;j<_108.length;j++){ if(a.length>1){ a.push(","); } if(_108[j]){ a.push("'"+_108[j]+"'"); } } } } } a.push(")"); return a.join(""); }; String.prototype.F_XMLEncode=function(){ return this.replace(/&/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,"""); }; String.prototype.F_XMLDecode=function(){ return this.replace(/"/g,"\"").replace(/'/g,"'").replace(/>/g,">").replace(/</g,"<").replace(/&/g,"&"); }; String.prototype.F_HTMLEncode=function(){ return this.replace(/&/g,"&").replace(//g,">"); }; String.prototype.F_HTMLAttributeEncode=function(){ return this.F_HTMLEncode().replace(/'/g,"'").replace(/"/g,"""); }; String.prototype.F_RegExpEscape=function(){ return this.replace(/([\[\]\^\$\*\+\?\(\)\{\}\|.])/g,function($0){ return "\\"+$0; }); }; String.prototype.F_PadLeft=function(_109,_10a){ var _10b=""; for(var _10c=_10a-this.F_CharLength();_10c>0;_10c--){ _10b+=_109; } return _10b+this; }; String.prototype.F_PadRight=function(_10d,_10e){ var _10f=""; for(var _110=_10e-this.F_CharLength();_110>0;_110--){ _10f+=_10d; } return this+_10f; }; String.F_ParseFloat=function(s){ if(typeof s=="string"){ return parseFloat(s.replace(",",".")); } return NaN; }; String.prototype.F_ParseFloat=function(){ return String.F_ParseFloat(this.valueOf()); }; String.F_ParseDecimal=function(s){ return new C_Decimal(s); }; String.prototype.F_ParseDecimal=function(){ return String.F_ParseDecimal(this.valueOf()); }; String.prototype.F_GetChars=function(){ if(!this.F_ContainsSurrogatePairs()){ return this.split(""); } var a=[]; for(var i=0;i65535){ _111-=65536; return this.fromCharCode(55296+(_111>>10),56320+(_111&1023)); } return this.fromCharCode(_111); }; String.prototype.F_CharAt=function(_112){ return this.F_GetChars()[_112]; }; String.prototype.F_CharIndexOf=function(s){ var i=this.indexOf(s); return (i==-1)?-1:this.substring(0,i).F_CharLength(); }; String.prototype.F_LastCharIndexOf=function(s){ var i=this.lastIndexOf(s); return (i==-1)?-1:this.substring(0,i).F_CharLength(); }; String.prototype.F_CharSubStr=function(_113,_114){ if(this.F_ContainsSurrogatePairs()){ return this.F_GetChars().slice(_113||0,_114).join(""); } return this.substr(_113,_114); }; String.prototype.F_CharSubString=function(_115,_116){ if(this.F_ContainsSurrogatePairs()){ var a=this.F_GetChars(); _115=_115||0; return a.slice(_115,a.length-(_116||0)).join(""); } return this.substring(_115,_116); }; String.prototype.F_IsHS=function(i){ var _117=this.charCodeAt(i); return ((_117>=55296)&&(_117<=56319)); }; String.prototype.F_IsLS=function(i){ var _118=this.charCodeAt(i); return ((_118>=56320)&&(_118<=57343)); }; Number.m_sDecimalSymbol="."; Number.F_SetDecimalSymbol=function(s){ this.m_sDecimalSymbol=s; }; Number.F_ToLocalizedString=function(v){ var f=NaN; switch(typeof v){ case "number": f=v; break; case "string": f=parseFloat(v); break; } if(isNaN(f)){ return ""; } return f.toString().replace(".",Number.m_sDecimalSymbol); }; Number.prototype.F_ToLocalizedString=function(){ return Number.F_ToLocalizedString(this.valueOf()); }; Math.F_NonNeg=function(i){ return (i<0)?0:i; }; Math.F_NonNaN=function(i){ return (isNaN(i))?0:i; }; Math.F_PointInRect=function(_119,_11a,_11b,_11c,_11d,_11e){ return ((_119>=_11b)&&(_119<=(_11b+_11e))&&(_11a>=_11c)&&(_11a<=(_11c+_11d))); }; Math.F_SortNumeric=function(a,b){ return a-b; }; Array.prototype.F_Top=function(){ return (this.length>0)?this[this.length-1]:null; }; Array.prototype.F_Clear=function(){ this.length=0; }; if(!Array.prototype.indexOf){ Array.prototype.indexOf=function(_11f){ var _120=this.length; for(var i=0;i<_120;++i){ if(this[i]==_11f){ return i; } } return -1; }; } Array.prototype.F_IndicesOf=function(_121){ var a=[]; var _122=this.length; for(var i=0;i<_122;i++){ if(this[i]==_121){ a.push(i); } } return a; }; Array.prototype.F_PushUnique=function(_123){ if(this.indexOf(_123)==-1){ this.push(_123); return true; } return false; }; Array.prototype.F_RemoveItem=function(_124){ var i=this.indexOf(_124); if(i!=-1){ this.splice(i,1); } return i!=-1; }; Array.prototype.F_IndexOfProperty=function(_125,_126){ var _127=this.length; for(var i=0;i<_127;i++){ if(this[i][_125]==_126){ return i; } } return -1; }; Array.prototype.F_Compare=function(a){ var _128=this.length; if(_128!=a.length){ return false; } for(var i=0;i<_128;i++){ if(this[i]!=a[i]){ return false; } } return true; }; Array.prototype.F_CompareIgnoreOrder=function(a){ if(this.length!=a.length){ return false; } for(var i=0;i_14e){ s2=s2.F_PadRight("0",s2.length+(_14d-_14e)); }else{ if(_14e>_14d){ s1=s1.F_PadRight("0",s1.length+(_14e-_14d)); } } if(s2.length>s1.length){ s1=s1.F_PadLeft("0",s1.length+(s2.length-s1.length)); } var a1=s1.split("").reverse(); var a2=s2.split("").reverse(); var _150=new Array(a1.length+1); for(var i=0;i<_150.length;i++){ _150[i]=0; } for(var i=0;i9){ _150[_151-1]++; _152-=10; } _150[_151]+=_152; }else{ var _152=n1-n2; if(_152<0){ _150[_151-1]--; _152+=10; } _150[_151]+=_152; if(_150[_151]<0){ _150[_151-1]--; _150[_151]+=10; } } } _150.splice(_150.length-_14f,0,"."); return new C_Decimal(_150.join("")); }; var G_JSON; if(typeof JSON=="undefined"){ G_JSON={}; G_JSON.parse=function(_153){ return eval("("+_153+")"); }; G_JSON.stringify=function(o){ var as=[]; if(o==null){ as.push("null"); }else{ if(o instanceof Array){ as.push("["); for(var i=0;i0){ as.push(","); } as.push(this.stringify(o[i])); } as.push("]"); }else{ switch(typeof o){ case "object": as.push("{"); var _154=0; for(var s in o){ if(_154++>0){ as.push(","); } as.push("\""+s.replace(/\\/g,"\\\\").replace(/\"/g,"\\\"").replace(/\r?\n/g,"\\r\\n")+"\":"); as.push(this.stringify(o[s])); } as.push("}"); break; case "string": as.push("\""+o.replace(/\\/g,"\\\\").replace(/\"/g,"\\\"").replace(/\r?\n/g,"\\r\\n")+"\""); break; default: as.push(o); break; } } } return as.join(""); }; }else{ G_JSON=JSON; } function C_WebRequest(_155,_156,_157,_158,_159,_15a){ this.m_oListener=_155; this.m_sMethod=_156; this.m_sUrl=_157; this.m_bAsync=(_158!==false); this.m_sUser=_159; this.m_sPassword=_15a; this.m_bUseCache=true; this.m_oError=null; this.m_aRequestHeaders=[]; }; C_WebRequest.prototype.F_GetListener=function(){ return this.m_oListener; }; C_WebRequest.prototype.F_SetListener=function(_15b){ this.m_oListener=_15b; }; C_WebRequest.prototype.F_SetNewError=function(_15c,_15d,_15e){ this.m_oError=new C_Error(_15c?_15c:"Web request failed.",_15d,_15e); }; C_WebRequest.prototype.F_SetNewErrorRes=function(_15f,_160,_161){ this.F_SetNewError(window["G_ResManager"]?G_ResManager.F_GetString(_15f):null,_160,_161); }; C_WebRequest.prototype.F_SetError=function(_162){ this.m_oError=_162; }; C_WebRequest.prototype.F_GetError=function(){ return this.m_oError; }; C_WebRequest.prototype.F_SetRequestHeader=function(_163,_164){ this.m_aRequestHeaders.push(_163,_164); }; C_WebRequest.prototype.F_GetResponseHeader=function(_165){ return this.m_oXmlHttp.getResponseHeader(_165); }; C_WebRequest.prototype.F_SetRequestBody=function(_166){ this.m_sRequestBody=_166; }; C_WebRequest.prototype.F_GetRequestBody=function(){ return this.m_sRequestBody; }; C_WebRequest.prototype.F_Send=function(){ if(G_HAL.M_oTestListener&&G_HAL.M_oTestListener.F_WebRequest_OnSend){ G_HAL.M_oTestListener.F_WebRequest_OnSend(this); } if(this.m_oXmlHttp){ this.m_oXmlHttp=null; } this.m_bCompleted=false; C_WebRequest.F_AddActiveRequest(this); this.m_oXmlHttp=((U_XML.M_bUseNativeXMLHttpRequest||G_BrowserInfo.M_bIsFirefox)&&window.XMLHttpRequest)?new XMLHttpRequest():new ActiveXObject(U_XML.K_sProgID_XMLHTTP); try{ if(this.m_sUser||this.m_sPassword){ this.m_oXmlHttp.open(this.m_sMethod,this.m_sUrl,this.m_bAsync,this.m_sUser,this.m_sPassword); }else{ this.m_oXmlHttp.open(this.m_sMethod,this.m_sUrl,this.m_bAsync); } } catch(e){ G_Debug.F_Print("Error opening C_WebRequest request"); this.F_SetNewErrorRes("IDS_HAL_WEBREQUEST_SEND_ERROR","URL: "+this.m_sUrl); if(this.m_oListener&&this.m_oListener.F_Request_OnComplete){ this.m_oListener.F_Request_OnComplete(this); } return; } if(G_BrowserInfo.M_bIsFirefox){ var _167=this.m_sUrl.substr(this.m_sUrl.length-".dtd".length); if(_167==".dtd"){ this.m_oXmlHttp.overrideMimeType("text/plain"); } } for(var i=0;i=200)&&(_16b<300)); }; C_WebRequest.prototype.F_GetStatus=function(){ return U_DOM.F_GetPropertyInTryCatch(this.m_oXmlHttp,"status"); }; C_WebRequest.prototype.F_GetStatusText=function(){ return U_DOM.F_GetPropertyInTryCatch(this.m_oXmlHttp,"statusText"); }; C_WebRequest.prototype.F_GetUrl=function(){ return this.m_sUrl; }; C_WebRequest.prototype.F_GetResponseText=function(){ return this.m_oXmlHttp.responseText; }; C_WebRequest.prototype.F_SetCaching=function(_16c){ this.m_bUseCache=_16c; }; C_WebRequest.prototype.F_SetContext=function(_16d){ this.m_vContext=_16d; }; C_WebRequest.prototype.F_GetContext=function(){ return this.m_vContext; }; C_WebRequest.m_aActiveRequests=[]; C_WebRequest.F_AbortActiveRequests=function(){ for(var i=0;i/i,""); }; U_XML.F_CreateDocument=function(){ var d=G_BrowserInfo.M_bIsIE?new ActiveXObject(this.K_sProgID_DOMDocument):document.implementation.createDocument("","",null); d.async=false; d.validateOnParse=false; d.setProperty("SelectionLanguage","XPath"); return d; }; U_XML.F_XML_OnParseError=function(d){ var _176=d.parseError; G_Debug.F_Print("XML Parse Error"); G_Debug.F_Print("---------------------------"); G_Debug.F_Print(" reason: "+_176.reason); G_Debug.F_Print(" url: "+_176.url); G_Debug.F_Print(" line: "+_176.line); G_Debug.F_Print(" linepos: "+_176.linepos); G_Debug.F_Print(" srcText: "+_176.srcText); }; U_XML.F_LoadDocument=function(_177,_178,_179,_17a){ var d=this.F_CreateDocument(); d.validateOnParse=(_179!=false); d.preserveWhiteSpace=(_17a==true); try{ if(!d.load(_178)){ _177=_177?_177:this; _177.F_XML_OnParseError(d); return null; } } catch(e){ _177=_177?_177:this; _177.F_XML_OnParseError(d); return null; } return d; }; U_XML.F_LoadString=function(_17b,_17c,_17d,_17e){ var d=null; var _17f=false; try{ if(G_BrowserInfo.M_bIsIE){ d=this.F_CreateDocument(); d.validateOnParse=(_17d!=false); d.preserveWhiteSpace=(_17e==true); _17f=d.loadXML(_17c); }else{ d=(new DOMParser()).parseFromString(_17c,"text/xml"); _17f=(d.parseError.errorCode==0); } if(!_17f){ _17b=_17b?_17b:this; _17b.F_XML_OnParseError(d); this.F_AlertInvalidUtf8Bom(_17c); return null; } } catch(e){ _17b=_17b?_17b:this; _17b.F_XML_OnParseError(d); this.F_AlertInvalidUtf8Bom(_17c); return null; } return d; }; U_XML.F_LoadStringWithDTD=function(_180,_181,_182,_183,_184){ var d=U_XML.F_LoadString(_180,(_182?_182+_181:_181),_183,_184); if(d&&!G_BrowserInfo.M_bIsIE){ d.rawDTD=_182; } return d; }; U_XML.F_CreateElementNS=function(d,_185,_186){ return G_BrowserInfo.M_bIsIE?d.createNode(this.K_iNODE_ELEMENT,_186,_185):d.createElementNS(_185,_186); }; U_XML.F_CreateAttributeNS=function(d,_187,_188){ return G_BrowserInfo.M_bIsIE?d.createNode(this.K_iNODE_ATTRIBUTE,_188,_187):d.createAttributeNS(_187,_188); }; U_XML.F_ImportNode=function(d,n,_189){ if(G_BrowserInfo.M_bIsIE||(n.ownerDocument==d)){ return n.cloneNode(_189!==false); } var _18a=d.documentElement?d.documentElement:d; if(!d.doctype){ var _18b=d.importNode(n,_189!==false); _18b=_18a.appendChild(_18b); _18b=_18a.removeChild(_18b); return _18b; } if(n.ownerDocument.doctype&&(n.ownerDocument.doctype.xml==d.doctype.xml)){ var _18b=d.importNode(n,_189!==false); _18b=_18a.appendChild(_18b); _18b=_18a.removeChild(_18b); return _18b; } var _18c=this.F_LoadString(null,d.doctype.xml+n.xml); var _18b=d.importNode(_18c.documentElement,_189!==false); _18b=_18a.appendChild(_18b); _18b=_18a.removeChild(_18b); return _18b; }; U_XML.F_GetUniqueId=function(d,_18d){ var i=1; var _18e=_18d; while(d.nodeFromID(_18e)){ _18e=_18d+i++; } return _18e; }; U_XML.F_GiveNodeUniqueId=function(d,n,_18f){ if(!_18f){ _18f=n.nodeName; } n.setAttribute("id",this.F_GetUniqueId(d,_18f)); return n; }; U_XML.F_IndexOf=function(nl,n){ var _190=nl.length; for(var i=0;i<_190;++i){ if(nl.item(i)==n){ return i; } } return -1; }; U_XML.F_GetIndex=function(n){ return this.F_IndexOf(n.parentNode.selectNodes("*"),n); }; U_XML.F_RemoveNode=function(_191,_192){ var n=_191.selectSingleNode(_192); if(n){ n.parentNode.removeChild(n); } return n; }; U_XML.F_RemoveNodeAndEmptyParent=function(_193,_194){ var n=_193.selectSingleNode(_194); if(n){ var _195=n.parentNode; _195.removeChild(n); if(!_195.selectSingleNode("*")){ _195.parentNode.removeChild(_195); } } return n; }; U_XML.F_RemoveNodes=function(_196,_197){ var nl=_196.selectNodes(_197); var _198=nl.length; for(var i=0;i<_198;++i){ var n=nl.item(i); n.parentNode.removeChild(n); } return nl; }; U_XML.F_RemoveNodesInArray=function(_199){ var _19a=_199.length; for(var i=0;i<_19a;i++){ var n=_199[i]; var _19b=n.parentNode; if(_19b){ _19b.removeChild(n); } } }; U_XML.F_AppendArray=function(n,_19c){ var _19d=_19c.length; for(var i=0;i<_19d;++i){ n.appendChild(_19c[i]); } }; U_XML.F_AppendNodeList=function(n,nl){ var _19e=nl.length; for(var i=0;i<_19e;++i){ n.appendChild(nl.item(i)); } }; U_XML.F_AppendNodeListToArray=function(a,nl){ if(!a){ a=[]; } var _19f=nl.length; for(var i=0;i<_19f;++i){ a.push(nl.item(i)); } return a; }; U_XML.F_AppendValues=function(a,nl){ if(!a){ a=[]; } var _1a0=nl.length; for(var i=0;i<_1a0;++i){ var n=nl.item(i); a.push((n.nodeType==this.K_iNODE_ATTRIBUTE)?n.value:n.nodeValue); } return a; }; U_XML.F_AppendValuesToObject=function(o,nl){ if(!o){ o={}; } var _1a1=nl.length; for(var i=0;i<_1a1;++i){ var n=nl.item(i); o[(n.nodeType==this.K_iNODE_ATTRIBUTE)?n.value:n.nodeValue]=true; } return o; }; U_XML.F_AppendUniqueValues=function(a,nl){ if(!a){ a=[]; } var _1a2=nl.length; for(var i=0;i<_1a2;++i){ var n=nl.item(i); a.F_PushUnique((n.nodeType==this.K_iNODE_ATTRIBUTE)?n.value:n.nodeValue); } return a; }; U_XML.F_GetXPath=function(_1a3,_1a4){ var _1a5=""; for(;_1a4&&(_1a4!=_1a3);_1a4=_1a4.parentNode){ _1a5="/"+_1a4.nodeName+"["+(this.F_IndexOf(_1a4.parentNode.selectNodes(_1a4.nodeName),_1a4)+1)+"]"+_1a5; } return (_1a4?("."+_1a5):""); }; U_XML.F_GetNextSiblingElement=function(n){ return n.selectSingleNode("following-sibling::*"); }; U_XML.F_GetPreviousSiblingElement=function(n){ return n.selectSingleNode("preceding-sibling::*[1]"); }; U_XML.F_GetNextElementOfSequence=function(n,_1a6){ if(_1a6){ return this.F_SelectSingleNode(n,"following-sibling::",_1a6); } return n.selectSingleNode("following-sibling::"+n.nodeName); }; U_XML.F_GetPreviousElementOfSequence=function(n,_1a7){ if(_1a7){ return this.F_SelectSingleNode(n,"preceding-sibling::",_1a7); } return n.selectSingleNode("preceding-sibling::"+n.nodeName+"[1]"); }; U_XML.F_GetUniqueValue=function(_1a8,_1a9,_1aa,_1ab,_1ac){ var _1ad={}; var _1ae=_1a8.length; for(var i=0;i<_1ae;++i){ _1ad[_1a8.item(i).value]=true; } return this.f_getUniqueValue(_1ad,_1a9,_1aa,_1ab,_1ac); }; U_XML.F_GetUniqueValueFromArray=function(_1af,_1b0,_1b1,_1b2,_1b3){ var _1b4=_1af.F_CreateDictionary(); return this.f_getUniqueValue(_1b4,_1b0,_1b1,_1b2,_1b3); }; U_XML.f_getUniqueValue=function(_1b5,_1b6,_1b7,_1b8,_1b9){ if((_1b9!=false)&&_1b6.match(/^(.*\D0*)(\d+)$/)){ _1b6=RegExp.$1; _1b8=RegExp.$2; _1b7=true; } var i=_1b8?parseInt(_1b8):1; i=i<10000?i:1; var s=_1b6; if(_1b7){ s+=i++; } for(;_1b5[s];i++){ s=_1b6+i; } return s; }; U_XML.F_GiveUniqueValue=function(n,_1ba,_1bb,_1bc,_1bd,_1be){ n.setAttribute(_1ba,this.F_GetUniqueValue(_1bc,_1bb,_1bd,null,_1be)); }; U_XML.F_GiveUniqueName=function(n,_1bf,_1c0,_1c1,_1c2){ this.F_GiveUniqueValue(n,"name",_1bf,_1c0,_1c1,_1c2); }; U_XML.F_ReplaceNodeWithNodeList=function(n,nl){ var _1c3=n.parentNode; var _1c4=nl.length; for(var i=0;i<_1c4;i++){ _1c3.insertBefore(nl.item(i),n); } _1c3.removeChild(n); }; U_XML.F_ReplaceNodeWithArray=function(n,a){ var _1c5=n.parentNode; var _1c6=a.length; for(var i=0;i<_1c6;i++){ _1c5.insertBefore(a[i],n); } _1c5.removeChild(n); }; U_XML.F_SetNodeName=function(n,_1c7){ if(n.nodeName==_1c7){ return n; } var _1c8=n.ownerDocument.createElement(_1c7); U_XML.F_CopyAttributes(_1c8,n,null,true); U_XML.F_AppendNodeList(_1c8,U_XML.F_RemoveNodes(n,"*")); if(n.parentNode){ n.parentNode.replaceChild(_1c8,n); } return _1c8; }; U_XML.F_CopyAttributes=function(_1c9,_1ca,_1cb,_1cc,_1cd){ var o=_1cb?_1cb.F_CreateDictionary():null; var nl=_1ca.selectNodes("@*"); if(G_BrowserInfo.M_bIsFirefox){ _1cc=false; } var _1ce=nl.length; for(var i=0;i<_1ce;++i){ var _1cf=nl.item(i); var _1d0=_1cf.name; if(o&&!o[_1d0]){ continue; } if(_1d0==_1cd){ continue; } if(_1cc&&!U_XML.F_IsAttributeSpecified(_1ca,_1ca.attributes.getNamedItem(_1d0))){ continue; } _1c9.setAttribute(_1d0,_1cf.value); } }; U_XML.F_CopyAttribute=function(_1d1,_1d2,_1d3){ var _1d4=_1d2.getAttribute(_1d3); if(_1d4!=null){ _1d1.setAttribute(_1d3,_1d4); return true; } return false; }; U_XML.F_ConstructFilter=function(_1d5,_1d6,_1d7,_1d8,_1d9,_1da){ if(_1d7.length==0){ return ""; } var _1db=[]; for(var i=0;i<_1d7.length;i++){ var _1dc=_1d7[i]; if(_1d9){ _1db.push("translate("+_1d5+", 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')"+_1d6+_1dc.toLowerCase().F_ToXPathString()); }else{ _1db.push(_1d5+_1d6+_1dc.F_ToXPathString()); } } return "["+(_1da?"not(":"")+_1db.join(" "+_1d8+" ")+(_1da?")":"")+"]"; }; U_XML.F_ConstructInFilter=function(_1dd,_1de,_1df,_1e0){ return this.F_ConstructFilter(_1dd,"=",_1de,"or",_1df,_1e0); }; U_XML.F_ConstructAttributeFilter=function(_1e1,_1e2,_1e3,_1e4,_1e5,_1e6){ return this.F_ConstructFilter("@"+_1e1,_1e2,_1e3,_1e4,_1e5,_1e6); }; U_XML.F_ConstructUnion=function(_1e7,_1e8,_1e9){ var a=[]; if(_1e7){ a.push(_1e7); } a.push("*[self::"); a.push(_1e8.join(" | self::")); a.push("]"); if(_1e9){ a.push(_1e9); } return a.join(""); }; U_XML.F_SelectSingleNode=function(n,_1ea,_1eb,_1ec){ return n.selectSingleNode(this.F_ConstructUnion(_1ea,_1eb,_1ec)+"[1]"); }; U_XML.F_SelectNodes=function(n,_1ed,_1ee,_1ef){ return n.selectNodes(this.F_ConstructUnion(_1ed,_1ee,_1ef)); }; U_XML.F_GetAncestor=function(n,_1f0){ return n.selectSingleNode("ancestor::"+_1f0+"[1]"); }; U_XML.F_GetAncestorEx=function(n,_1f1){ return n.selectSingleNode("("+this.F_ConstructUnion("ancestor::",_1f1)+")[last()]"); }; U_XML.F_GetAncestorOrSelf=function(n,_1f2){ return n?n.selectSingleNode("ancestor-or-self::"+_1f2+"[1]"):null; }; U_XML.F_GetAncestorOrSelfEx=function(n,_1f3){ return n?n.selectSingleNode("("+this.F_ConstructUnion("ancestor-or-self::",_1f3)+")[last()]"):null; }; U_XML.F_GetAncestorOrSelfAttribute=function(n,_1f4){ return n.selectSingleNode("ancestor-or-self::*[@"+_1f4+"][1]"); }; U_XML.F_IsAncestor=function(n,_1f5){ for(var _1f6=n.parentNode;_1f6;_1f6=_1f6.parentNode){ if(_1f6==_1f5){ return true; } } return false; }; U_XML.F_GetSpecifiedAttributeValue=function(_1f7,_1f8){ var _1f9=_1f7.attributes.getNamedItem(_1f8); return (_1f9&&U_XML.F_IsAttributeSpecified(_1f7,_1f9))?_1f7.getAttribute(_1f8):null; }; U_XML.F_SetAttributeString=function(n,_1fa){ var a=_1fa.split(/\s+/g); var _1fb=a.length; for(var i=0;i<_1fb;i++){ var _1fc=a[i].split("="); var _1fd=_1fc[1]; n.setAttribute(_1fc[0],_1fd.substr(1,_1fd.length-2)); } }; U_XML.F_SetAttributes=function(a,_1fe,_1ff){ var _200=a.length; for(var i=0;i<_200;i++){ this.F_SetAttribute(a[i],_1fe,_1ff); } }; U_XML.F_SetAttribute=function(n,_201,_202){ n.removeAttribute(_201); if(n.getAttribute(_201)!=_202){ n.setAttribute(_201,_202); } }; U_XML.F_SetAttributeValues=function(nl,_203){ var _204=nl.length; for(var i=0;i<_204;++i){ nl.item(i).value=_203; } }; U_XML.F_SetNodeAttributeValues=function(nl,_205,_206){ var _207=nl.length; for(var i=0;i<_207;++i){ nl.item(i).setAttribute(_205,_206); } }; U_XML.F_RemoveAttribute=function(n,_208,_209){ this.F_RemoveAttributeFromNodeList(n.selectNodes(_208+"[@"+_209+"]"),_209); }; U_XML.F_RemoveAttributeFromNodeList=function(nl,_20a){ var _20b=nl.length; for(var i=0;i<_20b;i++){ nl.item(i).removeAttribute(_20a); } }; U_XML.F_RemoveAttributes=function(a,_20c){ var _20d=a.length; for(var i=0;i<_20d;i++){ a[i].removeAttribute(_20c); } }; U_XML.F_RemoveAllAttribute=function(n,_20e){ this.F_RemoveAttributeFromNodeList(n.selectNodes("descendant-or-self::*[@"+_20e+"]"),_20e); }; U_XML.F_GetNodeText=function(n){ if(n){ return n.nodeType==this.K_iNODE_ATTRIBUTE?n.value:n.text; } return ""; }; U_XML.F_GetCreateChild=function(n,_20f){ var _210=n.selectSingleNode(_20f); if(_210){ return _210; } return n.appendChild(n.ownerDocument.createElement(_20f)); }; U_XML.F_AppendChild=function(n,_211){ return n.appendChild(n.ownerDocument.createElement(_211)); }; U_XML.F_InsertNodePath=function(_212,_213,_214,_215){ var d=_212.ownerDocument; var a=_213.split("/"); var _216=null; var _217=null; var _218=a.length; for(var i=0;i<_218;i++){ var n=d.createElement(a[i]); if(i==0){ _216=n; _212.insertBefore(n,_215?_215:null); }else{ _217.appendChild(n); } _217=n; } return _214?_217:_216; }; U_XML.F_GetCreateNodePath=function(_219,_21a,_21b,_21c){ var d=_219.ownerDocument; var a=_21a.split("/"); var _21d=null; var _21e=_219; var _21f=a.length; for(var i=0;i<_21f;i++){ var _220=_21e.selectSingleNode(a[i]); _21e=_220||_21e.insertBefore(d.createElement(a[i]),(!_21d&&_21c)?_21c:null); if(!_21d){ _21d=_21e; } } return _21b?_21e:_21d; }; U_XML.F_HaveSameNodeName=function(_221){ var _222=_221[0].nodeName; var _223=_221.length; for(var i=1;i<_223;i++){ if(_221[i].nodeName!=_222){ return false; } } return true; }; U_XML.F_HaveSameParent=function(_224){ var _225=_224[0].parentNode; var _226=_224.length; for(var i=1;i<_224.length;i++){ if(_224[i].parentNode!=_225){ return false; } } return true; }; U_XML.F_SerializeNode=function(_227){ if(G_BrowserInfo.M_bIsIE){ return _227.xml; } if(_227.nodeType==U_XML.K_iNODE_DOCUMENT&&!_227.doctype){ return _227.xml; } if(_227.nodeType==U_XML.K_iNODE_ELEMENT&&!_227.ownerDocument.doctype){ return _227.xml; } return (new C_XmlSerializer(_227)).F_ToString(); }; U_XML.F_AlertInvalidUtf8Bom=function(_228){ var i=_228.indexOf("\ufeff"); if(i!=-1){ G_HAL.F_AlertError("Found BOM at position "+i); } return (i!=-1); }; U_XML.F_SerializeToHTML=function(n){ var re=/<\s*(?!img|input|link|meta|area)([^\/\s]+)([^>]*)\/>/gi; return n.xml.replace(re,function($0,$1,$2){ return "<"+$1+$2+">"; }); }; U_XML.F_SerializeNodeContentsToHTML=function(n){ var _229=this.F_SerializeToHTML(n); return _229.replace(/^<[^>]*>|<\/[^>]*>$/g,""); }; U_XML.F_CreateLookupByAttributeValue=function(v_nl,_22a){ var _22b={}; if(v_nl&&v_nl.length>0&&_22a){ for(var i=0;i