pd.require.js 80 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173
  1. /*
  2. *+------------------------------------------------------------------------+
  3. *| Licensed Materials - Property of IBM
  4. *|
  5. *| IBM Cognos Products: PS
  6. *|
  7. *| (C) Copyright IBM Corp. 2011
  8. *|
  9. *| US Government Users Restricted Rights - Use, duplication or
  10. *| disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  11. *|
  12. *+------------------------------------------------------------------------+
  13. */
  14. var G_HAL={};
  15. 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}};
  16. if(window["G_HALOptions"]){
  17. var v_oOptions=G_HAL.M_oLibraries["hal"];
  18. for(var s in G_HALOptions){
  19. v_oOptions[s]=G_HALOptions[s];
  20. }
  21. }
  22. G_HAL.F_AddLibrary=function(_1,_2){
  23. this.M_oLibraries[_1]=_2;
  24. };
  25. G_HAL.M_oBuiltInDialogs={D_MsgBox:true,D_InputBox:true,D_XmlError:true,D_Progress:true,D_PropertySheetListView:true};
  26. G_HAL.m_oLoaded={};
  27. G_HAL.M_sPath=G_HAL.M_oLibraries["hal"]["path"];
  28. G_HAL.M_sAppImagePath=G_HAL.M_oLibraries["hal"]["appImagePath"];
  29. G_HAL.M_sImagePath=G_HAL.M_oLibraries["hal"]["imagePath"]||(G_HAL.M_sPath+"hal/images/");
  30. G_HAL.F_GetImageURL=function(_3){
  31. if(this.f_isNonResolvableFilePath(_3)){
  32. return _3;
  33. }
  34. var _4=this.f_getLibraryNameFromSrc(_3);
  35. if(_4&&this.M_oLibraries[_4]["imagePath"]){
  36. _3=_3.replace(_4+"/images/",this.M_oLibraries[_4]["imagePath"]);
  37. }
  38. _3=U_HighContrast.F_GetHighContrastImgIfNecessary(_3);
  39. return (_4?(this.M_oLibraries[_4]["path"]+_3):(this.M_sAppImagePath+_3));
  40. };
  41. G_HAL.F_GetFileURL=function(_5){
  42. if(this.f_isNonResolvableFilePath(_5)){
  43. return _5;
  44. }
  45. var _6=this.f_getLibraryNameFromSrc(_5);
  46. return (_6?(this.M_oLibraries[_6]["path"]+_5):_5);
  47. };
  48. G_HAL.f_isNonResolvableFilePath=function(_7){
  49. switch(_7.charAt(0)){
  50. case "h":
  51. case "H":
  52. var s=_7.toLowerCase();
  53. if((s.substr(0,7)=="http://")||(s.substr(0,8)=="https://")){
  54. return true;
  55. }
  56. break;
  57. case "u":
  58. case "U":
  59. var s=_7.toLowerCase();
  60. if(s.substr(0,8)=="unmht://"){
  61. return true;
  62. }
  63. break;
  64. case "/":
  65. case ".":
  66. return true;
  67. }
  68. return false;
  69. };
  70. G_HAL.f_getLibraryNameFromSrc=function(_8){
  71. var i=_8.indexOf("/");
  72. if(i!=-1){
  73. var _9=_8.substr(0,i);
  74. if(_9&&this.M_oLibraries[_9]){
  75. return _9;
  76. }
  77. }
  78. return "";
  79. };
  80. G_HAL.f_getFileSrc=function(_a){
  81. var _b=this.f_getLibraryNameFromSrc(_a);
  82. return (_b?(this.M_oLibraries[_b]["path"]+_a):_a);
  83. };
  84. G_HAL.F_FileHasBeenLoaded=function(_c){
  85. _c=this.f_getFileSrc(_c);
  86. return Boolean(this.m_oLoaded[_c]);
  87. };
  88. G_HAL.F_AddFileToLoadedList=function(_d){
  89. _d=this.f_getFileSrc(_d);
  90. this.m_oLoaded[_d]=true;
  91. };
  92. G_HAL.F_RemoveFileFromLoadedList=function(_e){
  93. _e=this.f_getFileSrc(_e);
  94. delete this.m_oLoaded[_e];
  95. };
  96. G_HAL.F_RemoveFilesFromLoadedList=function(_f){
  97. if(_f){
  98. var _10=_f.length;
  99. for(var i=0;i<_10;i++){
  100. this.F_RemoveFileFromLoadedList(_f[i]);
  101. }
  102. }
  103. };
  104. G_HAL.F_GetFilesNotLoaded=function(_11){
  105. var _12=[];
  106. for(var i=0;i<_11.length;i++){
  107. if(!this.F_FileHasBeenLoaded(_11[i])){
  108. _12.F_PushUnique(_11[i]);
  109. }
  110. }
  111. return _12;
  112. };
  113. G_HAL.F_AlertError=function(s){
  114. alert("HAL ERROR:\r\n\r\n"+s);
  115. };
  116. G_HAL.F_OnDomContentLoaded=function(e){
  117. e=e||window.event;
  118. if(G_BrowserInfo.M_bIsIE6){
  119. document.body.className+=" clsHalNoPngAlpha";
  120. }
  121. if(window["G_DragDrop"]||window["C_Dialog"]||window["C_PropertySheet"]||window["C_ModelessDialog"]){
  122. var d=document;
  123. d.body.appendChild(d.createElement("DIV")).innerHTML=G_HAL.F_GetHtmlToWrite();
  124. }
  125. if(window["U_CoolButton"]){
  126. U_CoolButton.F_InitCoolButtons(document);
  127. }
  128. if(window["F_HAL_OnDomContentLoaded"]){
  129. F_HAL_OnDomContentLoaded(e);
  130. }else{
  131. var _13=window["G_App"];
  132. if(_13&&_13["F_HAL_OnDomContentLoaded"]){
  133. _13.F_HAL_OnDomContentLoaded(e);
  134. }
  135. }
  136. };
  137. G_HAL.F_OnLoad=function(e){
  138. e=e||window.event;
  139. if(!G_HAL.M_oLibraries["hal"]["fireDOMContentLoaded"]){
  140. G_HAL.F_OnDomContentLoaded(e);
  141. }
  142. if(window["F_HAL_OnLoad"]){
  143. F_HAL_OnLoad(e);
  144. }else{
  145. var _14=window["G_App"];
  146. if(_14&&_14["F_HAL_OnLoad"]){
  147. _14.F_HAL_OnLoad(e);
  148. }
  149. }
  150. if(window.onresize){
  151. G_HAL.f_originalWindowOnResize=window.onresize;
  152. }
  153. window.onresize=G_HAL.F_OnResize;
  154. if(G_BrowserInfo.M_bIsTouchDevice){
  155. if(window.onorientationchange){
  156. G_HAL.f_originalOrientationChange=window.onorientationchange;
  157. }
  158. window.onorientationchange=G_HAL.F_OnOrientationChange;
  159. }
  160. if(G_HAL.f_originalWindowOnLoad){
  161. G_HAL.f_originalWindowOnLoad(e);
  162. }
  163. };
  164. G_HAL.F_OnUnLoad=function(e){
  165. e=e||window.event;
  166. U_DOM.F_DisplayTDs(document);
  167. var _15=window["G_App"];
  168. if(window["F_HAL_OnUnLoad"]){
  169. F_HAL_OnUnLoad(e);
  170. }else{
  171. var _15=window["G_App"];
  172. if(_15&&_15["F_HAL_OnUnLoad"]){
  173. _15.F_HAL_OnUnLoad(e);
  174. }
  175. }
  176. if(window["C_WebRequest"]){
  177. C_WebRequest.F_AbortActiveRequests();
  178. }
  179. G_Debug.F_CloseConsole();
  180. G_HAL.f_detach();
  181. if(G_HAL.f_originalWindowOnUnLoad){
  182. G_HAL.f_originalWindowOnUnLoad(e);
  183. }
  184. G_HAL.f_originalWindowOnResize=null;
  185. G_HAL.f_originalWindowOnLoad=null;
  186. G_HAL.f_originalWindowOnUnLoad=null;
  187. };
  188. G_HAL.f_detach=function(){
  189. if(window["C_Dialog"]){
  190. C_Dialog.F_Detach();
  191. }
  192. if(window["C_ModelessDialog"]){
  193. C_ModelessDialog.F_Detach();
  194. }
  195. if(window["C_ComboBox"]){
  196. C_ComboBox.F_Detach();
  197. }
  198. };
  199. G_HAL.F_OnResize=function(e){
  200. e=e||window.event;
  201. var _16=document.body.clientWidth;
  202. var _17=document.body.clientHeight;
  203. if((_16==G_HAL.m_iClientWidth)&&(_17==G_HAL.m_iClientHeight)){
  204. return;
  205. }
  206. G_HAL.m_iClientWidth=_16;
  207. G_HAL.m_iClientHeight=_17;
  208. if(window["U_Dialog"]){
  209. U_Dialog.F_KeepDialogsVisible();
  210. }
  211. var _18=window["G_App"];
  212. if(window["F_HAL_OnResize"]){
  213. F_HAL_OnResize(e);
  214. }else{
  215. var _18=window["G_App"];
  216. if(_18&&_18["F_HAL_OnResize"]){
  217. _18.F_HAL_OnResize(e);
  218. }
  219. }
  220. if(G_HAL.f_originalWindowOnResize){
  221. G_HAL.f_originalWindowOnResize(e);
  222. }
  223. };
  224. G_HAL.F_OnOrientationChange=function(e){
  225. e=e||window.event;
  226. var _19=window["G_App"];
  227. if(window["F_HAL_OnOrientationChange"]){
  228. F_HAL_OnOrientationChange(e);
  229. }else{
  230. var _19=window["G_App"];
  231. if(_19&&_19["F_HAL_OnOrientationChange"]){
  232. _19.F_HAL_OnOrientationChange(e);
  233. }
  234. }
  235. if(G_HAL.f_originalOrientationChange){
  236. G_HAL.f_originalOrientationChange(e);
  237. }
  238. };
  239. if(!G_HAL.M_oLibraries["hal"]["fireDOMContentLoaded"]){
  240. }else{
  241. if((navigator.product=="Gecko")||(navigator.userAgent.toLowerCase().indexOf("webkit")!=-1)){
  242. document.addEventListener("DOMContentLoaded",function(){
  243. document.removeEventListener("DOMContentLoaded",arguments.callee,false);
  244. G_HAL.F_OnDomContentLoaded();
  245. },false);
  246. }else{
  247. document.attachEvent("onreadystatechange",function(){
  248. if(document.readyState==="complete"){
  249. document.detachEvent("onreadystatechange",arguments.callee);
  250. G_HAL.F_OnDomContentLoaded();
  251. }
  252. });
  253. }
  254. }
  255. if(window.onload){
  256. G_HAL.f_originalWindowOnLoad=window.onload;
  257. }
  258. window.onload=G_HAL.F_OnLoad;
  259. if(window.onunload){
  260. G_HAL.f_originalWindowOnUnLoad=window.onunload;
  261. }
  262. window.onunload=G_HAL.F_OnUnLoad;
  263. G_HAL.F_VerifyDependencies=function(){
  264. return;
  265. };
  266. G_HAL.F_GetHtmlToWrite=function(){
  267. var a=[];
  268. if(window["G_DragDrop"]){
  269. a.push(G_DragDrop.F_GetCursorsHtml());
  270. if(window["C_TreeView"]){
  271. a.push(C_TreeView.F_GetCaretsHtml());
  272. }
  273. if(window["C_OrgTreeView"]){
  274. a.push(C_OrgTreeView.F_GetCaretsHtml());
  275. }
  276. if(window["C_ListView"]){
  277. a.push(C_ListView.F_GetCaretsHtml());
  278. }
  279. }
  280. if(window["C_ModelessDialog"]){
  281. a.push(C_ModelessDialog.F_GetModelessDialogTemplateHtml());
  282. }
  283. if(window["C_Dialog"]){
  284. a.push(C_Dialog.F_GetModalDialogTemplateHtml());
  285. for(var s in this.M_oBuiltInDialogs){
  286. if((s=="D_PropertySheetListView")&&!window["C_PropertySheet"]){
  287. continue;
  288. }
  289. var _1a=window[s];
  290. if(_1a){
  291. a.push(_1a.F_GetDialogHtml());
  292. }
  293. }
  294. }
  295. return a.join("");
  296. };
  297. G_HAL.F_GetWidgetFrameBorderHtml=function(_1b){
  298. if(!this.m_oWidgetFrameBorderHtmlStream){
  299. var os=new C_StringStream();
  300. os.F_Write("<div class=\"");
  301. os.F_CreatePlaceHolder();
  302. os.F_Write("\" style=\"width:100%; height:100%\">");
  303. os.F_Write("<table role=\"presentation\" class=\"");
  304. os.F_CreatePlaceHolder();
  305. os.F_Write("\" cellpadding=\"0\" cellspacing=\"0\" style=\"height:100%; width:100%; border-collapse:collapse;\">");
  306. os.F_Write("<tr class=\"clsScale25_t\">");
  307. os.F_Write("<td class=\"clsScale25_t_l\"><img class=\"clsScale25_t_l_spacer\" alt=\"\" src=\"");
  308. os.F_Write(G_HAL.M_sImagePath);
  309. os.F_Write("blank.gif\"/></td>");
  310. os.F_Write("<td class=\"clsScale25_t_li\"></td>");
  311. os.F_Write("<td class=\"clsScale25_t_m\"></td>");
  312. os.F_Write("<td class=\"clsScale25_t_ri\"></td>");
  313. os.F_Write("<td class=\"clsScale25_t_r\"></td>");
  314. os.F_Write("</tr>");
  315. os.F_Write("<tr class=\"clsScale25_ti\">");
  316. os.F_Write("<td class=\"clsScale25_ti_l\"></td>");
  317. os.F_Write("<td class=\"clsScale25_ti_li\"><img class=\"clsScale25_ti_li_spacer\" alt=\"\" src=\"");
  318. os.F_Write(G_HAL.M_sImagePath);
  319. os.F_Write("blank.gif\"/></td>");
  320. os.F_Write("<td class=\"clsScale25_ti_m\"></td>");
  321. os.F_Write("<td class=\"clsScale25_ti_ri\"></td>");
  322. os.F_Write("<td class=\"clsScale25_ti_r\"></td>");
  323. os.F_Write("</tr>");
  324. os.F_Write("<tr class=\"clsScale25_m\">");
  325. os.F_Write("<td class=\"clsScale25_m_l\"></td>");
  326. os.F_Write("<td class=\"clsScale25_m_li\">");
  327. os.F_Write("<div class=\"clsScale25_m_li_inner\"></div>");
  328. os.F_Write("</td>");
  329. os.F_Write("<td class=\"clsScale25_m_m\">");
  330. os.F_Write("<div class=\"clsScale25_m_m_inner\"></div>");
  331. os.F_Write("</td>");
  332. os.F_Write("<td class=\"clsScale25_m_ri\">");
  333. os.F_Write("<div class=\"clsScale25_m_ri_inner\"></div>");
  334. os.F_Write("</td>");
  335. os.F_Write("<td class=\"clsScale25_m_r\"></td>");
  336. os.F_Write("</tr>");
  337. os.F_Write("<tr class=\"clsScale25_bi\">");
  338. os.F_Write("<td class=\"clsScale25_bi_l\"></td>");
  339. os.F_Write("<td class=\"clsScale25_bi_li\"></td>");
  340. os.F_Write("<td class=\"clsScale25_bi_m\"></td>");
  341. os.F_Write("<td class=\"clsScale25_bi_ri\"><img class=\"clsScale25_bi_ri_spacer\" alt=\"\" src=\"");
  342. os.F_Write(G_HAL.M_sImagePath);
  343. os.F_Write("blank.gif\"/></td>");
  344. os.F_Write("<td class=\"clsScale25_bi_r\"></td>");
  345. os.F_Write("</tr>");
  346. os.F_Write("<tr class=\"clsScale25_b\">");
  347. os.F_Write("<td class=\"clsScale25_b_l\"></td>");
  348. os.F_Write("<td class=\"clsScale25_b_li\"></td>");
  349. os.F_Write("<td class=\"clsScale25_b_m\"></td>");
  350. os.F_Write("<td class=\"clsScale25_b_ri\"></td>");
  351. os.F_Write("<td class=\"clsScale25_b_r\"><img class=\"clsScale25_b_r_spacer\" alt=\"\" src=\"");
  352. os.F_Write(G_HAL.M_sImagePath);
  353. os.F_Write("blank.gif\"/></td>");
  354. os.F_Write("</tr>");
  355. os.F_Write("</table>");
  356. os.F_Write("</div>");
  357. this.m_oWidgetFrameBorderHtmlStream=os;
  358. }
  359. this.m_oWidgetFrameBorderHtmlStream.F_WriteToPlaceHolder(1,_1b);
  360. this.m_oWidgetFrameBorderHtmlStream.F_WriteToPlaceHolder(2,_1b);
  361. return this.m_oWidgetFrameBorderHtmlStream.F_ToString();
  362. };
  363. G_HAL.F_UpdateWidgetFrameBorderClass=function(_1c,_1d){
  364. if(_1c.className!=_1d){
  365. _1c.className=_1d;
  366. }
  367. var tbl=_1c.firstChild;
  368. if(tbl.className!=_1d){
  369. tbl.className=_1d;
  370. }
  371. };
  372. G_HAL.F_EnableHighContrastMode=function(){
  373. this.M_oLibraries["hal"]["enableHighContrastMode"]=true;
  374. (new C_ClassList(document.body)).F_Add("clsHighContrast");
  375. var _1e=document.getElementsByTagName("IMG");
  376. for(var i=0;i<_1e.length;i++){
  377. _1e[i].src=U_HighContrast.F_GetHighContrastImgIfNecessary(_1e[i].getAttribute("src"));
  378. }
  379. };
  380. G_HAL.F_EnableAccessibility=function(_1f,_20){
  381. this.M_oLibraries["hal"]["enableAccessibility"]=_1f;
  382. if(!_1f&&!G_BrowserInfo.M_bIsIE&&!_20){
  383. var _21=U_DOM.F_GetStyleSheet("idHalBrowserStyles");
  384. if(_21){
  385. _21.addRule("*:focus","outline:none");
  386. }
  387. }
  388. };
  389. G_HAL.F_EnableAllAnimation=function(_22){
  390. G_HAL.M_oLibraries["hal"]["enableDialogShowAnimation"]=_22;
  391. G_HAL.M_oLibraries["hal"]["enableDialogMoveAnimation"]=_22;
  392. G_HAL.M_oLibraries["hal"]["enableDialogResizeAnimation"]=_22;
  393. G_HAL.M_oLibraries["hal"]["menuAnimation"]=_22;
  394. G_HAL.M_oLibraries["hal"]["enableComboBoxAnimation"]=_22;
  395. G_HAL.M_oLibraries["hal"]["enablePaneAnimation"]=_22;
  396. };
  397. G_HAL.F_SetTestListener=function(_23){
  398. G_HAL.M_oTestListener=_23;
  399. };
  400. G_HAL.F_RemoveTestListener=function(){
  401. delete G_HAL.M_oTestListener;
  402. };
  403. var G_BrowserInfo={};
  404. G_BrowserInfo.M_bIsGecko=false;
  405. G_BrowserInfo.M_bIsFirefox=false;
  406. G_BrowserInfo.M_bIsIE=false;
  407. G_BrowserInfo.M_bIsWebKit=false;
  408. G_BrowserInfo.M_bIsSupported=false;
  409. G_BrowserInfo.M_bIsSupportedIE=false;
  410. G_BrowserInfo.M_bIsSupportedFirefox=false;
  411. G_BrowserInfo.f_init=function(){
  412. var _24=navigator.userAgent.toLowerCase();
  413. this.M_bIsIPhone=_24.indexOf("iphone")!=-1;
  414. this.M_bIsIPod=_24.indexOf("ipod")!=-1;
  415. this.M_bIsIPad=_24.indexOf("ipad")!=-1;
  416. this.M_bIsIOS=this.M_bIsIPhone||this.M_bIsIPod||this.M_bIsIPad;
  417. this.M_bIsAndroid=_24.indexOf("android")!=-1;
  418. this.M_bIsWebKit=_24.indexOf("webkit")!=-1;
  419. this.M_bIsChrome=_24.indexOf("chrome")!=-1;
  420. this.M_bIsAndroidBrowser=this.M_bIsAndroid&&!this.M_bIsChrome;
  421. this.M_bIsGecko=!this.M_bIsWebKit&&(navigator.product=="Gecko");
  422. this.M_bIsPointerEnabled=G_HAL.M_oLibraries["hal"]["enablePointerSupport"]&&navigator.msPointerEnabled;
  423. this.M_bIsTouchDevice=this.M_bIsIOS||this.M_bIsAndroid||(navigator.msMaxTouchPoints>1);
  424. this.M_bIsFirefox=(_24.match(/firefox|minefield|shiretoko|namoroka/)!=null);
  425. var _25=0;
  426. if(_24.search(/(?:firefox|minefield|shiretoko|namoroka)\/([0-9]+\.[0-9]+)/)!=-1){
  427. _25=parseFloat(RegExp.$1);
  428. }
  429. this.M_bIsSupportedFirefox=(this.M_bIsFirefox&&(_25>=1.5));
  430. this.M_bFirefox3OrLater=(this.M_bIsFirefox&&(_25>=3));
  431. this.M_bFirefox4OrLater=(this.M_bIsFirefox&&(_25>=4));
  432. this.M_bFirefox13OrLater=(this.M_bIsFirefox&&(_25>=13));
  433. this.M_bFirefox35OrLater=(this.M_bIsFirefox&&(_25>=3.5));
  434. this.M_bIsIE=((_24.indexOf("msie")!=-1)&&(_24.indexOf("opera")==-1));
  435. var _26=0;
  436. if(_24.search(/msie\s+([0-9]+\.[0-9]+)/)!=-1){
  437. _26=RegExp.$1;
  438. }
  439. var _27=parseInt(navigator.appVersion);
  440. var _28=(_24.search(/trident\/([0-9]+\.[0-9]+)/)!=-1)?parseFloat(RegExp.$1):NaN;
  441. this.M_bIsIE6=(this.M_bIsIE&&(_26>=6)&&(_26<7));
  442. this.M_bIE8OrLater=(this.M_bIsIE&&((_26>=8)||(!isNaN(_28)&&(_28>=4))));
  443. this.M_bIE9OrLater=(this.M_bIE8OrLater&&(!isNaN(_28)&&(_28>=5)));
  444. this.M_bIE10OrLater=(this.M_bIE9OrLater&&(!isNaN(_28)&&(_28>=6)));
  445. this.M_bIsSupportedIE=(this.M_bIsIE&&_26>=6);
  446. this.M_bIsHtml5QuirksMode=(this.M_bIE10OrLater&&(document.documentMode==10)&&(document.compatMode=="BackCompat"));
  447. this.M_bIsIE5QuirksMode=(this.M_bIsIE&&!this.M_bIsHtml5QuirksMode);
  448. var _29=0;
  449. if(_24.match(/chrome/)!=null&&_24.search(/chrome\/([0-9]+\.[0-9]+)/)!=-1){
  450. _29=RegExp.$1;
  451. }
  452. var _2a=0;
  453. if(_24.match(/safari/)!=null&&_24.search(/version\/([0-9]+\.[0-9]+)/)!=-1){
  454. _2a=RegExp.$1;
  455. }
  456. this.M_bIsChrome21OrLater=(_29>=21);
  457. this.M_bIsSafari5OrLater=(_2a>=5);
  458. this.M_bIsSupported=(this.M_bIsSupportedIE||this.M_bIsSupportedFirefox||this.M_bIsChrome21OrLater||this.M_bIsSafari5OrLater);
  459. };
  460. G_BrowserInfo.f_init();
  461. var U_DOM={};
  462. U_DOM.K_iKeyBackSpace=8;
  463. U_DOM.K_iKeyTab=9;
  464. U_DOM.K_iKeyEnter=13;
  465. U_DOM.K_iKeyEscape=27;
  466. U_DOM.K_iKeySpace=32;
  467. U_DOM.K_iKeyPgUp=33;
  468. U_DOM.K_iKeyPgDn=34;
  469. U_DOM.K_iKeyEnd=35;
  470. U_DOM.K_iKeyHome=36;
  471. U_DOM.K_iKeyArrowLeft=37;
  472. U_DOM.K_iKeyArrowUp=38;
  473. U_DOM.K_iKeyArrowRight=39;
  474. U_DOM.K_iKeyArrowDown=40;
  475. U_DOM.K_iKeyInsert=45;
  476. U_DOM.K_iKeyDelete=46;
  477. U_DOM.K_iKeyA=65;
  478. U_DOM.K_iKeyF5=116;
  479. U_DOM.K_iKeyF1=112;
  480. U_DOM.K_iKeyF10=121;
  481. U_DOM.K_iKeyPlus=107;
  482. U_DOM.K_iKeyMinus=109;
  483. U_DOM.K_iLeftMouseButton=G_BrowserInfo.M_bIsIE5QuirksMode?1:0;
  484. U_DOM.K_iRightMouseButton=2;
  485. U_DOM.F_CancelEvent=function(e){
  486. e=e||window.event;
  487. e.returnValue=false;
  488. e.cancelBubble=true;
  489. };
  490. U_DOM.F_CancelBubble=function(e){
  491. (e||window.event).cancelBubble=true;
  492. };
  493. U_DOM.F_CancelKeyboardEvent=function(e){
  494. e.returnValue=false;
  495. try{
  496. e.keyCode=0;
  497. }
  498. catch(e){
  499. }
  500. e.cancelBubble=true;
  501. };
  502. U_DOM.F_DeleteTableRows=function(tbl){
  503. if(tbl.rows){
  504. for(var i=tbl.rows.length-1;i>=0;i--){
  505. tbl.deleteRow(i);
  506. }
  507. }
  508. };
  509. U_DOM.F_SetActiveOrFocus=function(el){
  510. try{
  511. if(G_BrowserInfo.M_bIsIE){
  512. el.setActive();
  513. }else{
  514. if(el.focus){
  515. el.focus();
  516. }else{
  517. G_Debug.F_Print("focus not supported on "+el.tagName);
  518. G_Debug.F_Assert(false);
  519. }
  520. }
  521. }
  522. catch(e){
  523. }
  524. };
  525. U_DOM.F_RemoveAllChildren=function(_2b){
  526. if(!_2b){
  527. return;
  528. }
  529. var _2c=null;
  530. for(var i=_2b.childNodes.length-1;i>=0;i--){
  531. _2c=_2b.childNodes[i];
  532. _2b.removeChild(_2c);
  533. _2c=null;
  534. }
  535. };
  536. U_DOM.F_GetNextSiblingElement=function(el){
  537. for(var _2d=el.nextSibling;_2d;_2d=_2d.nextSibling){
  538. if(_2d.nodeType==U_XML.K_iNODE_ELEMENT){
  539. return _2d;
  540. }
  541. }
  542. return null;
  543. };
  544. U_DOM.F_HandleContextMenu=function(e){
  545. e=e||window.event;
  546. if(!U_DOM.F_IsSelectable(e.srcElement)){
  547. U_DOM.F_CancelEvent(e);
  548. return false;
  549. }
  550. return true;
  551. };
  552. U_DOM.F_HandleSelectStart=function(e){
  553. e=e||window.event;
  554. if(!U_DOM.F_IsSelectable(e.srcElement)){
  555. U_DOM.F_CancelEvent(e);
  556. return false;
  557. }
  558. return true;
  559. };
  560. U_DOM.F_IsSelectable=function(el){
  561. if(el.getAttribute){
  562. switch(el.getAttribute("HAL_isSelectable")){
  563. case "true":
  564. return true;
  565. case "false":
  566. return false;
  567. }
  568. }
  569. switch(el.nodeName){
  570. case "TEXTAREA":
  571. return true;
  572. case "INPUT":
  573. return (el.type=="text");
  574. }
  575. return false;
  576. };
  577. U_DOM.F_HasCaret=function(el){
  578. if(G_BrowserInfo.M_bIsIE){
  579. return (document.selection.createRange().parentElement()==el);
  580. }
  581. return (((window.s_IdCurrentTextBox!="")&&(window.s_IdCurrentTextBox==el.id))||(window.h_elActiveElement&&(window.h_elActiveElement==el)&&U_DOM.F_IsTextBoxOrTextArea(el)));
  582. };
  583. U_DOM.F_GetSelectedTextPosition=function(_2e){
  584. var _2f;
  585. var _30;
  586. if(G_BrowserInfo.M_bIsIE){
  587. var _31=document.selection.createRange();
  588. if(_31.parentElement()!=_2e){
  589. return null;
  590. }
  591. var _32=_31.duplicate();
  592. _32.moveToElementText(_2e);
  593. _32.setEndPoint("EndToStart",_31);
  594. _2f=_32.text.length-this.f_getNewLinesCount(_32.text);
  595. _30=_2f+_31.text.length-this.f_getNewLinesCount(_31.text);
  596. }else{
  597. _2f=_2e.selectionStart;
  598. _30=_2e.selectionEnd;
  599. }
  600. return {M_iStart:_2f,M_iEnd:_30};
  601. };
  602. U_DOM.f_getNewLinesCount=function(_33){
  603. var i=0;
  604. var _34=-1;
  605. do{
  606. i=_33.indexOf("\r\n",i);
  607. _34++;
  608. }while(i++>=0);
  609. return _34;
  610. };
  611. U_DOM.F_IsTextSelected=function(){
  612. if(G_BrowserInfo.M_bIsIE){
  613. return (document.selection.type=="Text")&&(document.selection.createRange().text.length>0);
  614. }
  615. if(window.getSelection()!=""){
  616. return true;
  617. }
  618. if(window.s_IdCurrentTextBox){
  619. var _35=document.getElementById(window.s_IdCurrentTextBox);
  620. return Boolean(_35&&(_35.selectionStart!=_35.selectionEnd));
  621. }
  622. return false;
  623. };
  624. U_DOM.F_GetSelectedText=function(){
  625. if(G_BrowserInfo.M_bIsIE){
  626. return document.selection.createRange().text;
  627. }
  628. if(window.getSelection()!=""){
  629. return window.getSelection().toString();
  630. }
  631. if(window.s_IdCurrentTextBox){
  632. var _36=document.getElementById(window.s_IdCurrentTextBox);
  633. if(_36){
  634. return _36.value.substring(_36.selectionStart,_36.selectionEnd);
  635. }
  636. }
  637. };
  638. U_DOM.F_ClearSelection=function(){
  639. if(window.getSelection){
  640. window.getSelection().removeAllRanges();
  641. }else{
  642. if(document.selection){
  643. document.selection.empty();
  644. }
  645. }
  646. };
  647. U_DOM.F_SetSelectionRange=function(_37,_38,_39){
  648. if(G_BrowserInfo.M_bIsIE){
  649. var rng=_37.createTextRange();
  650. rng.collapse(true);
  651. rng.moveEnd("character",_39);
  652. rng.moveStart("character",_38);
  653. rng.select();
  654. }else{
  655. _37.focus();
  656. if(_37.setSelectionRange){
  657. _37.setSelectionRange(_38,_39);
  658. }else{
  659. G_Debug.F_Print("U_DOM.F_SetSelectionRange (non-ie): This should only be called for textareas and text boxes, not for "+_37.tagName);
  660. }
  661. }
  662. };
  663. U_DOM.F_MoveCaretToMousePos=function(_3a,e){
  664. if(G_BrowserInfo.M_bIsIE){
  665. var rng=_3a.createTextRange();
  666. rng.moveToPoint(e.x,e.y);
  667. rng.select();
  668. }else{
  669. if(G_BrowserInfo.M_bFirefox3OrLater){
  670. _3a.focus();
  671. G_Debug.F_Print("Unable to determine cursor position with Firefox 3");
  672. }else{
  673. if(e.rangeParent&&e.rangeParent!=null){
  674. _3a.focus();
  675. var _3b=0;
  676. try{
  677. _3b=e.rangeOffset;
  678. _3b=this.f_findLocation(e.rangeParent,e.rangeOffset);
  679. }
  680. catch(ex){
  681. G_Debug.F_Print("U_DOM.F_MoveCaretToMousePos: selection failed: "+ex);
  682. _3b=e.srcElement.selectionStart;
  683. }
  684. _3a.setSelectionRange(_3b,_3b);
  685. }else{
  686. G_Debug.F_Print("U_DOM.F_MoveCaretToMousePos: selection failed");
  687. }
  688. }
  689. }
  690. };
  691. U_DOM.f_findLocation=function(_3c,_3d){
  692. while(_3c.previousSibling){
  693. _3c=_3c.previousSibling;
  694. if(_3c.length){
  695. _3d+=_3c.length;
  696. }else{
  697. _3d+=1;
  698. }
  699. }
  700. return _3d;
  701. };
  702. U_DOM.F_ReplaceTextSelection=function(_3e,_3f){
  703. if(G_BrowserInfo.M_bIsIE){
  704. var rng=document.selection.createRange();
  705. var _40=(rng.text=="");
  706. rng.text=_3e;
  707. if(!_40&&_3f){
  708. rng.moveStart("character",-_3e.length);
  709. rng.select();
  710. }
  711. return;
  712. }
  713. var _41=null;
  714. if(window.s_IdCurrentTextBox!=""){
  715. _41=document.getElementById(window.s_IdCurrentTextBox);
  716. }else{
  717. if(window.h_elActiveElement&&window.h_elActiveElement.tagName=="TEXTAREA"||(window.h_elActiveElement.tagName=="INPUT"&&window.h_elActiveElement.type=="text")){
  718. _41=window.h_elActiveElement;
  719. }
  720. }
  721. if(_41){
  722. var _42=_41.selectionStart;
  723. var _43=_41.selectionEnd;
  724. _41.value=_41.value.substring(0,_42)+_3e+_41.value.substring(_43);
  725. var _44=_42+_3e.length;
  726. if(_3f){
  727. U_DOM.F_SetSelectionRange(_41,_42,_44);
  728. }else{
  729. U_DOM.F_SetSelectionRange(_41,_44,_44);
  730. }
  731. }else{
  732. if(window.getSelection()!=""){
  733. var _45=window.getSelection().getRangeAt(0);
  734. if(_45.startContainer!=_45.endContainer){
  735. G_Debug.F_Print("U_DOM.F_ReplaceTextSelection does not support selection across elements");
  736. return;
  737. }
  738. var _46=_45.startContainer.nodeValue;
  739. var _47=_45.endOffset;
  740. var _48=_46.substring(_45.startOffset,_47);
  741. var _49=_46.substring(0,_45.startOffset);
  742. var _4a=_46.substring(_47);
  743. _45.startContainer.nodeValue=_49+_3e+_4a;
  744. if(_3f){
  745. _45.selectNode(_45.startContainer.parentNode);
  746. }
  747. }
  748. }
  749. };
  750. U_DOM.F_IsTextBoxOrTextArea=function(el){
  751. if(!el){
  752. return false;
  753. }
  754. if(el.tagName=="INPUT"&&el.type=="text"){
  755. return true;
  756. }
  757. return (el.tagName=="TEXTAREA");
  758. };
  759. U_DOM.F_HandleTab=function(e){
  760. e=e||window.event;
  761. this.F_CancelEvent(e);
  762. if(G_BrowserInfo.M_bIsIE){
  763. if(document.selection.type=="Text"){
  764. document.selection.clear();
  765. }
  766. document.selection.createRange().text=String.fromCharCode(e.keyCode);
  767. }else{
  768. if(this.F_IsTextBoxOrTextArea(e.srcElement)){
  769. var _4b=e.srcElement;
  770. var _4c=_4b.selectionStart;
  771. var _4d=_4b.selectionEnd;
  772. _4b.value=_4b.value.substring(0,_4c)+String.fromCharCode(e.keyCode)+_4b.value.substring(_4d);
  773. var _4e=String.fromCharCode(e.keyCode).length;
  774. this.F_SetSelectionRange(_4b,_4d+_4e,_4d+_4e);
  775. }else{
  776. G_Debug.F_Print("U_DOM.F_HandleTab (non IE) only works for text areas and text inputs, not "+e.srcElement.tagName);
  777. }
  778. }
  779. };
  780. U_DOM.F_IsVisible=function(el){
  781. if(el.currentStyle.visibility=="visible"){
  782. return true;
  783. }
  784. if(el.currentStyle.visibility=="hidden"){
  785. return false;
  786. }
  787. return (!el.parentNode||!el.parentNode.currentStyle||this.F_IsVisible(el.parentNode));
  788. };
  789. U_DOM.F_IsDisplayNone=function(el){
  790. for(;el&&el.currentStyle;el=el.parentNode){
  791. if(el.currentStyle.display=="none"){
  792. return true;
  793. }
  794. }
  795. return false;
  796. };
  797. U_DOM.F_SetRadioButtonEnabled=function(_4f,_50){
  798. _4f.disabled=!_50;
  799. var _51=_4f.parentElement;
  800. if(_51.tagName=="LABEL"){
  801. _51.disabled=!_50;
  802. if(!G_BrowserInfo.M_bIsIE){
  803. _51.setAttribute("HAL_disabled",_50?"false":"true");
  804. }
  805. }
  806. U_Accessibility.F_SetAriaStateAndProperty(_4f,"aria-disabled",!_50);
  807. };
  808. U_DOM.F_SetCheckboxEnabled=function(_52,_53){
  809. _52.disabled=!_53;
  810. var _54=_52.parentElement;
  811. if(_54.tagName=="LABEL"){
  812. _54.disabled=!_53;
  813. if(!G_BrowserInfo.M_bIsIE){
  814. _54.setAttribute("HAL_disabled",_53?"false":"true");
  815. }
  816. }
  817. U_Accessibility.F_SetAriaStateAndProperty(_52,"aria-disabled",!_53);
  818. };
  819. U_DOM.F_SetTextEnabled=function(_55,_56){
  820. _55.disabled=!_56;
  821. if(!G_BrowserInfo.M_bIsIE){
  822. _55.setAttribute("HAL_disabled",_56?"false":"true");
  823. }
  824. U_Accessibility.F_SetAriaStateAndProperty(_55,"aria-disabled",!_56);
  825. if(G_HAL.M_oLibraries["hal"]["enableAccessibility"]){
  826. var _57=_55.getAttribute("tabIndex");
  827. if(_57=="0"&&!_56){
  828. U_Accessibility.F_SetTabIndex(_55,"-1");
  829. }else{
  830. if(_57=="-1"&&_56){
  831. U_Accessibility.F_RestoreIndex(_55);
  832. }
  833. }
  834. }
  835. };
  836. U_DOM.F_SetTextInputEnabled=function(_58,_59){
  837. _58.disabled=!_59;
  838. if(!G_BrowserInfo.M_bIsIE){
  839. _58.setAttribute("HAL_disabled",_59?"false":"true");
  840. }
  841. U_Accessibility.F_SetAriaStateAndProperty(_58,"aria-disabled",!_59);
  842. };
  843. U_DOM.F_SetButtonEnabled=function(_5a,_5b,_5c){
  844. var btn=document.getElementById(_5a);
  845. var _5d=!btn.disabled;
  846. this.F_SetButtonEnabledFromButton(btn,_5b,_5c);
  847. if(G_HAL.M_oTestListener&&G_HAL.M_oTestListener.F_DOM_OnButtonEnabled&&(_5d!=Boolean(_5b))){
  848. G_HAL.M_oTestListener.F_DOM_OnButtonEnabled(_5a,_5b);
  849. }
  850. };
  851. U_DOM.F_SetButtonEnabledFromButton=function(btn,_5e,_5f){
  852. if(!btn){
  853. return;
  854. }
  855. var _60=!_5e;
  856. if((_60!=btn.disabled)||(btn.getAttribute("v_sImage")!=_5f)){
  857. if(_5f){
  858. btn.setAttribute("v_sImage",_5f);
  859. var nl=btn.getElementsByTagName("IMG");
  860. if(nl.length>0){
  861. var _61=btn.disabled;
  862. if(_61){
  863. btn.disabled=false;
  864. if(!G_BrowserInfo.M_bIsIE){
  865. btn.setAttribute("HAL_disabled","false");
  866. }
  867. }
  868. var _62=(_60?"_disabled.gif":".gif");
  869. var _63=nl.item(0);
  870. var _64=nl.item(nl.length-1);
  871. _63.src=G_HAL.F_GetImageURL(_5f+_62);
  872. if(_64.src.indexOf("dropdown_arrow")!=-1){
  873. _64.src=U_HighContrast.F_GetHighContrastImgIfNecessary(G_HAL.M_sImagePath+"dropdown_arrow"+_62);
  874. }
  875. if(btn.getAttribute("v_sButtonType")=="tblDropdown"){
  876. btn.nextSibling.disabled=_60;
  877. btn.nextSibling.firstChild.src=U_HighContrast.F_GetHighContrastImgIfNecessary(G_HAL.M_sImagePath+"dropdown_arrow"+_62);
  878. }
  879. if(_61){
  880. btn.disabled=true;
  881. if(!G_BrowserInfo.M_bIsIE){
  882. btn.setAttribute("HAL_disabled","true");
  883. }
  884. }
  885. if(_60&&(btn.getAttribute("HAL_isCoolButton")=="true")){
  886. btn.className=btn.v_sClassPrefix;
  887. }
  888. }
  889. }
  890. btn.disabled=_60;
  891. if(!G_BrowserInfo.M_bIsIE){
  892. btn.setAttribute("HAL_disabled",_60?"true":"false");
  893. }
  894. if(btn.v_bIsDlgButton){
  895. var _65=btn.v_sClassPrefix;
  896. if(btn.v_bIsDotDotDotButton||btn.v_bIsDlgButtonDropDownArrow){
  897. btn.className=_65+(_60?"_disabled":"");
  898. }else{
  899. btn.className=(_60?_65+" "+_65+"_disabled":_65);
  900. }
  901. }
  902. }
  903. U_Accessibility.F_SetAriaStateAndProperty(btn,"aria-disabled",!_5e);
  904. };
  905. U_DOM.F_SetFirstClassName=function(el,_66){
  906. var i=el.className.indexOf(" ");
  907. el.className=_66+((i==-1)?"":el.className.substring(i));
  908. };
  909. U_DOM.F_GetFirstClassName=function(el){
  910. if(!el.className){
  911. return "";
  912. }
  913. var i=el.className.indexOf(" ");
  914. return (i==-1)?el.className:el.className.substr(0,i);
  915. };
  916. U_DOM.F_ShowChildWindow=function(_67,_68,_69,_6a,_6b,_6c,_6d,_6e){
  917. var _6f=_6a?_6a.width:700;
  918. var _70=_6a?_6a.height:250;
  919. var _71=_6b?_6b.top:Math.F_NonNeg(screen.availHeight-_70);
  920. var _72=_6b?_6b.left:Math.F_NonNeg(screen.availWidth-_6f);
  921. if(_6c){
  922. _72=(document.body.clientWidth/2)-(_6f/2);
  923. _71=(document.body.clientHeight/2)-(_70/2);
  924. }
  925. if(_6e){
  926. var _73="";
  927. for(var i=0;i<document.styleSheets.length;i++){
  928. if(document.styleSheets[i]&&document.styleSheets[i].href!=""&&document.styleSheets[i].href.indexOf("css")!=-1){
  929. _73+="<link rel=\"stylesheet\" type=\"text/css\" href=\""+document.styleSheets[i].href+"\"/>";
  930. }
  931. }
  932. }
  933. var _74=_6d?"yes":"no";
  934. var _75=false;
  935. if(G_BrowserInfo.M_bIsIE){
  936. try{
  937. _75=true;
  938. 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);
  939. }
  940. catch(e){
  941. _75=false;
  942. }
  943. }
  944. if(!_75){
  945. 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);
  946. if(this.F_WindowOpenWasBlocked(_76)){
  947. return null;
  948. }
  949. }
  950. var _77=[];
  951. _77.push("<html><head><title>"+_68+"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</title>");
  952. _77.push(_73);
  953. _77.push("</head><body style=\""+(_69?_69:"")+"\">");
  954. _77.push(_67);
  955. _77.push("</body></html>");
  956. _76.document.open();
  957. _76.document.write(_77.join(""));
  958. _76.document.close();
  959. _76.document.title=_68+" ";
  960. _76.focus();
  961. return _76;
  962. };
  963. U_DOM.F_IsInElement=function(e,el){
  964. var _78=this.F_GetRelativeOffset(el,el.ownerDocument.body);
  965. return Math.F_PointInRect(e.clientY+el.ownerDocument.body.scrollTop,e.clientX+el.ownerDocument.body.scrollLeft,_78.top,_78.left,el.offsetWidth,el.offsetHeight);
  966. };
  967. U_DOM.F_GetOffsetTop=function(el){
  968. if(G_BrowserInfo.M_bIsIE){
  969. return el.offsetTop;
  970. }
  971. if(el.offsetParent&&el.offsetParent.currentStyle.overflow!="hidden"){
  972. return (el.offsetTop-this.F_GetBorderTopWidth(el.offsetParent));
  973. }
  974. return el.offsetTop;
  975. };
  976. U_DOM.F_GetOffsetLeft=function(el){
  977. if(G_BrowserInfo.M_bIsIE){
  978. return el.offsetLeft;
  979. }
  980. if(el.offsetParent&&el.offsetParent.currentStyle.overflow!="hidden"){
  981. return (el.offsetLeft-this.F_GetBorderLeftWidth(el.offsetParent));
  982. }
  983. return el.offsetLeft;
  984. };
  985. U_DOM.F_GetHorizontalBorderWidth=function(el){
  986. return this.F_GetBorderLeftWidth(el)+this.F_GetBorderRightWidth(el);
  987. };
  988. U_DOM.F_GetVerticalBorderWidth=function(el){
  989. return this.F_GetBorderTopWidth(el)+this.F_GetBorderBottomWidth(el);
  990. };
  991. U_DOM.F_GetBorderTopWidth=function(el){
  992. return this.f_getBorderValue(el,"Top");
  993. };
  994. U_DOM.F_GetBorderRightWidth=function(el){
  995. return this.f_getBorderValue(el,"Right");
  996. };
  997. U_DOM.F_GetBorderBottomWidth=function(el){
  998. return this.f_getBorderValue(el,"Bottom");
  999. };
  1000. U_DOM.F_GetBorderLeftWidth=function(el){
  1001. return this.f_getBorderValue(el,"Left");
  1002. };
  1003. U_DOM.f_getBorderValue=function(el,_79){
  1004. var _7a=el.currentStyle["border"+_79+"Width"];
  1005. var _7b=parseInt(_7a,10);
  1006. if(isNaN(_7b)){
  1007. return ((_7a=="medium")&&(el.currentStyle["border"+_79+"Style"]!="none"))?4:0;
  1008. }
  1009. return _7b;
  1010. };
  1011. U_DOM.F_GetVerticalPadding=function(el){
  1012. return parseInt(el.currentStyle.paddingTop,10)+parseInt(el.currentStyle.paddingBottom,10);
  1013. };
  1014. U_DOM.F_GetHorizontalPadding=function(el){
  1015. return parseInt(el.currentStyle.paddingLeft,10)+parseInt(el.currentStyle.paddingRight,10);
  1016. };
  1017. U_DOM.F_GetContentDimensions=function(el){
  1018. return (new C_Dimension(el.offsetHeight,el.offsetWidth)).F_Subtract(this.F_GetNonContentDimensions(el));
  1019. };
  1020. U_DOM.F_GetNonContentDimensions=function(el){
  1021. return new C_Dimension(this.F_GetVerticalPadding(el)+this.F_GetVerticalBorderWidth(el),this.F_GetHorizontalPadding(el)+this.F_GetHorizontalBorderWidth(el));
  1022. };
  1023. U_DOM.F_SetOpacity=function(el,_7c){
  1024. el.style[G_BrowserInfo.M_bIsIE5QuirksMode?"filter":"opacity"]=G_BrowserInfo.M_bIsIE5QuirksMode?("progid:DXImageTransform.Microsoft.Alpha(opacity="+_7c+");"):(_7c/100);
  1025. };
  1026. U_DOM.F_RemoveOpacity=function(el){
  1027. if(G_BrowserInfo.M_bIsIE5QuirksMode){
  1028. el.style.removeAttribute("filter");
  1029. }else{
  1030. el.style.opacity="";
  1031. }
  1032. };
  1033. U_DOM.F_GetBasePath=function(d){
  1034. var re=/^(\/.*?)\//;
  1035. re.test((d||document).location.pathname);
  1036. return RegExp.$1;
  1037. };
  1038. U_DOM.F_NumbersOnlyOnChange=function(e,_7d,_7e,_7f,_80){
  1039. e=e||window.event;
  1040. var txt=e.srcElement;
  1041. if(G_HAL.M_oLibraries["hal"]["enableAccessibility"]){
  1042. this.F_ValidateNumberInput(txt,_7e,_7d,_7f,_80);
  1043. return;
  1044. }
  1045. switch(_7e){
  1046. case "integer":
  1047. txt.value=txt.value.replace(_7d?/[^0-9-]/g:/[^0-9]/g,"");
  1048. break;
  1049. case "float":
  1050. txt.value=txt.value.replace(_7d?/[^0-9.,-eE]/g:/[^0-9.,eE]/g,"");
  1051. break;
  1052. case "decimal":
  1053. default:
  1054. txt.value=txt.value.replace(_7d?/[^0-9.,-]/g:/[^0-9.,]/g,"");
  1055. break;
  1056. }
  1057. };
  1058. U_DOM.F_NumbersOnlyOnKeyPress=function(e,_81,_82){
  1059. e=e||window.event;
  1060. if(e.ctrlKey){
  1061. return;
  1062. }
  1063. var _83=e.keyCode;
  1064. if(!G_BrowserInfo.M_bIsIE){
  1065. _83=e.charCode;
  1066. if(_83==0){
  1067. return;
  1068. }
  1069. }
  1070. switch(_83){
  1071. case this.K_iKeyEnter:
  1072. case this.K_iKeyEscape:
  1073. case 190:
  1074. return;
  1075. case 44:
  1076. case 46:
  1077. if(_82=="integer"){
  1078. break;
  1079. }
  1080. return;
  1081. case 69:
  1082. case 101:
  1083. if(_82=="float"){
  1084. return;
  1085. }
  1086. break;
  1087. case 45:
  1088. if(_82=="float"){
  1089. return;
  1090. }
  1091. if(_81){
  1092. return;
  1093. }
  1094. }
  1095. if(!G_HAL.M_oLibraries["hal"]["enableAccessibility"]){
  1096. if((_83<"0".charCodeAt(0))||(_83>"9".charCodeAt(0))){
  1097. e.returnValue=false;
  1098. if(G_BrowserInfo.M_bIsIE){
  1099. e.keyCode=0;
  1100. }
  1101. e.cancelBubble=true;
  1102. }
  1103. }
  1104. };
  1105. U_DOM.F_PercentOnlyOnChange=function(e,_84,_85,_86){
  1106. e=e||window.event;
  1107. var txt=e.srcElement;
  1108. _86=_86||100;
  1109. if(G_HAL.M_oLibraries["hal"]["enableAccessibility"]){
  1110. this.F_ValidateNumberInput(txt,_85,_84,_86);
  1111. return;
  1112. }
  1113. switch(_85){
  1114. case "integer":
  1115. txt.value=txt.value.replace(_84?/[^0-9-]/g:/[^0-9]/g,"");
  1116. var _87=parseInt(txt.value,10);
  1117. if(_87>_86){
  1118. txt.value=_86.toString(10);
  1119. }
  1120. break;
  1121. case "decimal":
  1122. default:
  1123. txt.value=txt.value.replace(_84?/[^0-9.,-]/g:/[^0-9.,]/g,"");
  1124. var _88=parseFloat(txt.value,10);
  1125. if(_88>_86){
  1126. txt.value=_86.toString(10);
  1127. }
  1128. break;
  1129. }
  1130. };
  1131. U_DOM.F_NumbersOnlyOnChangeHandler=function(e){
  1132. U_DOM.F_NumbersOnlyOnChange(e);
  1133. };
  1134. U_DOM.F_NumbersOnlyOnKeyPressHandler=function(e){
  1135. U_DOM.F_NumbersOnlyOnKeyPress(e);
  1136. };
  1137. function C_Position(_89,_8a){
  1138. this.left=_89;
  1139. this.top=_8a;
  1140. };
  1141. C_Position.prototype.F_Add=function(_8b){
  1142. return new C_Position(this.left+_8b.left,this.top+_8b.top);
  1143. };
  1144. C_Position.prototype.F_Subtract=function(_8c){
  1145. return new C_Position(this.left-_8c.left,this.top-_8c.top);
  1146. };
  1147. function C_Dimension(_8d,_8e){
  1148. this.height=_8d?_8d:0;
  1149. this.width=_8e?_8e:0;
  1150. };
  1151. C_Dimension.prototype.F_Add=function(_8f){
  1152. return new C_Dimension(this.height+_8f.height,this.width+_8f.width);
  1153. };
  1154. C_Dimension.prototype.F_Subtract=function(_90){
  1155. return new C_Dimension(Math.F_NonNeg(this.height-_90.height),Math.F_NonNeg(this.width-_90.width));
  1156. };
  1157. function C_Rectangle(_91,_92,_93,_94){
  1158. this.left=_91;
  1159. this.top=_92;
  1160. this.right=_93;
  1161. this.bottom=_94;
  1162. this.width=_93-_91;
  1163. this.height=_94-_92;
  1164. };
  1165. C_Rectangle.prototype.F_Subtract=function(_95){
  1166. return new C_Rectangle(this.left-_95.left,this.top-_95.top,this.right-_95.right,this.bottom-_95.bottom);
  1167. };
  1168. C_Rectangle.prototype.F_Add=function(_96){
  1169. return new C_Rectangle(this.left+_96.left,this.top+_96.top,this.right+_96.right,this.bottom+_96.bottom);
  1170. };
  1171. C_Rectangle.prototype.F_GetWidth=function(){
  1172. return (this.right-this.left);
  1173. };
  1174. C_Rectangle.prototype.F_GetHeight=function(){
  1175. return (this.bottom-this.top);
  1176. };
  1177. C_Rectangle.prototype.F_Intersects=function(_97){
  1178. 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));
  1179. };
  1180. function C_Polygon(_98){
  1181. this.m_aCoords=_98;
  1182. };
  1183. C_Polygon.prototype.F_GetLeft=function(){
  1184. var _99=Infinity;
  1185. for(var i=0;i<this.m_aCoords.length;i++){
  1186. if(this.m_aCoords[i].left<_99){
  1187. _99=this.m_aCoords[i].left;
  1188. }
  1189. }
  1190. return _99;
  1191. };
  1192. C_Polygon.prototype.F_GetTop=function(){
  1193. var _9a=Infinity;
  1194. for(var i=0;i<this.m_aCoords.length;i++){
  1195. if(this.m_aCoords[i].top<_9a){
  1196. _9a=this.m_aCoords[i].top;
  1197. }
  1198. }
  1199. return _9a;
  1200. };
  1201. C_Polygon.prototype.F_GetWidth=function(){
  1202. var _9b=Infinity;
  1203. var _9c=-Infinity;
  1204. for(var i=0;i<this.m_aCoords.length;i++){
  1205. if(this.m_aCoords[i].left>_9c){
  1206. _9c=this.m_aCoords[i].left;
  1207. }
  1208. if(this.m_aCoords[i].left<_9b){
  1209. _9b=this.m_aCoords[i].left;
  1210. }
  1211. }
  1212. return (_9c-_9b);
  1213. };
  1214. C_Polygon.prototype.F_GetHeight=function(){
  1215. var _9d=Infinity;
  1216. var _9e=-Infinity;
  1217. for(var i=0;i<this.m_aCoords.length;i++){
  1218. if(this.m_aCoords[i].top>_9e){
  1219. _9e=this.m_aCoords[i].top;
  1220. }
  1221. if(this.m_aCoords[i].top<_9d){
  1222. _9d=this.m_aCoords[i].top;
  1223. }
  1224. }
  1225. return (_9e-_9d);
  1226. };
  1227. C_Polygon.prototype.F_IsInRect=function(_9f){
  1228. var _a0=this.F_GetLeft();
  1229. if(_9f.left>=_a0&&_9f.left<=(_a0+this.F_GetWidth())){
  1230. var _a1=this.F_GetTop();
  1231. if(_9f.top>=_a1&&_9f.top<=(_a1+this.F_GetHeight())){
  1232. return true;
  1233. }
  1234. }
  1235. return false;
  1236. };
  1237. C_Polygon.prototype.F_IsInPolygon=function(_a2){
  1238. if(!this.F_IsInRect(_a2)){
  1239. return false;
  1240. }
  1241. var _a3=0;
  1242. var j=this.m_aCoords.length-1;
  1243. for(var i=0;i<this.m_aCoords.length;i++){
  1244. var _a4=(this.m_aCoords[j].top-this.m_aCoords[i].top)/(this.m_aCoords[j].left-this.m_aCoords[i].left);
  1245. if(isNaN(_a4)){
  1246. j=i;
  1247. continue;
  1248. }
  1249. if(_a4!=0&&Math.abs(_a4)!=Infinity){
  1250. var b=this.m_aCoords[i].top-_a4*this.m_aCoords[i].left;
  1251. var _a5=(_a2.top-b)/_a4;
  1252. if((_a5>=this.m_aCoords[i].left&&_a5<=this.m_aCoords[j].left)||(_a5>=this.m_aCoords[j].left&&_a5<=this.m_aCoords[i].left)){
  1253. if(_a5<_a2.left){
  1254. if(_a2.top==this.m_aCoords[i].top){
  1255. if(this.m_aCoords[j].top>_a2.top){
  1256. _a3++;
  1257. }
  1258. }else{
  1259. if(_a2.top==this.m_aCoords[j].top){
  1260. if(this.m_aCoords[i].top>_a2.top){
  1261. _a3++;
  1262. }
  1263. }else{
  1264. _a3++;
  1265. }
  1266. }
  1267. }
  1268. }
  1269. }else{
  1270. if(_a4==0){
  1271. j=i;
  1272. continue;
  1273. }else{
  1274. var _a5=this.m_aCoords[i].left;
  1275. var _a6=_a2.top;
  1276. 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)){
  1277. if(_a5<_a2.left){
  1278. if(_a6==this.m_aCoords[i].top){
  1279. if(this.m_aCoords[j].top>_a2.top){
  1280. _a3++;
  1281. }
  1282. }else{
  1283. if(_a6==this.m_aCoords[j].top){
  1284. if(this.m_aCoords[i].top>_a2.top){
  1285. _a3++;
  1286. }
  1287. }else{
  1288. _a3++;
  1289. }
  1290. }
  1291. }
  1292. }
  1293. }
  1294. }
  1295. j=i;
  1296. }
  1297. return Boolean(_a3%2);
  1298. };
  1299. U_DOM.F_GetBoundingRect=function(el,_a7){
  1300. var _a8=this.F_GetRelativeOffset(el,_a7||el.ownerDocument.body);
  1301. return new C_Rectangle(_a8.left,_a8.top,_a8.left+el.offsetWidth,_a8.top+el.offsetHeight);
  1302. };
  1303. U_DOM.F_GetBoundingRectForElements=function(_a9,_aa){
  1304. var _ab=U_DOM.F_GetRelativeOffset(_a9[0],_aa);
  1305. var _ac=_ab.top;
  1306. var _ad=_ab.left;
  1307. var _ae=_ac+_a9[0].offsetHeight;
  1308. var _af=_ad+_a9[0].offsetWidth;
  1309. var _b0=_a9.length;
  1310. for(var i=1;i<_b0;i++){
  1311. var el=_a9[i];
  1312. var _ab=U_DOM.F_GetRelativeOffset(el,_aa);
  1313. if(_ab.top<_ac){
  1314. _ac=_ab.top;
  1315. }
  1316. if(_ab.left<_ad){
  1317. _ad=_ab.left;
  1318. }
  1319. var _b1=_ab.top+el.offsetHeight;
  1320. if(_b1>_ae){
  1321. _ae=_b1;
  1322. }
  1323. var _b2=_ab.left+el.offsetWidth;
  1324. if(_b2>_af){
  1325. _af=_b2;
  1326. }
  1327. }
  1328. return new C_Rectangle(_ad,_ac,_af,_ae);
  1329. };
  1330. U_DOM.F_GetRelativeOffset=function(el,_b3){
  1331. if(G_BrowserInfo.M_bIsIE||G_BrowserInfo.M_bIsWebKit){
  1332. var _b4=el.getBoundingClientRect();
  1333. var _b5=new C_Position(_b4.left,_b4.top);
  1334. if(_b3){
  1335. var _b6=_b3.getBoundingClientRect();
  1336. _b5.top-=_b6.top;
  1337. _b5.left-=_b6.left;
  1338. if(_b3.tagName!="BODY"){
  1339. _b5.top-=this.F_GetBorderTopWidth(_b3);
  1340. _b5.left-=this.F_GetBorderLeftWidth(_b3);
  1341. }
  1342. if(_b3.scrollLeft){
  1343. _b5.left+=_b3.scrollLeft;
  1344. }
  1345. if(_b3.scrollTop){
  1346. _b5.top+=_b3.scrollTop;
  1347. }
  1348. }
  1349. return _b5;
  1350. }
  1351. var _b7=el.ownerDocument.body;
  1352. if(!_b3){
  1353. _b3=_b7;
  1354. }
  1355. if(!G_BrowserInfo.M_bIsIE){
  1356. return this.f_getRelativeOffsetFirefox(el,_b3);
  1357. }
  1358. };
  1359. U_DOM.f_getOffsetFromHtml=function(el,_b8){
  1360. var _b9=el.ownerDocument.body;
  1361. if((el==_b9)||(el.nodeName=="HTML")||(el.nodeName=="#document")){
  1362. return new C_Position(0,0);
  1363. }
  1364. var _ba=el.getBoundingClientRect();
  1365. var _bb=Math.round(_ba.left);
  1366. var _bc=Math.round(_ba.top);
  1367. var _bd=el.parentNode;
  1368. if(G_BrowserInfo.M_bFirefox3OrLater){
  1369. return new C_Position(_bb,_bc);
  1370. }
  1371. var _be=(el!=_b8);
  1372. while(_bd&&(_bd!=_b9)){
  1373. if(_bd!=_b8&&_bd.currentStyle.overflow!="visible"){
  1374. _bb-=_bd.scrollLeft;
  1375. _bc-=_bd.scrollTop;
  1376. }
  1377. if(_bd.currentStyle.overflow!="visible"){
  1378. _bc+=this.F_GetBorderTopWidth(_bd);
  1379. _bb+=this.F_GetBorderLeftWidth(_bd);
  1380. }
  1381. _bd=_bd.parentNode;
  1382. }
  1383. if(_be){
  1384. _bb-=this.F_GetBorderLeftWidth(el);
  1385. var _bf=this.F_GetBorderTopWidth(el);
  1386. _bc-=_bf;
  1387. }
  1388. return new C_Position(_bb,_bc);
  1389. };
  1390. U_DOM.f_getRelativeOffsetFirefox=function(el,_c0){
  1391. var _c1=U_DOM.f_getOffsetFromHtml(el,_c0);
  1392. if(_c0!=el.ownerDocument.body){
  1393. var _c2=U_DOM.f_getOffsetFromHtml(_c0,_c0);
  1394. var _c3=_c1.left-_c2.left;
  1395. var _c4=_c1.top-_c2.top;
  1396. if(G_BrowserInfo.M_bFirefox3OrLater){
  1397. _c3-=this.F_GetBorderLeftWidth(_c0);
  1398. _c4-=this.F_GetBorderTopWidth(_c0);
  1399. }
  1400. }else{
  1401. var _c3=_c1.left;
  1402. var _c4=_c1.top;
  1403. }
  1404. if(G_BrowserInfo.M_bFirefox3OrLater){
  1405. if(_c0.scrollLeft){
  1406. _c3+=_c0.scrollLeft;
  1407. }
  1408. if(_c0.scrollTop){
  1409. _c4+=_c0.scrollTop;
  1410. }
  1411. }
  1412. return new C_Position(_c3,_c4);
  1413. };
  1414. U_DOM.m_iUniqueIdCounter=1;
  1415. U_DOM.F_GetUniqueId=function(_c5,d){
  1416. if(!_c5){
  1417. return ("hal__dom__uniqueID__"+this.m_iUniqueIdCounter++);
  1418. }
  1419. var _c6=_c5;
  1420. if(!d){
  1421. d=document;
  1422. }
  1423. var i=1;
  1424. while(d.getElementById(_c6)){
  1425. _c6=_c5+i++;
  1426. }
  1427. return _c6;
  1428. };
  1429. U_DOM.F_GetStyleSheet=function(_c7,d){
  1430. if(!d){
  1431. d=document;
  1432. }
  1433. if(G_BrowserInfo.M_bIsIE){
  1434. return d.styleSheets(_c7);
  1435. }
  1436. var _c8=d.getElementById(_c7);
  1437. return _c8?_c8.sheet:null;
  1438. };
  1439. U_DOM.F_AddScript=function(_c9,d){
  1440. if(!d){
  1441. d=document;
  1442. }
  1443. var _ca=d.getElementsByTagName("HEAD").item(0).appendChild(d.createElement("SCRIPT"));
  1444. _ca.text=_c9;
  1445. return _ca;
  1446. };
  1447. U_DOM.F_LoadScript=function(_cb,_cc,d){
  1448. if(!d){
  1449. d=document;
  1450. }
  1451. var _cd=d.createElement("script");
  1452. _cd.type="text/javascript";
  1453. if(_cc){
  1454. if(_cd.readyState){
  1455. _cd.onreadystatechange=function(){
  1456. if(_cd.readyState=="loaded"||_cd.readyState=="complete"){
  1457. _cd.onreadystatechange=null;
  1458. _cc();
  1459. }
  1460. };
  1461. }else{
  1462. _cd.onload=_cc;
  1463. }
  1464. }
  1465. _cd.src=_cb;
  1466. d.getElementsByTagName("head")[0].appendChild(_cd);
  1467. };
  1468. U_DOM.F_ShowEventBlocker=function(_ce){
  1469. if(!this.m_divEventBlocker){
  1470. this.m_divEventBlocker=document.body.appendChild(document.createElement("DIV"));
  1471. this.m_divEventBlocker.onkeydown=this.f_stopTabKey;
  1472. this.m_divEventBlocker.className="clsBlocker";
  1473. }
  1474. this.m_divEventBlocker.style.zIndex=_ce;
  1475. this.m_divEventBlocker.style.visibility="visible";
  1476. return this.m_divEventBlocker;
  1477. };
  1478. U_DOM.F_HideEventBlocker=function(){
  1479. if(this.m_divEventBlocker){
  1480. this.m_divEventBlocker.style.visibility="hidden";
  1481. var _cf=["onmousedown","onmouseup","onmousemove","onclick","ondblclick","onmouseover","onmouseout"];
  1482. for(var i=0;i<_cf.length;i++){
  1483. this.m_divEventBlocker[_cf[i]]=null;
  1484. }
  1485. }
  1486. };
  1487. U_DOM.f_stopTabKey=function(e){
  1488. e=e||window.event;
  1489. if(e.keyCode==U_DOM.K_iKeyTab){
  1490. U_DOM.F_CancelEvent(e);
  1491. }
  1492. };
  1493. U_DOM.F_EmptyFunction=function(){
  1494. };
  1495. U_DOM.F_GetPropertyInTryCatch=function(o,_d0){
  1496. try{
  1497. return o[_d0];
  1498. }
  1499. catch(e){
  1500. G_Debug.F_Print("U_DOM.F_GetPropertyInTryCatch caught exception accessing o["+_d0+"]");
  1501. return null;
  1502. }
  1503. };
  1504. U_DOM.F_SetColorButtonColor=function(btn,_d1,_d2){
  1505. if(btn){
  1506. var div=btn.getElementsByTagName("DIV").item(0);
  1507. div.className=(_d1=="transparent")?"clsColorButtonDIV_transparent":"clsColorButtonDIV_normal";
  1508. div.style.backgroundColor=_d1?_d1:"";
  1509. if(_d2){
  1510. div.innerText=_d2;
  1511. }
  1512. if(G_HAL.M_oLibraries["hal"]["enableAccessibility"]&&_d1){
  1513. U_Accessibility.F_AddAriaHiddenSpan(btn,"aria-describedby",this.F_GetColorAriaLabel(_d1));
  1514. }
  1515. }
  1516. };
  1517. U_DOM.F_DisplayTDs=function(el){
  1518. if(!G_BrowserInfo.M_bIsIE){
  1519. return;
  1520. }
  1521. var nl=el.getElementsByTagName("TD");
  1522. var _d3=nl.length;
  1523. for(var i=0;i<_d3;i++){
  1524. var td=nl.item(i);
  1525. if(td.style.display=="none"){
  1526. td.style.display="";
  1527. }
  1528. }
  1529. };
  1530. U_DOM.F_IsVmlSupported=function(){
  1531. if(G_BrowserInfo.M_bIsIE5QuirksMode){
  1532. var _d4=document.body.appendChild(document.createElement("<v:polyline points=\"0px,0px\" strokecolor=\"black\" strokeweight=\"1px\" filled=\"false\" style=\"position:absolute\"></v:polyline>"));
  1533. var s=typeof _d4.points;
  1534. _d4.parentNode.removeChild(_d4);
  1535. return (s!="string");
  1536. }
  1537. return false;
  1538. };
  1539. U_DOM.F_WindowOpenWasBlocked=function(win,_d5){
  1540. var b=Boolean(win);
  1541. if(!b&&(_d5!=false)){
  1542. var _d6=window["G_ResManager"]?G_ResManager.F_GetOptionalString("IDS_HAL_POPUP_BLOCKER_ERROR"):null;
  1543. alert(_d6||"A window could not be opened. This is most likely caused by a popup blocker. Please disable your popup blocker.");
  1544. }
  1545. return !b;
  1546. };
  1547. U_DOM.F_HookTextInputOnChangeEvent=function(_d7,_d8){
  1548. _d7.onchange=function(e){
  1549. _d8();
  1550. };
  1551. _d7.oncut=function(){
  1552. setTimeout(_d8,0);
  1553. };
  1554. _d7.onpaste=function(){
  1555. setTimeout(_d8,0);
  1556. };
  1557. _d7.onkeyup=function(){
  1558. setTimeout(_d8,0);
  1559. };
  1560. _d7.ondrop=function(){
  1561. setTimeout(_d8,0);
  1562. };
  1563. _d7.onmouseup=function(){
  1564. setTimeout(_d8,0);
  1565. };
  1566. };
  1567. U_DOM.F_UnHookTextInputOnChangeEvent=function(_d9){
  1568. _d9.onkeypress=null;
  1569. _d9.onchange=null;
  1570. _d9.oncut=null;
  1571. _d9.onpaste=null;
  1572. _d9.onkeyup=null;
  1573. _d9.ondrop=null;
  1574. _d9.onmouseup=null;
  1575. };
  1576. U_DOM.F_HookNumericInputOnChangeEvent=function(_da,_db,_dc,_dd){
  1577. _da.onkeypress=function(e){
  1578. U_DOM.F_NumbersOnlyOnKeyPress(e,_dc,_dd);
  1579. };
  1580. _da.onchange=function(e){
  1581. U_DOM.F_NumbersOnlyOnChange(e,_dc,_dd);
  1582. _db();
  1583. };
  1584. _da.oncut=function(){
  1585. setTimeout(_db,0);
  1586. };
  1587. _da.onpaste=function(){
  1588. setTimeout(_db,0);
  1589. };
  1590. _da.onkeyup=function(){
  1591. setTimeout(_db,0);
  1592. };
  1593. _da.ondrop=function(){
  1594. setTimeout(_db,0);
  1595. };
  1596. _da.onmouseup=function(){
  1597. setTimeout(_db,0);
  1598. };
  1599. };
  1600. U_DOM.F_UnHookNumericInputOnChangeEvent=function(_de){
  1601. _de.onkeypress=null;
  1602. _de.onchange=null;
  1603. _de.oncut=null;
  1604. _de.onpaste=null;
  1605. _de.onkeyup=null;
  1606. _de.ondrop=null;
  1607. _de.onmouseup=null;
  1608. };
  1609. U_DOM.F_CreateArgumentsArray=function(_df,_e0){
  1610. var a=[];
  1611. for(var i=_e0||0;i<_df.length;i++){
  1612. a.push(_df[i]);
  1613. }
  1614. return a;
  1615. };
  1616. U_DOM.F_GetColorAriaLabel=function(_e1){
  1617. var _e2=G_ResManager.F_GetOptionalString("IDS_HAL_COLOR_"+_e1.toUpperCase());
  1618. return _e2?_e2:_e1;
  1619. };
  1620. U_DOM.F_ValidateNumber=function(_e3,_e4,_e5,_e6,_e7){
  1621. if(!G_HAL.M_oLibraries["hal"]["enableAccessibility"]||(_e3=="")){
  1622. return true;
  1623. }
  1624. var _e8;
  1625. var _e9;
  1626. switch(_e4){
  1627. case "integer":
  1628. _e8=_e5?/[^0-9-]/g:/[^0-9]/g;
  1629. _e9=parseInt(_e3,10);
  1630. break;
  1631. case "float":
  1632. _e8=_e5?/[^0-9.,-eE]/g:/[^0-9.,eE]/g;
  1633. _e9=parseFloat(_e3,10);
  1634. break;
  1635. case "decimal":
  1636. default:
  1637. _e8=_e5?/[^0-9.,-]/g:/[^0-9.,]/g;
  1638. _e9=parseFloat(_e3,10);
  1639. break;
  1640. }
  1641. if(_e3.match(_e8)||isNaN(_e9)){
  1642. F_MsgBox(G_ResManager.F_GetString("IDS_HAL_ERR_INVALID_NUMBER"));
  1643. return false;
  1644. }else{
  1645. if(_e6!==undefined&&_e6!==null&&_e9>_e6){
  1646. F_MsgBox(G_ResManager.F_GetString("IDS_HAL_ERR_INVALID_MAX",Number.F_ToLocalizedString(_e6)));
  1647. return false;
  1648. }else{
  1649. if(_e7!==undefined&&_e7!==null&&_e9<_e7){
  1650. F_MsgBox(G_ResManager.F_GetString("IDS_HAL_ERR_INVALID_MIN",Number.F_ToLocalizedString(_e7)));
  1651. return false;
  1652. }
  1653. }
  1654. }
  1655. return true;
  1656. };
  1657. U_DOM.F_ValidateNumberInput=function(_ea,_eb,_ec,_ed,_ee){
  1658. if(!G_HAL.M_oLibraries["hal"]["enableAccessibility"]){
  1659. return true;
  1660. }
  1661. var _ef=this.F_ValidateNumber(_ea.value,_eb,_ec,_ed,_ee);
  1662. if(!_ef){
  1663. _ea.value="";
  1664. }
  1665. return _ef;
  1666. };
  1667. if(G_BrowserInfo.M_bIsIE){
  1668. U_DOM.m_oActiveTimeouts={};
  1669. U_DOM.m_iNextTimeoutIDX=1;
  1670. U_DOM.F_CreateClearableTimeout=function(_f0,_f1){
  1671. var _f2=this.m_iNextTimeoutIDX++;
  1672. this.m_oActiveTimeouts[_f2]=setTimeout(this.f_timeoutHandler.F_CreateMethodCallback(this,_f0,_f2),_f1);
  1673. return _f2;
  1674. };
  1675. U_DOM.F_ClearTimeout=function(_f3){
  1676. var _f4=this.m_oActiveTimeouts[_f3];
  1677. if(_f4){
  1678. delete this.m_oActiveTimeouts[_f3];
  1679. clearTimeout(_f4);
  1680. }
  1681. };
  1682. U_DOM.f_timeoutHandler=function(_f5,_f6){
  1683. if(this.m_oActiveTimeouts[_f6]){
  1684. delete this.m_oActiveTimeouts[_f6];
  1685. _f5(_f6);
  1686. }
  1687. };
  1688. }else{
  1689. U_DOM.F_CreateClearableTimeout=function(_f7,_f8){
  1690. return setTimeout(_f7,_f8);
  1691. };
  1692. U_DOM.F_ClearTimeout=function(_f9){
  1693. clearTimeout(_f9);
  1694. };
  1695. }
  1696. U_DOM.f_splitRules=function(_fa){
  1697. var _fb=[];
  1698. var _fc=[];
  1699. _fc=_fa.selectorText.split(", ");
  1700. for(var i=0;i<_fc.length;i++){
  1701. var _fd={};
  1702. _fd.selectorText=_fc[i];
  1703. for(var s in _fa){
  1704. if(s!="selectorText"){
  1705. _fd[s]=_fa[s];
  1706. }
  1707. }
  1708. _fb.push(_fd);
  1709. }
  1710. return _fb;
  1711. };
  1712. U_DOM.F_GetCssRules=function(_fe){
  1713. if(G_BrowserInfo.M_bIsIE&&_fe.rules){
  1714. return _fe.rules;
  1715. }
  1716. var _ff=[];
  1717. for(var i=0;i<_fe.cssRules.length;i++){
  1718. var _100=_fe.cssRules.item(i);
  1719. if(_100.type==1){
  1720. _ff=_ff.concat(this.f_splitRules(_100));
  1721. }else{
  1722. if(_100.type==4){
  1723. var _101=_100.cssRules.length;
  1724. for(var j=0;j<_101;j++){
  1725. var _102=_100.cssRules.item(j);
  1726. if(_102.type==1){
  1727. _ff=_ff.concat(this.f_splitRules(_102));
  1728. }
  1729. }
  1730. }
  1731. }
  1732. }
  1733. _ff.item=this.F_Item;
  1734. return _ff;
  1735. };
  1736. U_DOM.F_Item=function(i){
  1737. return this[i];
  1738. };
  1739. if("".trimLeft){
  1740. String.prototype.F_LTrim=function(){
  1741. return this.trimLeft();
  1742. };
  1743. }else{
  1744. String.prototype.F_LTrim=function(){
  1745. return this.replace(/(^\s*)/g,"");
  1746. };
  1747. }
  1748. if("".trimRight){
  1749. String.prototype.F_RTrim=function(){
  1750. return this.trimRight();
  1751. };
  1752. }else{
  1753. String.prototype.F_RTrim=function(){
  1754. return this.replace(/(\s*$)/g,"");
  1755. };
  1756. }
  1757. if("".trim){
  1758. String.prototype.F_Trim=function(){
  1759. return this.trim();
  1760. };
  1761. }else{
  1762. String.prototype.F_Trim=function(){
  1763. return this.replace(/(^\s*)|(\s*$)/g,"");
  1764. };
  1765. }
  1766. String.prototype.F_RemoveNewLines=function(){
  1767. return this.replace(/[\r\n]/g,"");
  1768. };
  1769. String.prototype.F_Truncate=function(_103,_104){
  1770. if(this.length<=_103){
  1771. return this.valueOf();
  1772. }
  1773. var b=(_104!=false);
  1774. if(this.F_ContainsSurrogatePairs()){
  1775. var _105=this.F_CharLength();
  1776. if(_105>_103){
  1777. return this.F_CharSubStr(0,b?_105-3:_105)+(b?"...":"");
  1778. }
  1779. return this.valueOf();
  1780. }
  1781. return this.substr(0,b?_103-3:_103)+(b?"...":"");
  1782. };
  1783. String.prototype.F_JScriptEscape=function(){
  1784. return this.replace(/\\/g,"\\\\").replace(/\'/g,"\\'").replace(/\"/g,"\\\"").replace(/\r?\n/g,"\\r\\n");
  1785. };
  1786. String.prototype.F_ToXPathString=function(){
  1787. if(this.indexOf("'")==-1){
  1788. return ("'"+this+"'");
  1789. }
  1790. if(this.indexOf("\"")==-1){
  1791. return ("\""+this+"\"");
  1792. }
  1793. var a=[];
  1794. a.push("concat(");
  1795. var _106=this.split("'");
  1796. for(var i=0;i<_106.length;i++){
  1797. if(a.length>1){
  1798. a.push(",");
  1799. }
  1800. if(i>0){
  1801. a.push("\"'\"");
  1802. }
  1803. var _107=_106[i];
  1804. if(_107){
  1805. if(this.indexOf("\"")==-1){
  1806. if(a.length>1){
  1807. a.push(",");
  1808. }
  1809. a.push("\""+_107+"\"");
  1810. }else{
  1811. var _108=_107.split("'");
  1812. for(var j=0;j<_108.length;j++){
  1813. if(a.length>1){
  1814. a.push(",");
  1815. }
  1816. if(_108[j]){
  1817. a.push("'"+_108[j]+"'");
  1818. }
  1819. }
  1820. }
  1821. }
  1822. }
  1823. a.push(")");
  1824. return a.join("");
  1825. };
  1826. String.prototype.F_XMLEncode=function(){
  1827. return this.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/'/g,"&apos;").replace(/"/g,"&quot;");
  1828. };
  1829. String.prototype.F_XMLDecode=function(){
  1830. return this.replace(/&quot;/g,"\"").replace(/&apos;/g,"'").replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/&amp;/g,"&");
  1831. };
  1832. String.prototype.F_HTMLEncode=function(){
  1833. return this.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");
  1834. };
  1835. String.prototype.F_HTMLAttributeEncode=function(){
  1836. return this.F_HTMLEncode().replace(/'/g,"&#39;").replace(/"/g,"&quot;");
  1837. };
  1838. String.prototype.F_RegExpEscape=function(){
  1839. return this.replace(/([\[\]\^\$\*\+\?\(\)\{\}\|.])/g,function($0){
  1840. return "\\"+$0;
  1841. });
  1842. };
  1843. String.prototype.F_PadLeft=function(_109,_10a){
  1844. var _10b="";
  1845. for(var _10c=_10a-this.F_CharLength();_10c>0;_10c--){
  1846. _10b+=_109;
  1847. }
  1848. return _10b+this;
  1849. };
  1850. String.prototype.F_PadRight=function(_10d,_10e){
  1851. var _10f="";
  1852. for(var _110=_10e-this.F_CharLength();_110>0;_110--){
  1853. _10f+=_10d;
  1854. }
  1855. return this+_10f;
  1856. };
  1857. String.F_ParseFloat=function(s){
  1858. if(typeof s=="string"){
  1859. return parseFloat(s.replace(",","."));
  1860. }
  1861. return NaN;
  1862. };
  1863. String.prototype.F_ParseFloat=function(){
  1864. return String.F_ParseFloat(this.valueOf());
  1865. };
  1866. String.F_ParseDecimal=function(s){
  1867. return new C_Decimal(s);
  1868. };
  1869. String.prototype.F_ParseDecimal=function(){
  1870. return String.F_ParseDecimal(this.valueOf());
  1871. };
  1872. String.prototype.F_GetChars=function(){
  1873. if(!this.F_ContainsSurrogatePairs()){
  1874. return this.split("");
  1875. }
  1876. var a=[];
  1877. for(var i=0;i<this.length;i++){
  1878. if(this.F_IsHS(i)){
  1879. a.push(this.charAt(i)+this.charAt(++i));
  1880. }else{
  1881. if(this.F_IsLS(i)){
  1882. }else{
  1883. a.push(this.charAt(i));
  1884. }
  1885. }
  1886. }
  1887. return a;
  1888. };
  1889. String.prototype.F_ContainsSurrogatePairs=function(){
  1890. return Boolean(this.match(/[\uD800-\uDBFF]/));
  1891. };
  1892. String.prototype.F_CharLength=function(){
  1893. if(this.length<2){
  1894. return this.length;
  1895. }
  1896. var a=this.match(/[\uD800-\uDBFF]/g);
  1897. return a?(this.length-a.length):this.length;
  1898. };
  1899. String.F_FromCharCode=function(_111){
  1900. if(_111>65535){
  1901. _111-=65536;
  1902. return this.fromCharCode(55296+(_111>>10),56320+(_111&1023));
  1903. }
  1904. return this.fromCharCode(_111);
  1905. };
  1906. String.prototype.F_CharAt=function(_112){
  1907. return this.F_GetChars()[_112];
  1908. };
  1909. String.prototype.F_CharIndexOf=function(s){
  1910. var i=this.indexOf(s);
  1911. return (i==-1)?-1:this.substring(0,i).F_CharLength();
  1912. };
  1913. String.prototype.F_LastCharIndexOf=function(s){
  1914. var i=this.lastIndexOf(s);
  1915. return (i==-1)?-1:this.substring(0,i).F_CharLength();
  1916. };
  1917. String.prototype.F_CharSubStr=function(_113,_114){
  1918. if(this.F_ContainsSurrogatePairs()){
  1919. return this.F_GetChars().slice(_113||0,_114).join("");
  1920. }
  1921. return this.substr(_113,_114);
  1922. };
  1923. String.prototype.F_CharSubString=function(_115,_116){
  1924. if(this.F_ContainsSurrogatePairs()){
  1925. var a=this.F_GetChars();
  1926. _115=_115||0;
  1927. return a.slice(_115,a.length-(_116||0)).join("");
  1928. }
  1929. return this.substring(_115,_116);
  1930. };
  1931. String.prototype.F_IsHS=function(i){
  1932. var _117=this.charCodeAt(i);
  1933. return ((_117>=55296)&&(_117<=56319));
  1934. };
  1935. String.prototype.F_IsLS=function(i){
  1936. var _118=this.charCodeAt(i);
  1937. return ((_118>=56320)&&(_118<=57343));
  1938. };
  1939. Number.m_sDecimalSymbol=".";
  1940. Number.F_SetDecimalSymbol=function(s){
  1941. this.m_sDecimalSymbol=s;
  1942. };
  1943. Number.F_ToLocalizedString=function(v){
  1944. var f=NaN;
  1945. switch(typeof v){
  1946. case "number":
  1947. f=v;
  1948. break;
  1949. case "string":
  1950. f=parseFloat(v);
  1951. break;
  1952. }
  1953. if(isNaN(f)){
  1954. return "";
  1955. }
  1956. return f.toString().replace(".",Number.m_sDecimalSymbol);
  1957. };
  1958. Number.prototype.F_ToLocalizedString=function(){
  1959. return Number.F_ToLocalizedString(this.valueOf());
  1960. };
  1961. Math.F_NonNeg=function(i){
  1962. return (i<0)?0:i;
  1963. };
  1964. Math.F_NonNaN=function(i){
  1965. return (isNaN(i))?0:i;
  1966. };
  1967. Math.F_PointInRect=function(_119,_11a,_11b,_11c,_11d,_11e){
  1968. return ((_119>=_11b)&&(_119<=(_11b+_11e))&&(_11a>=_11c)&&(_11a<=(_11c+_11d)));
  1969. };
  1970. Math.F_SortNumeric=function(a,b){
  1971. return a-b;
  1972. };
  1973. Array.prototype.F_Top=function(){
  1974. return (this.length>0)?this[this.length-1]:null;
  1975. };
  1976. Array.prototype.F_Clear=function(){
  1977. this.length=0;
  1978. };
  1979. if(!Array.prototype.indexOf){
  1980. Array.prototype.indexOf=function(_11f){
  1981. var _120=this.length;
  1982. for(var i=0;i<_120;++i){
  1983. if(this[i]==_11f){
  1984. return i;
  1985. }
  1986. }
  1987. return -1;
  1988. };
  1989. }
  1990. Array.prototype.F_IndicesOf=function(_121){
  1991. var a=[];
  1992. var _122=this.length;
  1993. for(var i=0;i<_122;i++){
  1994. if(this[i]==_121){
  1995. a.push(i);
  1996. }
  1997. }
  1998. return a;
  1999. };
  2000. Array.prototype.F_PushUnique=function(_123){
  2001. if(this.indexOf(_123)==-1){
  2002. this.push(_123);
  2003. return true;
  2004. }
  2005. return false;
  2006. };
  2007. Array.prototype.F_RemoveItem=function(_124){
  2008. var i=this.indexOf(_124);
  2009. if(i!=-1){
  2010. this.splice(i,1);
  2011. }
  2012. return i!=-1;
  2013. };
  2014. Array.prototype.F_IndexOfProperty=function(_125,_126){
  2015. var _127=this.length;
  2016. for(var i=0;i<_127;i++){
  2017. if(this[i][_125]==_126){
  2018. return i;
  2019. }
  2020. }
  2021. return -1;
  2022. };
  2023. Array.prototype.F_Compare=function(a){
  2024. var _128=this.length;
  2025. if(_128!=a.length){
  2026. return false;
  2027. }
  2028. for(var i=0;i<_128;i++){
  2029. if(this[i]!=a[i]){
  2030. return false;
  2031. }
  2032. }
  2033. return true;
  2034. };
  2035. Array.prototype.F_CompareIgnoreOrder=function(a){
  2036. if(this.length!=a.length){
  2037. return false;
  2038. }
  2039. for(var i=0;i<this.length;i++){
  2040. if(a.indexOf(this[i])==-1){
  2041. return false;
  2042. }
  2043. }
  2044. return true;
  2045. };
  2046. Array.prototype.F_CreateDictionary=function(){
  2047. var o={};
  2048. var _129=this.length;
  2049. for(var i=0;i<_129;i++){
  2050. o[this[i]]=true;
  2051. }
  2052. return o;
  2053. };
  2054. Array.prototype.F_CreateCompareDictionary=function(){
  2055. var o={};
  2056. var _12a=this.length;
  2057. for(var i=0;i<_12a;i++){
  2058. o[this[i]]=this[i];
  2059. }
  2060. return o;
  2061. };
  2062. Array.prototype.F_AppendArray=function(a){
  2063. var _12b=a.length;
  2064. for(var i=0;i<_12b;i++){
  2065. this.push(a[i]);
  2066. }
  2067. };
  2068. Array.prototype.F_CallEach=function(_12c){
  2069. var args=[];
  2070. var _12d=arguments.length;
  2071. for(var i=1;i<_12d;++i){
  2072. args.push(arguments[i]);
  2073. }
  2074. var _12d=this.length;
  2075. for(var i=0;i<_12d;i++){
  2076. var o=this[i];
  2077. var _12e=o?o[_12c]:null;
  2078. if(_12e){
  2079. _12e.apply(o,args);
  2080. }
  2081. }
  2082. };
  2083. Array.prototype.F_ForEach=function(_12f){
  2084. var _130=arguments[1]||this;
  2085. var _131=this.length;
  2086. for(var i=0;i<_131;i++){
  2087. _12f.call(_130,this[i],i,this);
  2088. }
  2089. };
  2090. function f_halConstructBaseClass(){
  2091. f_halConstructBaseClass.caller.toString().match(/^function\s([^\(]+)/);
  2092. window[RegExp.$1].baseConstructor.apply(this,arguments);
  2093. };
  2094. Function.prototype.F_Extends=function(_132){
  2095. function c(){
  2096. };
  2097. c.prototype=_132.prototype;
  2098. this.prototype=new c();
  2099. this.prototype.constructor=this;
  2100. this.baseConstructor=_132;
  2101. this.superClass=_132.prototype;
  2102. this.prototype.F_ConstructBaseClass=f_halConstructBaseClass;
  2103. };
  2104. Function.prototype.F_CreateCallback=function(){
  2105. var _133=U_DOM.F_CreateArgumentsArray(arguments);
  2106. var _134=this;
  2107. return (function(){
  2108. return _134.apply(window,_133.concat(U_DOM.F_CreateArgumentsArray(arguments)));
  2109. });
  2110. };
  2111. Function.prototype.F_CreateMethodCallback=function(_135){
  2112. var _136=U_DOM.F_CreateArgumentsArray(arguments,1);
  2113. var _137=this;
  2114. return (function(){
  2115. return _137.apply(_135,_136.concat(U_DOM.F_CreateArgumentsArray(arguments)));
  2116. });
  2117. };
  2118. Function.prototype.F_CreateEventMethodCallback=function(_138){
  2119. var _139=U_DOM.F_CreateArgumentsArray(arguments,1);
  2120. var _13a=this;
  2121. return (function(e){
  2122. _139.unshift(e||window.event,this);
  2123. return _13a.apply(_138,_139);
  2124. });
  2125. };
  2126. Function.prototype.F_GetFunctionName=function(){
  2127. return this.toString().match(/^\s*function\s*(\w+)/)[1];
  2128. };
  2129. var U_Object={};
  2130. U_Object.F_IsEmpty=function(o){
  2131. for(var s in o){
  2132. return false;
  2133. }
  2134. return true;
  2135. };
  2136. U_Object.F_ToArray=function(o){
  2137. var a=[];
  2138. for(var s in o){
  2139. a.push(s);
  2140. }
  2141. return a;
  2142. };
  2143. U_Object.F_ToValueArray=function(o){
  2144. var a=[];
  2145. for(var s in o){
  2146. a.push(o[s]);
  2147. }
  2148. return a;
  2149. };
  2150. U_Object.F_GetLength=function(o){
  2151. var i=0;
  2152. for(var s in o){
  2153. i++;
  2154. }
  2155. return i;
  2156. };
  2157. U_Object.F_Copy=function(o){
  2158. var _13b={};
  2159. for(var s in o){
  2160. _13b[s]=o[s];
  2161. }
  2162. return _13b;
  2163. };
  2164. U_Object.F_Clone=function(o){
  2165. switch(typeof o){
  2166. case "number":
  2167. case "string":
  2168. case "boolean":
  2169. case "undefined":
  2170. return o;
  2171. case "object":
  2172. if(o instanceof Array){
  2173. var _13c=[];
  2174. var _13d=o.length;
  2175. for(var i=0;i<_13d;i++){
  2176. _13c[i]=this.F_Clone(o[i]);
  2177. }
  2178. return _13c;
  2179. }
  2180. if(o instanceof Object){
  2181. var _13e={};
  2182. for(var s in o){
  2183. if(o.hasOwnProperty(s)){
  2184. _13e[s]=this.F_Clone(o[s]);
  2185. }
  2186. }
  2187. return _13e;
  2188. }
  2189. break;
  2190. case "function":
  2191. }
  2192. };
  2193. U_Object.F_Subtract=function(o1,o2){
  2194. var _13f=this.F_Copy(o1);
  2195. for(var s in o2){
  2196. delete _13f[s];
  2197. }
  2198. return _13f;
  2199. };
  2200. U_Object.F_GetClassName=function(o){
  2201. return o.constructor.F_GetFunctionName();
  2202. };
  2203. function C_StringStream(){
  2204. this.m_a=[];
  2205. };
  2206. C_StringStream.prototype.F_Write=function(s){
  2207. this.m_a.push(s);
  2208. };
  2209. C_StringStream.prototype.F_WriteStringStream=function(_140){
  2210. this.F_Write(_140.F_ToString());
  2211. };
  2212. C_StringStream.prototype.F_ToString=function(){
  2213. return this.m_a.join("");
  2214. };
  2215. C_StringStream.prototype.f_getPlaceHolders=function(){
  2216. if(!this.m_oPlaceHolders){
  2217. this.m_oPlaceHolders={};
  2218. this.m_iPlaceHolderCounter=0;
  2219. }
  2220. return this.m_oPlaceHolders;
  2221. };
  2222. C_StringStream.prototype.F_CreatePlaceHolder=function(s){
  2223. this.f_getPlaceHolders()[++this.m_iPlaceHolderCounter]=this.m_a.length;
  2224. this.m_a.push(s?s:"");
  2225. return this.m_iPlaceHolderCounter;
  2226. };
  2227. C_StringStream.prototype.F_WriteToPlaceHolder=function(_141,s){
  2228. this.m_a[this.m_oPlaceHolders[_141]]=s;
  2229. };
  2230. function C_Decimal(s){
  2231. s=s.replace(/\s*/g,"").replace(",",".");
  2232. if(s&&(s.match(/^([\+\-]?)0*(\d*?)\.(\d*?)0*$/)||s.match(/^([\+\-]?)0*(\d*?)$/))){
  2233. var _142=RegExp.$1;
  2234. var _143=RegExp.$2;
  2235. var _144=RegExp.$3;
  2236. if(_143||_144){
  2237. var _145=_143?_143:"0";
  2238. if(_144){
  2239. _145+="."+_144;
  2240. }
  2241. _142=(_145=="0")?"":_142;
  2242. this.m_sDecimal=_142+_145;
  2243. }else{
  2244. this.m_sDecimal="0";
  2245. }
  2246. }
  2247. };
  2248. C_Decimal.prototype.F_IsNaN=function(){
  2249. return !this.m_sDecimal;
  2250. };
  2251. C_Decimal.prototype.F_ToLocalizedString=function(){
  2252. return this.m_sDecimal?this.m_sDecimal.replace(".",Number.m_sDecimalSymbol):"NaN";
  2253. };
  2254. C_Decimal.prototype.F_ToString=function(){
  2255. return this.m_sDecimal?this.m_sDecimal:"";
  2256. };
  2257. C_Decimal.prototype.F_ToFloat=function(){
  2258. return this.m_sDecimal?String.F_ParseFloat(this.m_sDecimal):NaN;
  2259. };
  2260. C_Decimal.F_Add=function(_146,_147){
  2261. return this.f_addOrSubtract(_146,_147,true);
  2262. };
  2263. C_Decimal.F_Subtract=function(_148,_149){
  2264. return this.f_addOrSubtract(_148,_149,false);
  2265. };
  2266. C_Decimal.f_addOrSubtract=function(_14a,_14b,_14c){
  2267. var s1=_14a.F_ToString()||"0.0";
  2268. var s2=_14b.F_ToString()||"0.0";
  2269. var _14d=s1.lastIndexOf(".");
  2270. if(_14d==-1){
  2271. s1+=".0";
  2272. _14d=1;
  2273. }else{
  2274. _14d=s1.length-1-_14d;
  2275. }
  2276. var _14e=s2.lastIndexOf(".");
  2277. if(_14e==-1){
  2278. s2+=".0";
  2279. _14e=1;
  2280. }else{
  2281. _14e=s2.length-1-_14e;
  2282. }
  2283. var _14f=Math.max(_14d,_14e);
  2284. s1=s1.replace(".","");
  2285. s2=s2.replace(".","");
  2286. if(_14d>_14e){
  2287. s2=s2.F_PadRight("0",s2.length+(_14d-_14e));
  2288. }else{
  2289. if(_14e>_14d){
  2290. s1=s1.F_PadRight("0",s1.length+(_14e-_14d));
  2291. }
  2292. }
  2293. if(s2.length>s1.length){
  2294. s1=s1.F_PadLeft("0",s1.length+(s2.length-s1.length));
  2295. }
  2296. var a1=s1.split("").reverse();
  2297. var a2=s2.split("").reverse();
  2298. var _150=new Array(a1.length+1);
  2299. for(var i=0;i<_150.length;i++){
  2300. _150[i]=0;
  2301. }
  2302. for(var i=0;i<a1.length;i++){
  2303. var _151=_150.length-1-i;
  2304. var n1=parseInt(a1[i]);
  2305. var n2=parseInt(a2[i]);
  2306. n2=n2?n2:0;
  2307. if(_14c){
  2308. var _152=n1+n2;
  2309. if((_152+_150[_151])>9){
  2310. _150[_151-1]++;
  2311. _152-=10;
  2312. }
  2313. _150[_151]+=_152;
  2314. }else{
  2315. var _152=n1-n2;
  2316. if(_152<0){
  2317. _150[_151-1]--;
  2318. _152+=10;
  2319. }
  2320. _150[_151]+=_152;
  2321. if(_150[_151]<0){
  2322. _150[_151-1]--;
  2323. _150[_151]+=10;
  2324. }
  2325. }
  2326. }
  2327. _150.splice(_150.length-_14f,0,".");
  2328. return new C_Decimal(_150.join(""));
  2329. };
  2330. var G_JSON;
  2331. if(typeof JSON=="undefined"){
  2332. G_JSON={};
  2333. G_JSON.parse=function(_153){
  2334. return eval("("+_153+")");
  2335. };
  2336. G_JSON.stringify=function(o){
  2337. var as=[];
  2338. if(o==null){
  2339. as.push("null");
  2340. }else{
  2341. if(o instanceof Array){
  2342. as.push("[");
  2343. for(var i=0;i<o.length;++i){
  2344. if(i>0){
  2345. as.push(",");
  2346. }
  2347. as.push(this.stringify(o[i]));
  2348. }
  2349. as.push("]");
  2350. }else{
  2351. switch(typeof o){
  2352. case "object":
  2353. as.push("{");
  2354. var _154=0;
  2355. for(var s in o){
  2356. if(_154++>0){
  2357. as.push(",");
  2358. }
  2359. as.push("\""+s.replace(/\\/g,"\\\\").replace(/\"/g,"\\\"").replace(/\r?\n/g,"\\r\\n")+"\":");
  2360. as.push(this.stringify(o[s]));
  2361. }
  2362. as.push("}");
  2363. break;
  2364. case "string":
  2365. as.push("\""+o.replace(/\\/g,"\\\\").replace(/\"/g,"\\\"").replace(/\r?\n/g,"\\r\\n")+"\"");
  2366. break;
  2367. default:
  2368. as.push(o);
  2369. break;
  2370. }
  2371. }
  2372. }
  2373. return as.join("");
  2374. };
  2375. }else{
  2376. G_JSON=JSON;
  2377. }
  2378. function C_WebRequest(_155,_156,_157,_158,_159,_15a){
  2379. this.m_oListener=_155;
  2380. this.m_sMethod=_156;
  2381. this.m_sUrl=_157;
  2382. this.m_bAsync=(_158!==false);
  2383. this.m_sUser=_159;
  2384. this.m_sPassword=_15a;
  2385. this.m_bUseCache=true;
  2386. this.m_oError=null;
  2387. this.m_aRequestHeaders=[];
  2388. };
  2389. C_WebRequest.prototype.F_GetListener=function(){
  2390. return this.m_oListener;
  2391. };
  2392. C_WebRequest.prototype.F_SetListener=function(_15b){
  2393. this.m_oListener=_15b;
  2394. };
  2395. C_WebRequest.prototype.F_SetNewError=function(_15c,_15d,_15e){
  2396. this.m_oError=new C_Error(_15c?_15c:"Web request failed.",_15d,_15e);
  2397. };
  2398. C_WebRequest.prototype.F_SetNewErrorRes=function(_15f,_160,_161){
  2399. this.F_SetNewError(window["G_ResManager"]?G_ResManager.F_GetString(_15f):null,_160,_161);
  2400. };
  2401. C_WebRequest.prototype.F_SetError=function(_162){
  2402. this.m_oError=_162;
  2403. };
  2404. C_WebRequest.prototype.F_GetError=function(){
  2405. return this.m_oError;
  2406. };
  2407. C_WebRequest.prototype.F_SetRequestHeader=function(_163,_164){
  2408. this.m_aRequestHeaders.push(_163,_164);
  2409. };
  2410. C_WebRequest.prototype.F_GetResponseHeader=function(_165){
  2411. return this.m_oXmlHttp.getResponseHeader(_165);
  2412. };
  2413. C_WebRequest.prototype.F_SetRequestBody=function(_166){
  2414. this.m_sRequestBody=_166;
  2415. };
  2416. C_WebRequest.prototype.F_GetRequestBody=function(){
  2417. return this.m_sRequestBody;
  2418. };
  2419. C_WebRequest.prototype.F_Send=function(){
  2420. if(G_HAL.M_oTestListener&&G_HAL.M_oTestListener.F_WebRequest_OnSend){
  2421. G_HAL.M_oTestListener.F_WebRequest_OnSend(this);
  2422. }
  2423. if(this.m_oXmlHttp){
  2424. this.m_oXmlHttp=null;
  2425. }
  2426. this.m_bCompleted=false;
  2427. C_WebRequest.F_AddActiveRequest(this);
  2428. this.m_oXmlHttp=((U_XML.M_bUseNativeXMLHttpRequest||G_BrowserInfo.M_bIsFirefox)&&window.XMLHttpRequest)?new XMLHttpRequest():new ActiveXObject(U_XML.K_sProgID_XMLHTTP);
  2429. try{
  2430. if(this.m_sUser||this.m_sPassword){
  2431. this.m_oXmlHttp.open(this.m_sMethod,this.m_sUrl,this.m_bAsync,this.m_sUser,this.m_sPassword);
  2432. }else{
  2433. this.m_oXmlHttp.open(this.m_sMethod,this.m_sUrl,this.m_bAsync);
  2434. }
  2435. }
  2436. catch(e){
  2437. G_Debug.F_Print("Error opening C_WebRequest request");
  2438. this.F_SetNewErrorRes("IDS_HAL_WEBREQUEST_SEND_ERROR","URL: "+this.m_sUrl);
  2439. if(this.m_oListener&&this.m_oListener.F_Request_OnComplete){
  2440. this.m_oListener.F_Request_OnComplete(this);
  2441. }
  2442. return;
  2443. }
  2444. if(G_BrowserInfo.M_bIsFirefox){
  2445. var _167=this.m_sUrl.substr(this.m_sUrl.length-".dtd".length);
  2446. if(_167==".dtd"){
  2447. this.m_oXmlHttp.overrideMimeType("text/plain");
  2448. }
  2449. }
  2450. for(var i=0;i<this.m_aRequestHeaders.length;i+=2){
  2451. this.m_oXmlHttp.setRequestHeader(this.m_aRequestHeaders[i],this.m_aRequestHeaders[i+1]);
  2452. }
  2453. if(!this.m_bUseCache){
  2454. this.m_oXmlHttp.setRequestHeader("If-Modified-Since","Thu, 01 Jan 1970 00:00:00 GMT");
  2455. }
  2456. this.m_oXmlHttp.onreadystatechange=this.f_onReadyStateChange.F_CreateMethodCallback(this);
  2457. try{
  2458. this.m_oXmlHttp.send(this.m_sRequestBody?this.m_sRequestBody:"");
  2459. }
  2460. catch(e){
  2461. G_Debug.F_Print("Error sending C_WebRequest request");
  2462. this.F_SetNewErrorRes("IDS_HAL_WEBREQUEST_SEND_ERROR");
  2463. if(this.m_oListener&&this.m_oListener.F_Request_OnComplete){
  2464. this.m_oListener.F_Request_OnComplete(this);
  2465. }
  2466. }
  2467. };
  2468. C_WebRequest.prototype.f_onReadyStateChange=function(){
  2469. if(!this.m_bAborted&&(this.m_oXmlHttp.readyState==4)){
  2470. C_WebRequest.F_RemoveActiveRequest(this);
  2471. this.m_bCompleted=true;
  2472. this.m_oXmlHttp.onreadystatechange=U_DOM.F_EmptyFunction;
  2473. if(!this.F_IsSuccessStatus()){
  2474. var _168=window["G_ResManager"]?G_ResManager.F_GetOptionalString("IDS_HAL_WEBREQUEST_ERROR"):null;
  2475. var _169=this.F_GetStatus()+" - "+this.F_GetStatusText()+"\n"+"URL: "+this.F_GetUrl();
  2476. var _16a=this.F_GetResponseText();
  2477. if(_16a){
  2478. _169+="\n\nResponse Text:\n"+_16a;
  2479. }
  2480. G_HAL.F_VerifyDependencies("C_Error");
  2481. this.F_SetNewError(_168,_169,"");
  2482. }
  2483. if(!this.F_IsReadyToProcess()){
  2484. return;
  2485. }
  2486. this.F_ProcessResponse();
  2487. if(this.m_oListener&&this.m_oListener.F_Request_OnComplete){
  2488. this.m_oListener.F_Request_OnComplete(this);
  2489. }
  2490. }
  2491. };
  2492. C_WebRequest.prototype.F_ProcessResponse=function(){
  2493. if(G_HAL.M_oTestListener&&G_HAL.M_oTestListener.F_WebRequest_OnProcessResponse){
  2494. G_HAL.M_oTestListener.F_WebRequest_OnProcessResponse(this);
  2495. }
  2496. if(this.m_oError){
  2497. G_Debug.F_Print(this.m_oError.F_GetErrorSummary()+"\n"+this.m_oError.F_GetErrorDetails());
  2498. }
  2499. };
  2500. C_WebRequest.prototype.F_IsReadyToProcess=function(){
  2501. return true;
  2502. };
  2503. C_WebRequest.prototype.F_Abort=function(){
  2504. this.m_bAborted=true;
  2505. C_WebRequest.F_RemoveActiveRequest(this);
  2506. if(this.m_oXmlHttp){
  2507. this.m_oXmlHttp.abort();
  2508. delete this.m_oXmlHttp;
  2509. }
  2510. if(!this.m_bCompleted&&this.m_oListener&&this.m_oListener.F_Request_OnAborted){
  2511. this.m_bCompleted=true;
  2512. this.m_oListener.F_Request_OnAborted(this);
  2513. }
  2514. };
  2515. C_WebRequest.prototype.F_IsSuccessStatus=function(){
  2516. var _16b=this.F_GetStatus();
  2517. return ((_16b>=200)&&(_16b<300));
  2518. };
  2519. C_WebRequest.prototype.F_GetStatus=function(){
  2520. return U_DOM.F_GetPropertyInTryCatch(this.m_oXmlHttp,"status");
  2521. };
  2522. C_WebRequest.prototype.F_GetStatusText=function(){
  2523. return U_DOM.F_GetPropertyInTryCatch(this.m_oXmlHttp,"statusText");
  2524. };
  2525. C_WebRequest.prototype.F_GetUrl=function(){
  2526. return this.m_sUrl;
  2527. };
  2528. C_WebRequest.prototype.F_GetResponseText=function(){
  2529. return this.m_oXmlHttp.responseText;
  2530. };
  2531. C_WebRequest.prototype.F_SetCaching=function(_16c){
  2532. this.m_bUseCache=_16c;
  2533. };
  2534. C_WebRequest.prototype.F_SetContext=function(_16d){
  2535. this.m_vContext=_16d;
  2536. };
  2537. C_WebRequest.prototype.F_GetContext=function(){
  2538. return this.m_vContext;
  2539. };
  2540. C_WebRequest.m_aActiveRequests=[];
  2541. C_WebRequest.F_AbortActiveRequests=function(){
  2542. for(var i=0;i<this.m_aActiveRequests.length;i++){
  2543. this.m_aActiveRequests[i].F_Abort();
  2544. }
  2545. this.m_aActiveRequests.F_Clear();
  2546. };
  2547. C_WebRequest.F_AddActiveRequest=function(_16e){
  2548. this.m_aActiveRequests.push(_16e);
  2549. };
  2550. C_WebRequest.F_RemoveActiveRequest=function(_16f){
  2551. this.m_aActiveRequests.F_RemoveItem(_16f);
  2552. };
  2553. function C_SoapRequest(_170,_171,_172,_173){
  2554. this.F_ConstructBaseClass(_170,"POST",_171);
  2555. this.F_SetRequestHeader("Content-Type","text/xml; charset=utf-8");
  2556. if(_172){
  2557. this.F_SetSoapAction(_172);
  2558. }
  2559. if(_173){
  2560. this.F_SetRequestBody(_173);
  2561. }
  2562. };
  2563. C_SoapRequest.F_Extends(C_WebRequest);
  2564. C_SoapRequest.prototype.F_IsSuccessStatus=function(){
  2565. return ((this.F_GetStatus()==500)||C_SoapRequest.superClass.F_IsSuccessStatus.call(this));
  2566. };
  2567. C_SoapRequest.prototype.F_SetSoapAction=function(_174){
  2568. var i=this.m_aRequestHeaders.indexOf("SOAPAction");
  2569. if(i!=-1){
  2570. this.m_aRequestHeaders.splice(i,2);
  2571. }
  2572. this.F_SetRequestHeader("SOAPAction",_174);
  2573. };
  2574. var U_XML={};
  2575. U_XML.K_iNODE_ELEMENT=1;
  2576. U_XML.K_iNODE_ATTRIBUTE=2;
  2577. U_XML.K_iNODE_TEXT=3;
  2578. U_XML.K_iNODE_CDATA_SECTION=4;
  2579. U_XML.K_iNODE_ENTITY_REFERENCE=5;
  2580. U_XML.K_iNODE_ENTITY=6;
  2581. U_XML.K_iNODE_PROCESSING_INSTRUCTION=7;
  2582. U_XML.K_iNODE_COMMENT=8;
  2583. U_XML.K_iNODE_DOCUMENT=9;
  2584. U_XML.K_iNODE_DOCUMENT_TYPE=10;
  2585. U_XML.K_iNODE_DOCUMENT_FRAGMENT=11;
  2586. U_XML.K_iNODE_NOTATION=12;
  2587. U_XML.K_sProgID_DOMDocument="MSXML2.DOMDocument.3.0";
  2588. U_XML.K_sProgID_XMLHTTP="MSXML2.XMLHTTP.3.0";
  2589. U_XML.F_SetXml60=function(){
  2590. this.K_sProgID_DOMDocument="Msxml2.DOMDocument.6.0";
  2591. this.K_sProgID_XMLHTTP="Msxml2.XMLHTTP.6.0";
  2592. };
  2593. U_XML.M_bUseNativeXMLHttpRequest=true;
  2594. U_XML.F_RemoveXmlProcessingInstruction=function(_175){
  2595. return _175.replace(/^<\?xml.*?\?>/i,"");
  2596. };
  2597. U_XML.F_CreateDocument=function(){
  2598. var d=G_BrowserInfo.M_bIsIE?new ActiveXObject(this.K_sProgID_DOMDocument):document.implementation.createDocument("","",null);
  2599. d.async=false;
  2600. d.validateOnParse=false;
  2601. d.setProperty("SelectionLanguage","XPath");
  2602. return d;
  2603. };
  2604. U_XML.F_XML_OnParseError=function(d){
  2605. var _176=d.parseError;
  2606. G_Debug.F_Print("XML Parse Error");
  2607. G_Debug.F_Print("---------------------------");
  2608. G_Debug.F_Print(" reason: "+_176.reason);
  2609. G_Debug.F_Print(" url: "+_176.url);
  2610. G_Debug.F_Print(" line: "+_176.line);
  2611. G_Debug.F_Print(" linepos: "+_176.linepos);
  2612. G_Debug.F_Print(" srcText: "+_176.srcText);
  2613. };
  2614. U_XML.F_LoadDocument=function(_177,_178,_179,_17a){
  2615. var d=this.F_CreateDocument();
  2616. d.validateOnParse=(_179!=false);
  2617. d.preserveWhiteSpace=(_17a==true);
  2618. try{
  2619. if(!d.load(_178)){
  2620. _177=_177?_177:this;
  2621. _177.F_XML_OnParseError(d);
  2622. return null;
  2623. }
  2624. }
  2625. catch(e){
  2626. _177=_177?_177:this;
  2627. _177.F_XML_OnParseError(d);
  2628. return null;
  2629. }
  2630. return d;
  2631. };
  2632. U_XML.F_LoadString=function(_17b,_17c,_17d,_17e){
  2633. var d=null;
  2634. var _17f=false;
  2635. try{
  2636. if(G_BrowserInfo.M_bIsIE){
  2637. d=this.F_CreateDocument();
  2638. d.validateOnParse=(_17d!=false);
  2639. d.preserveWhiteSpace=(_17e==true);
  2640. _17f=d.loadXML(_17c);
  2641. }else{
  2642. d=(new DOMParser()).parseFromString(_17c,"text/xml");
  2643. _17f=(d.parseError.errorCode==0);
  2644. }
  2645. if(!_17f){
  2646. _17b=_17b?_17b:this;
  2647. _17b.F_XML_OnParseError(d);
  2648. this.F_AlertInvalidUtf8Bom(_17c);
  2649. return null;
  2650. }
  2651. }
  2652. catch(e){
  2653. _17b=_17b?_17b:this;
  2654. _17b.F_XML_OnParseError(d);
  2655. this.F_AlertInvalidUtf8Bom(_17c);
  2656. return null;
  2657. }
  2658. return d;
  2659. };
  2660. U_XML.F_LoadStringWithDTD=function(_180,_181,_182,_183,_184){
  2661. var d=U_XML.F_LoadString(_180,(_182?_182+_181:_181),_183,_184);
  2662. if(d&&!G_BrowserInfo.M_bIsIE){
  2663. d.rawDTD=_182;
  2664. }
  2665. return d;
  2666. };
  2667. U_XML.F_CreateElementNS=function(d,_185,_186){
  2668. return G_BrowserInfo.M_bIsIE?d.createNode(this.K_iNODE_ELEMENT,_186,_185):d.createElementNS(_185,_186);
  2669. };
  2670. U_XML.F_CreateAttributeNS=function(d,_187,_188){
  2671. return G_BrowserInfo.M_bIsIE?d.createNode(this.K_iNODE_ATTRIBUTE,_188,_187):d.createAttributeNS(_187,_188);
  2672. };
  2673. U_XML.F_ImportNode=function(d,n,_189){
  2674. if(G_BrowserInfo.M_bIsIE||(n.ownerDocument==d)){
  2675. return n.cloneNode(_189!==false);
  2676. }
  2677. var _18a=d.documentElement?d.documentElement:d;
  2678. if(!d.doctype){
  2679. var _18b=d.importNode(n,_189!==false);
  2680. _18b=_18a.appendChild(_18b);
  2681. _18b=_18a.removeChild(_18b);
  2682. return _18b;
  2683. }
  2684. if(n.ownerDocument.doctype&&(n.ownerDocument.doctype.xml==d.doctype.xml)){
  2685. var _18b=d.importNode(n,_189!==false);
  2686. _18b=_18a.appendChild(_18b);
  2687. _18b=_18a.removeChild(_18b);
  2688. return _18b;
  2689. }
  2690. var _18c=this.F_LoadString(null,d.doctype.xml+n.xml);
  2691. var _18b=d.importNode(_18c.documentElement,_189!==false);
  2692. _18b=_18a.appendChild(_18b);
  2693. _18b=_18a.removeChild(_18b);
  2694. return _18b;
  2695. };
  2696. U_XML.F_GetUniqueId=function(d,_18d){
  2697. var i=1;
  2698. var _18e=_18d;
  2699. while(d.nodeFromID(_18e)){
  2700. _18e=_18d+i++;
  2701. }
  2702. return _18e;
  2703. };
  2704. U_XML.F_GiveNodeUniqueId=function(d,n,_18f){
  2705. if(!_18f){
  2706. _18f=n.nodeName;
  2707. }
  2708. n.setAttribute("id",this.F_GetUniqueId(d,_18f));
  2709. return n;
  2710. };
  2711. U_XML.F_IndexOf=function(nl,n){
  2712. var _190=nl.length;
  2713. for(var i=0;i<_190;++i){
  2714. if(nl.item(i)==n){
  2715. return i;
  2716. }
  2717. }
  2718. return -1;
  2719. };
  2720. U_XML.F_GetIndex=function(n){
  2721. return this.F_IndexOf(n.parentNode.selectNodes("*"),n);
  2722. };
  2723. U_XML.F_RemoveNode=function(_191,_192){
  2724. var n=_191.selectSingleNode(_192);
  2725. if(n){
  2726. n.parentNode.removeChild(n);
  2727. }
  2728. return n;
  2729. };
  2730. U_XML.F_RemoveNodeAndEmptyParent=function(_193,_194){
  2731. var n=_193.selectSingleNode(_194);
  2732. if(n){
  2733. var _195=n.parentNode;
  2734. _195.removeChild(n);
  2735. if(!_195.selectSingleNode("*")){
  2736. _195.parentNode.removeChild(_195);
  2737. }
  2738. }
  2739. return n;
  2740. };
  2741. U_XML.F_RemoveNodes=function(_196,_197){
  2742. var nl=_196.selectNodes(_197);
  2743. var _198=nl.length;
  2744. for(var i=0;i<_198;++i){
  2745. var n=nl.item(i);
  2746. n.parentNode.removeChild(n);
  2747. }
  2748. return nl;
  2749. };
  2750. U_XML.F_RemoveNodesInArray=function(_199){
  2751. var _19a=_199.length;
  2752. for(var i=0;i<_19a;i++){
  2753. var n=_199[i];
  2754. var _19b=n.parentNode;
  2755. if(_19b){
  2756. _19b.removeChild(n);
  2757. }
  2758. }
  2759. };
  2760. U_XML.F_AppendArray=function(n,_19c){
  2761. var _19d=_19c.length;
  2762. for(var i=0;i<_19d;++i){
  2763. n.appendChild(_19c[i]);
  2764. }
  2765. };
  2766. U_XML.F_AppendNodeList=function(n,nl){
  2767. var _19e=nl.length;
  2768. for(var i=0;i<_19e;++i){
  2769. n.appendChild(nl.item(i));
  2770. }
  2771. };
  2772. U_XML.F_AppendNodeListToArray=function(a,nl){
  2773. if(!a){
  2774. a=[];
  2775. }
  2776. var _19f=nl.length;
  2777. for(var i=0;i<_19f;++i){
  2778. a.push(nl.item(i));
  2779. }
  2780. return a;
  2781. };
  2782. U_XML.F_AppendValues=function(a,nl){
  2783. if(!a){
  2784. a=[];
  2785. }
  2786. var _1a0=nl.length;
  2787. for(var i=0;i<_1a0;++i){
  2788. var n=nl.item(i);
  2789. a.push((n.nodeType==this.K_iNODE_ATTRIBUTE)?n.value:n.nodeValue);
  2790. }
  2791. return a;
  2792. };
  2793. U_XML.F_AppendValuesToObject=function(o,nl){
  2794. if(!o){
  2795. o={};
  2796. }
  2797. var _1a1=nl.length;
  2798. for(var i=0;i<_1a1;++i){
  2799. var n=nl.item(i);
  2800. o[(n.nodeType==this.K_iNODE_ATTRIBUTE)?n.value:n.nodeValue]=true;
  2801. }
  2802. return o;
  2803. };
  2804. U_XML.F_AppendUniqueValues=function(a,nl){
  2805. if(!a){
  2806. a=[];
  2807. }
  2808. var _1a2=nl.length;
  2809. for(var i=0;i<_1a2;++i){
  2810. var n=nl.item(i);
  2811. a.F_PushUnique((n.nodeType==this.K_iNODE_ATTRIBUTE)?n.value:n.nodeValue);
  2812. }
  2813. return a;
  2814. };
  2815. U_XML.F_GetXPath=function(_1a3,_1a4){
  2816. var _1a5="";
  2817. for(;_1a4&&(_1a4!=_1a3);_1a4=_1a4.parentNode){
  2818. _1a5="/"+_1a4.nodeName+"["+(this.F_IndexOf(_1a4.parentNode.selectNodes(_1a4.nodeName),_1a4)+1)+"]"+_1a5;
  2819. }
  2820. return (_1a4?("."+_1a5):"");
  2821. };
  2822. U_XML.F_GetNextSiblingElement=function(n){
  2823. return n.selectSingleNode("following-sibling::*");
  2824. };
  2825. U_XML.F_GetPreviousSiblingElement=function(n){
  2826. return n.selectSingleNode("preceding-sibling::*[1]");
  2827. };
  2828. U_XML.F_GetNextElementOfSequence=function(n,_1a6){
  2829. if(_1a6){
  2830. return this.F_SelectSingleNode(n,"following-sibling::",_1a6);
  2831. }
  2832. return n.selectSingleNode("following-sibling::"+n.nodeName);
  2833. };
  2834. U_XML.F_GetPreviousElementOfSequence=function(n,_1a7){
  2835. if(_1a7){
  2836. return this.F_SelectSingleNode(n,"preceding-sibling::",_1a7);
  2837. }
  2838. return n.selectSingleNode("preceding-sibling::"+n.nodeName+"[1]");
  2839. };
  2840. U_XML.F_GetUniqueValue=function(_1a8,_1a9,_1aa,_1ab,_1ac){
  2841. var _1ad={};
  2842. var _1ae=_1a8.length;
  2843. for(var i=0;i<_1ae;++i){
  2844. _1ad[_1a8.item(i).value]=true;
  2845. }
  2846. return this.f_getUniqueValue(_1ad,_1a9,_1aa,_1ab,_1ac);
  2847. };
  2848. U_XML.F_GetUniqueValueFromArray=function(_1af,_1b0,_1b1,_1b2,_1b3){
  2849. var _1b4=_1af.F_CreateDictionary();
  2850. return this.f_getUniqueValue(_1b4,_1b0,_1b1,_1b2,_1b3);
  2851. };
  2852. U_XML.f_getUniqueValue=function(_1b5,_1b6,_1b7,_1b8,_1b9){
  2853. if((_1b9!=false)&&_1b6.match(/^(.*\D0*)(\d+)$/)){
  2854. _1b6=RegExp.$1;
  2855. _1b8=RegExp.$2;
  2856. _1b7=true;
  2857. }
  2858. var i=_1b8?parseInt(_1b8):1;
  2859. i=i<10000?i:1;
  2860. var s=_1b6;
  2861. if(_1b7){
  2862. s+=i++;
  2863. }
  2864. for(;_1b5[s];i++){
  2865. s=_1b6+i;
  2866. }
  2867. return s;
  2868. };
  2869. U_XML.F_GiveUniqueValue=function(n,_1ba,_1bb,_1bc,_1bd,_1be){
  2870. n.setAttribute(_1ba,this.F_GetUniqueValue(_1bc,_1bb,_1bd,null,_1be));
  2871. };
  2872. U_XML.F_GiveUniqueName=function(n,_1bf,_1c0,_1c1,_1c2){
  2873. this.F_GiveUniqueValue(n,"name",_1bf,_1c0,_1c1,_1c2);
  2874. };
  2875. U_XML.F_ReplaceNodeWithNodeList=function(n,nl){
  2876. var _1c3=n.parentNode;
  2877. var _1c4=nl.length;
  2878. for(var i=0;i<_1c4;i++){
  2879. _1c3.insertBefore(nl.item(i),n);
  2880. }
  2881. _1c3.removeChild(n);
  2882. };
  2883. U_XML.F_ReplaceNodeWithArray=function(n,a){
  2884. var _1c5=n.parentNode;
  2885. var _1c6=a.length;
  2886. for(var i=0;i<_1c6;i++){
  2887. _1c5.insertBefore(a[i],n);
  2888. }
  2889. _1c5.removeChild(n);
  2890. };
  2891. U_XML.F_SetNodeName=function(n,_1c7){
  2892. if(n.nodeName==_1c7){
  2893. return n;
  2894. }
  2895. var _1c8=n.ownerDocument.createElement(_1c7);
  2896. U_XML.F_CopyAttributes(_1c8,n,null,true);
  2897. U_XML.F_AppendNodeList(_1c8,U_XML.F_RemoveNodes(n,"*"));
  2898. if(n.parentNode){
  2899. n.parentNode.replaceChild(_1c8,n);
  2900. }
  2901. return _1c8;
  2902. };
  2903. U_XML.F_CopyAttributes=function(_1c9,_1ca,_1cb,_1cc,_1cd){
  2904. var o=_1cb?_1cb.F_CreateDictionary():null;
  2905. var nl=_1ca.selectNodes("@*");
  2906. if(G_BrowserInfo.M_bIsFirefox){
  2907. _1cc=false;
  2908. }
  2909. var _1ce=nl.length;
  2910. for(var i=0;i<_1ce;++i){
  2911. var _1cf=nl.item(i);
  2912. var _1d0=_1cf.name;
  2913. if(o&&!o[_1d0]){
  2914. continue;
  2915. }
  2916. if(_1d0==_1cd){
  2917. continue;
  2918. }
  2919. if(_1cc&&!U_XML.F_IsAttributeSpecified(_1ca,_1ca.attributes.getNamedItem(_1d0))){
  2920. continue;
  2921. }
  2922. _1c9.setAttribute(_1d0,_1cf.value);
  2923. }
  2924. };
  2925. U_XML.F_CopyAttribute=function(_1d1,_1d2,_1d3){
  2926. var _1d4=_1d2.getAttribute(_1d3);
  2927. if(_1d4!=null){
  2928. _1d1.setAttribute(_1d3,_1d4);
  2929. return true;
  2930. }
  2931. return false;
  2932. };
  2933. U_XML.F_ConstructFilter=function(_1d5,_1d6,_1d7,_1d8,_1d9,_1da){
  2934. if(_1d7.length==0){
  2935. return "";
  2936. }
  2937. var _1db=[];
  2938. for(var i=0;i<_1d7.length;i++){
  2939. var _1dc=_1d7[i];
  2940. if(_1d9){
  2941. _1db.push("translate("+_1d5+", 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')"+_1d6+_1dc.toLowerCase().F_ToXPathString());
  2942. }else{
  2943. _1db.push(_1d5+_1d6+_1dc.F_ToXPathString());
  2944. }
  2945. }
  2946. return "["+(_1da?"not(":"")+_1db.join(" "+_1d8+" ")+(_1da?")":"")+"]";
  2947. };
  2948. U_XML.F_ConstructInFilter=function(_1dd,_1de,_1df,_1e0){
  2949. return this.F_ConstructFilter(_1dd,"=",_1de,"or",_1df,_1e0);
  2950. };
  2951. U_XML.F_ConstructAttributeFilter=function(_1e1,_1e2,_1e3,_1e4,_1e5,_1e6){
  2952. return this.F_ConstructFilter("@"+_1e1,_1e2,_1e3,_1e4,_1e5,_1e6);
  2953. };
  2954. U_XML.F_ConstructUnion=function(_1e7,_1e8,_1e9){
  2955. var a=[];
  2956. if(_1e7){
  2957. a.push(_1e7);
  2958. }
  2959. a.push("*[self::");
  2960. a.push(_1e8.join(" | self::"));
  2961. a.push("]");
  2962. if(_1e9){
  2963. a.push(_1e9);
  2964. }
  2965. return a.join("");
  2966. };
  2967. U_XML.F_SelectSingleNode=function(n,_1ea,_1eb,_1ec){
  2968. return n.selectSingleNode(this.F_ConstructUnion(_1ea,_1eb,_1ec)+"[1]");
  2969. };
  2970. U_XML.F_SelectNodes=function(n,_1ed,_1ee,_1ef){
  2971. return n.selectNodes(this.F_ConstructUnion(_1ed,_1ee,_1ef));
  2972. };
  2973. U_XML.F_GetAncestor=function(n,_1f0){
  2974. return n.selectSingleNode("ancestor::"+_1f0+"[1]");
  2975. };
  2976. U_XML.F_GetAncestorEx=function(n,_1f1){
  2977. return n.selectSingleNode("("+this.F_ConstructUnion("ancestor::",_1f1)+")[last()]");
  2978. };
  2979. U_XML.F_GetAncestorOrSelf=function(n,_1f2){
  2980. return n?n.selectSingleNode("ancestor-or-self::"+_1f2+"[1]"):null;
  2981. };
  2982. U_XML.F_GetAncestorOrSelfEx=function(n,_1f3){
  2983. return n?n.selectSingleNode("("+this.F_ConstructUnion("ancestor-or-self::",_1f3)+")[last()]"):null;
  2984. };
  2985. U_XML.F_GetAncestorOrSelfAttribute=function(n,_1f4){
  2986. return n.selectSingleNode("ancestor-or-self::*[@"+_1f4+"][1]");
  2987. };
  2988. U_XML.F_IsAncestor=function(n,_1f5){
  2989. for(var _1f6=n.parentNode;_1f6;_1f6=_1f6.parentNode){
  2990. if(_1f6==_1f5){
  2991. return true;
  2992. }
  2993. }
  2994. return false;
  2995. };
  2996. U_XML.F_GetSpecifiedAttributeValue=function(_1f7,_1f8){
  2997. var _1f9=_1f7.attributes.getNamedItem(_1f8);
  2998. return (_1f9&&U_XML.F_IsAttributeSpecified(_1f7,_1f9))?_1f7.getAttribute(_1f8):null;
  2999. };
  3000. U_XML.F_SetAttributeString=function(n,_1fa){
  3001. var a=_1fa.split(/\s+/g);
  3002. var _1fb=a.length;
  3003. for(var i=0;i<_1fb;i++){
  3004. var _1fc=a[i].split("=");
  3005. var _1fd=_1fc[1];
  3006. n.setAttribute(_1fc[0],_1fd.substr(1,_1fd.length-2));
  3007. }
  3008. };
  3009. U_XML.F_SetAttributes=function(a,_1fe,_1ff){
  3010. var _200=a.length;
  3011. for(var i=0;i<_200;i++){
  3012. this.F_SetAttribute(a[i],_1fe,_1ff);
  3013. }
  3014. };
  3015. U_XML.F_SetAttribute=function(n,_201,_202){
  3016. n.removeAttribute(_201);
  3017. if(n.getAttribute(_201)!=_202){
  3018. n.setAttribute(_201,_202);
  3019. }
  3020. };
  3021. U_XML.F_SetAttributeValues=function(nl,_203){
  3022. var _204=nl.length;
  3023. for(var i=0;i<_204;++i){
  3024. nl.item(i).value=_203;
  3025. }
  3026. };
  3027. U_XML.F_SetNodeAttributeValues=function(nl,_205,_206){
  3028. var _207=nl.length;
  3029. for(var i=0;i<_207;++i){
  3030. nl.item(i).setAttribute(_205,_206);
  3031. }
  3032. };
  3033. U_XML.F_RemoveAttribute=function(n,_208,_209){
  3034. this.F_RemoveAttributeFromNodeList(n.selectNodes(_208+"[@"+_209+"]"),_209);
  3035. };
  3036. U_XML.F_RemoveAttributeFromNodeList=function(nl,_20a){
  3037. var _20b=nl.length;
  3038. for(var i=0;i<_20b;i++){
  3039. nl.item(i).removeAttribute(_20a);
  3040. }
  3041. };
  3042. U_XML.F_RemoveAttributes=function(a,_20c){
  3043. var _20d=a.length;
  3044. for(var i=0;i<_20d;i++){
  3045. a[i].removeAttribute(_20c);
  3046. }
  3047. };
  3048. U_XML.F_RemoveAllAttribute=function(n,_20e){
  3049. this.F_RemoveAttributeFromNodeList(n.selectNodes("descendant-or-self::*[@"+_20e+"]"),_20e);
  3050. };
  3051. U_XML.F_GetNodeText=function(n){
  3052. if(n){
  3053. return n.nodeType==this.K_iNODE_ATTRIBUTE?n.value:n.text;
  3054. }
  3055. return "";
  3056. };
  3057. U_XML.F_GetCreateChild=function(n,_20f){
  3058. var _210=n.selectSingleNode(_20f);
  3059. if(_210){
  3060. return _210;
  3061. }
  3062. return n.appendChild(n.ownerDocument.createElement(_20f));
  3063. };
  3064. U_XML.F_AppendChild=function(n,_211){
  3065. return n.appendChild(n.ownerDocument.createElement(_211));
  3066. };
  3067. U_XML.F_InsertNodePath=function(_212,_213,_214,_215){
  3068. var d=_212.ownerDocument;
  3069. var a=_213.split("/");
  3070. var _216=null;
  3071. var _217=null;
  3072. var _218=a.length;
  3073. for(var i=0;i<_218;i++){
  3074. var n=d.createElement(a[i]);
  3075. if(i==0){
  3076. _216=n;
  3077. _212.insertBefore(n,_215?_215:null);
  3078. }else{
  3079. _217.appendChild(n);
  3080. }
  3081. _217=n;
  3082. }
  3083. return _214?_217:_216;
  3084. };
  3085. U_XML.F_GetCreateNodePath=function(_219,_21a,_21b,_21c){
  3086. var d=_219.ownerDocument;
  3087. var a=_21a.split("/");
  3088. var _21d=null;
  3089. var _21e=_219;
  3090. var _21f=a.length;
  3091. for(var i=0;i<_21f;i++){
  3092. var _220=_21e.selectSingleNode(a[i]);
  3093. _21e=_220||_21e.insertBefore(d.createElement(a[i]),(!_21d&&_21c)?_21c:null);
  3094. if(!_21d){
  3095. _21d=_21e;
  3096. }
  3097. }
  3098. return _21b?_21e:_21d;
  3099. };
  3100. U_XML.F_HaveSameNodeName=function(_221){
  3101. var _222=_221[0].nodeName;
  3102. var _223=_221.length;
  3103. for(var i=1;i<_223;i++){
  3104. if(_221[i].nodeName!=_222){
  3105. return false;
  3106. }
  3107. }
  3108. return true;
  3109. };
  3110. U_XML.F_HaveSameParent=function(_224){
  3111. var _225=_224[0].parentNode;
  3112. var _226=_224.length;
  3113. for(var i=1;i<_224.length;i++){
  3114. if(_224[i].parentNode!=_225){
  3115. return false;
  3116. }
  3117. }
  3118. return true;
  3119. };
  3120. U_XML.F_SerializeNode=function(_227){
  3121. if(G_BrowserInfo.M_bIsIE){
  3122. return _227.xml;
  3123. }
  3124. if(_227.nodeType==U_XML.K_iNODE_DOCUMENT&&!_227.doctype){
  3125. return _227.xml;
  3126. }
  3127. if(_227.nodeType==U_XML.K_iNODE_ELEMENT&&!_227.ownerDocument.doctype){
  3128. return _227.xml;
  3129. }
  3130. return (new C_XmlSerializer(_227)).F_ToString();
  3131. };
  3132. U_XML.F_AlertInvalidUtf8Bom=function(_228){
  3133. var i=_228.indexOf("\ufeff");
  3134. if(i!=-1){
  3135. G_HAL.F_AlertError("Found BOM at position "+i);
  3136. }
  3137. return (i!=-1);
  3138. };
  3139. U_XML.F_SerializeToHTML=function(n){
  3140. var re=/<\s*(?!img|input|link|meta|area)([^\/\s]+)([^>]*)\/>/gi;
  3141. return n.xml.replace(re,function($0,$1,$2){
  3142. return "<"+$1+$2+"></"+$1+">";
  3143. });
  3144. };
  3145. U_XML.F_SerializeNodeContentsToHTML=function(n){
  3146. var _229=this.F_SerializeToHTML(n);
  3147. return _229.replace(/^<[^>]*>|<\/[^>]*>$/g,"");
  3148. };
  3149. U_XML.F_CreateLookupByAttributeValue=function(v_nl,_22a){
  3150. var _22b={};
  3151. if(v_nl&&v_nl.length>0&&_22a){
  3152. for(var i=0;i<v_nl.length;++i){
  3153. var n=v_nl.item(i);
  3154. var _22c=n.getAttribute(_22a);
  3155. if(_22c){
  3156. _22b[_22c]=n;
  3157. }
  3158. }
  3159. }
  3160. return _22b;
  3161. };
  3162. U_XML.F_IsAttributeSpecified=function(n,_22d){
  3163. if(G_BrowserInfo.M_bIsIE){
  3164. return _22d.specified;
  3165. }
  3166. var d=n.ownerDocument;
  3167. if(d.doctype){
  3168. var _22e=d.f_getHALDefaultAttributeLookup()[n.nodeName];
  3169. return !(_22e&&_22e[_22d.name]&&(_22e[_22d.name]===_22d.value));
  3170. }
  3171. return true;
  3172. };