1/*ADOBE SYSTEMS INCORPORATED 2Copyright 2012 Adobe Systems Incorporated 3All Rights Reserved. 4 5NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the 6terms of the Adobe license agreement accompanying it. If you have received this file from a 7source other than Adobe, then your use, modification, or distribution of it requires the prior 8written permission of Adobe.*/ 9if(!String.prototype.startsWith){ 10Object.defineProperty(String.prototype,"startsWith",{value:function(_1fa,pos){ 11pos=!pos||pos<0?0:+pos; 12return this.substring(pos,pos+_1fa.length)===_1fa; 13}}); 14} 15function cfinit(){ 16if(!window.ColdFusion){ 17ColdFusion={}; 18var $C=ColdFusion; 19if(!$C.Ajax){ 20$C.Ajax={}; 21} 22var $A=$C.Ajax; 23if(!$C.AjaxProxy){ 24$C.AjaxProxy={}; 25} 26var $X=$C.AjaxProxy; 27if(!$C.Bind){ 28$C.Bind={}; 29} 30var $B=$C.Bind; 31if(!$C.Event){ 32$C.Event={}; 33} 34var $E=$C.Event; 35if(!$C.Log){ 36$C.Log={}; 37} 38var $L=$C.Log; 39if(!$C.Util){ 40$C.Util={}; 41} 42var $U=$C.Util; 43if(!$C.DOM){ 44$C.DOM={}; 45} 46var $D=$C.DOM; 47if(!$C.Spry){ 48$C.Spry={}; 49} 50var $S=$C.Spry; 51if(!$C.Pod){ 52$C.Pod={}; 53} 54var $P=$C.Pod; 55if(!$C.objectCache){ 56$C.objectCache={}; 57} 58if(!$C.required){ 59$C.required={}; 60} 61if(!$C.importedTags){ 62$C.importedTags=[]; 63} 64if(!$C.requestCounter){ 65$C.requestCounter=0; 66} 67if(!$C.bindHandlerCache){ 68$C.bindHandlerCache={}; 69} 70window._cf_loadingtexthtml="<div style=\"text-align: center;\">"+window._cf_loadingtexthtml+" "+CFMessage["loading"]+"</div>"; 71$C.globalErrorHandler=function(_206,_207){ 72if($L.isAvailable){ 73$L.error(_206,_207); 74} 75if($C.userGlobalErrorHandler){ 76$C.userGlobalErrorHandler(_206); 77} 78if(!$L.isAvailable&&!$C.userGlobalErrorHandler){ 79alert(_206+CFMessage["globalErrorHandler.alert"]); 80} 81}; 82$C.handleError=function(_208,_209,_20a,_20b,_20c,_20d,_20e,_20f){ 83var msg=$L.format(_209,_20b); 84if(_208){ 85$L.error(msg,"http"); 86if(!_20c){ 87_20c=-1; 88} 89if(!_20d){ 90_20d=msg; 91} 92_208(_20c,_20d,_20f); 93}else{ 94if(_20e){ 95$L.error(msg,"http"); 96throw msg; 97}else{ 98$C.globalErrorHandler(msg,_20a); 99} 100} 101}; 102$C.setGlobalErrorHandler=function(_211){ 103$C.userGlobalErrorHandler=_211; 104}; 105$A.createXMLHttpRequest=function(){ 106try{ 107return new XMLHttpRequest(); 108} 109catch(e){ 110} 111var _212=["Microsoft.XMLHTTP","MSXML2.XMLHTTP.5.0","MSXML2.XMLHTTP.4.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP"]; 112for(var i=0;i<_212.length;i++){ 113try{ 114return new ActiveXObject(_212[i]); 115} 116catch(e){ 117} 118} 119return false; 120}; 121$A.isRequestError=function(req){ 122return ((req.status!=0&&req.status!=200)||req.getResponseHeader("server-error")); 123}; 124$A.sendMessage=function(url,_216,_217,_218,_219,_21a,_21b){ 125var req=$A.createXMLHttpRequest(); 126if(!_216){ 127_216="GET"; 128} 129if(_218&&_219){ 130req.onreadystatechange=function(){ 131$A.callback(req,_219,_21a); 132}; 133} 134if(_217){ 135_217+="&_cf_nodebug=true&_cf_nocache=true"; 136}else{ 137_217="_cf_nodebug=true&_cf_nocache=true"; 138} 139if(window._cf_clientid){ 140_217+="&_cf_clientid="+_cf_clientid; 141} 142if(_216=="GET"){ 143if(_217){ 144_217+="&_cf_rc="+($C.requestCounter++); 145if(url.indexOf("?")==-1){ 146url+="?"+_217; 147}else{ 148url+="&"+_217; 149} 150} 151$L.info("ajax.sendmessage.get","http",[url]); 152req.open(_216,url,_218); 153req.send(null); 154}else{ 155$L.info("ajax.sendmessage.post","http",[url,_217]); 156req.open(_216,url,_218); 157req.setRequestHeader("Content-Type","application/x-www-form-urlencoded"); 158if(_217){ 159req.send(_217); 160}else{ 161req.send(null); 162} 163} 164if(!_218){ 165while(req.readyState!=4){ 166} 167if($A.isRequestError(req)){ 168$C.handleError(null,"ajax.sendmessage.error","http",[req.status,req.statusText],req.status,req.statusText,_21b); 169}else{ 170return req; 171} 172} 173}; 174$A.callback=function(req,_21e,_21f){ 175if(req.readyState!=4){ 176return; 177} 178req.onreadystatechange=new Function; 179_21e(req,_21f); 180}; 181$A.submitForm=function(_220,url,_222,_223,_224,_225){ 182var _226=$C.getFormQueryString(_220); 183if(_226==-1){ 184$C.handleError(_223,"ajax.submitform.formnotfound","http",[_220],-1,null,true); 185return; 186} 187if(!_224){ 188_224="POST"; 189} 190_225=!(_225===false); 191var _227=function(req){ 192$A.submitForm.callback(req,_220,_222,_223); 193}; 194$L.info("ajax.submitform.submitting","http",[_220]); 195var _229=$A.sendMessage(url,_224,_226,_225,_227); 196if(!_225){ 197$L.info("ajax.submitform.success","http",[_220]); 198return _229.responseText; 199} 200}; 201$A.submitForm.callback=function(req,_22b,_22c,_22d){ 202if($A.isRequestError(req)){ 203$C.handleError(_22d,"ajax.submitform.error","http",[req.status,_22b,req.statusText],req.status,req.statusText); 204}else{ 205$L.info("ajax.submitform.success","http",[_22b]); 206if(_22c){ 207_22c(req.responseText); 208} 209} 210}; 211$C.empty=function(){ 212}; 213$C.setSubmitClicked=function(_22e,_22f){ 214var el=$D.getElement(_22f,_22e); 215el.cfinputbutton=true; 216$C.setClickedProperty=function(){ 217el.clicked=true; 218}; 219$E.addListener(el,"click",$C.setClickedProperty); 220}; 221$C.getFormQueryString=function(_231,_232){ 222var _233; 223if(typeof _231=="string"){ 224_233=(document.getElementById(_231)||document.forms[_231]); 225}else{ 226if(typeof _231=="object"){ 227_233=_231; 228} 229} 230if(!_233||null==_233.elements){ 231return -1; 232} 233var _234,elementName,elementValue,elementDisabled; 234var _235=false; 235var _236=(_232)?{}:""; 236for(var i=0;i<_233.elements.length;i++){ 237_234=_233.elements[i]; 238elementDisabled=_234.disabled; 239elementName=_234.name; 240elementValue=_234.value; 241if(_234.id&&_234.id.startsWith("cf_textarea")){ 242var _238=CKEDITOR.instances; 243if(_238){ 244for(ta in _238){ 245if(_238[ta].getData){ 246elementValue=_238[ta].getData(); 247break; 248} 249} 250} 251} 252if(!elementDisabled&&elementName){ 253switch(_234.type){ 254case "select-one": 255case "select-multiple": 256for(var j=0;j<_234.options.length;j++){ 257if(_234.options[j].selected){ 258if(window.ActiveXObject){
259_236=$C.getFormQueryString.processFormData(_236,_232,elementName,_234.options[j].attributes["value"].specified?_234.options[j].value:_234.options[j].text); 260}else{ 261_236=$C.getFormQueryString.processFormData(_236,_232,elementName,_234.options[j].hasAttribute("value")?_234.options[j].value:_234.options[j].text); 262} 263} 264} 265break; 266case "radio": 267case "checkbox": 268if(_234.checked){ 269_236=$C.getFormQueryString.processFormData(_236,_232,elementName,elementValue); 270} 271break; 272case "file": 273case undefined: 274case "reset": 275break; 276case "button": 277_236=$C.getFormQueryString.processFormData(_236,_232,elementName,elementValue); 278break; 279case "submit": 280if(_234.cfinputbutton){ 281if(_235==false&&_234.clicked){ 282_236=$C.getFormQueryString.processFormData(_236,_232,elementName,elementValue); 283_235=true; 284} 285}else{ 286_236=$C.getFormQueryString.processFormData(_236,_232,elementName,elementValue); 287} 288break; 289case "textarea": 290var _23a; 291if(window.FCKeditorAPI&&(_23a=$C.objectCache[elementName])&&_23a.richtextid){ 292var _23b=FCKeditorAPI.GetInstance(_23a.richtextid); 293if(_23b){ 294elementValue=_23b.GetXHTML(); 295} 296} 297_236=$C.getFormQueryString.processFormData(_236,_232,elementName,elementValue); 298break; 299default: 300_236=$C.getFormQueryString.processFormData(_236,_232,elementName,elementValue); 301break; 302} 303} 304} 305if(!_232){ 306_236=_236.substr(0,_236.length-1); 307} 308return _236; 309}; 310$C.getFormQueryString.processFormData=function(_23c,_23d,_23e,_23f){ 311if(_23d){ 312if(_23c[_23e]){ 313_23c[_23e]+=","+_23f; 314}else{ 315_23c[_23e]=_23f; 316} 317}else{ 318_23c+=encodeURIComponent(_23e)+"="+encodeURIComponent(_23f)+"&"; 319} 320return _23c; 321}; 322$A.importTag=function(_240){ 323$C.importedTags.push(_240); 324}; 325$A.checkImportedTag=function(_241){ 326var _242=false; 327for(var i=0;i<$C.importedTags.length;i++){ 328if($C.importedTags[i]==_241){ 329_242=true; 330break; 331} 332} 333if(!_242){ 334$C.handleError(null,"ajax.checkimportedtag.error","widget",[_241]); 335} 336}; 337$C.getElementValue=function(_244,_245,_246){ 338if(!_244){ 339$C.handleError(null,"getelementvalue.noelementname","bind",null,null,null,true); 340return; 341} 342if(!_246){ 343_246="value"; 344} 345var _247=$B.getBindElementValue(_244,_245,_246); 346if(typeof (_247)=="undefined"){ 347_247=null; 348} 349if(_247==null){ 350$C.handleError(null,"getelementvalue.elnotfound","bind",[_244,_246],null,null,true); 351return; 352} 353return _247; 354}; 355$B.getBindElementValue=function(_248,_249,_24a,_24b,_24c){ 356var _24d=""; 357if(window[_248]){ 358var _24e=eval(_248); 359if(_24e&&_24e._cf_getAttribute){ 360_24d=_24e._cf_getAttribute(_24a); 361return _24d; 362} 363} 364var _24f=$C.objectCache[_248]; 365if(_24f&&_24f._cf_getAttribute){ 366_24d=_24f._cf_getAttribute(_24a); 367return _24d; 368} 369var el=$D.getElement(_248,_249); 370var _251=(el&&((!el.length&&el.length!=0)||(el.length&&el.length>0)||el.tagName=="SELECT")); 371if(!_251&&!_24c){ 372$C.handleError(null,"bind.getbindelementvalue.elnotfound","bind",[_248]); 373return null; 374} 375if(el.tagName!="SELECT"){ 376if(el.length>1){ 377var _252=true; 378for(var i=0;i<el.length;i++){ 379var _254=(el[i].getAttribute("type")=="radio"||el[i].getAttribute("type")=="checkbox"); 380if(!_254||(_254&&el[i].checked)){ 381if(!_252){ 382_24d+=","; 383} 384_24d+=$B.getBindElementValue.extract(el[i],_24a); 385_252=false; 386} 387} 388}else{ 389_24d=$B.getBindElementValue.extract(el,_24a); 390} 391}else{ 392var _252=true; 393for(var i=0;i<el.options.length;i++){ 394if(el.options[i].selected){ 395if(!_252){ 396_24d+=","; 397} 398_24d+=$B.getBindElementValue.extract(el.options[i],_24a); 399_252=false; 400} 401} 402} 403if(typeof (_24d)=="object"){ 404$C.handleError(null,"bind.getbindelementvalue.simplevalrequired","bind",[_248,_24a]); 405return null; 406} 407if(_24b&&$C.required[_248]&&_24d.length==0){ 408return null; 409} 410return _24d; 411}; 412$B.getBindElementValue.extract=function(el,_256){ 413var _257=el[_256]; 414if((_257==null||typeof (_257)=="undefined")&&el.getAttribute){ 415_257=el.getAttribute(_256); 416} 417return _257; 418}; 419$L.init=function(){ 420if(window.YAHOO&&YAHOO.widget&&YAHOO.widget.Logger){ 421YAHOO.widget.Logger.categories=[CFMessage["debug"],CFMessage["info"],CFMessage["error"],CFMessage["window"]]; 422YAHOO.widget.LogReader.prototype.formatMsg=function(_258){ 423var _259=_258.category; 424return "<p>"+"<span class='"+_259+"'>"+_259+"</span>:<i>"+_258.source+"</i>: "+_258.msg+"</p>"; 425}; 426var _25a=new YAHOO.widget.LogReader(null,{width:"30em",fontSize:"100%"}); 427_25a.setTitle(CFMessage["log.title"]||"ColdFusion AJAX Logger"); 428_25a._btnCollapse.value=CFMessage["log.collapse"]||"Collapse"; 429_25a._btnPause.value=CFMessage["log.pause"]||"Pause"; 430_25a._btnClear.value=CFMessage["log.clear"]||"Clear"; 431$L.isAvailable=true; 432} 433}; 434$L.log=function(_25b,_25c,_25d,_25e){ 435if(!$L.isAvailable){ 436return; 437} 438if(!_25d){ 439_25d="global"; 440} 441_25d=CFMessage[_25d]||_25d; 442_25c=CFMessage[_25c]||_25c; 443_25b=$L.format(_25b,_25e); 444YAHOO.log(_25b,_25c,_25d); 445}; 446$L.format=function(code,_260){ 447var msg=CFMessage[code]||code; 448if(_260){ 449for(i=0;i<_260.length;i++){ 450if(!_260[i].length){ 451_260[i]=""; 452} 453var _262="{"+i+"}"; 454msg=msg.replace(_262,_260[i]); 455} 456} 457return msg; 458}; 459$L.debug=function(_263,_264,_265){ 460$L.log(_263,"debug",_264,_265); 461}; 462$L.info=function(_266,_267,_268){ 463$L.log(_266,"info",_267,_268); 464}; 465$L.error=function(_269,_26a,_26b){ 466$L.log(_269,"error",_26a,_26b); 467}; 468$L.dump=function(_26c,_26d){ 469if($L.isAvailable){ 470var dump=(/string|number|undefined|boolean/.test(typeof (_26c))||_26c==null)?_26c:recurse(_26c,typeof _26c,true); 471$L.debug(dump,_26d); 472} 473}; 474$X.invoke=function(_26f,_270,_271,_272,_273){ 475return $X.invokeInternal(_26f,_270,_271,_272,_273,false,null,null); 476};
477$X.invokeInternal=function(_274,_275,_276,_277,_278,_279,_27a,_27b){ 478var _27c="method="+_275+"&_cf_ajaxproxytoken="+_276; 479if(_279){ 480_27c+="&_cfclient="+"true"; 481var _27d=$X.JSON.encodeInternal(_274._variables,_279); 482_27c+="&_variables="+encodeURIComponent(_27d); 483var _27e=$X.JSON.encodeInternal(_274._metadata,_279); 484_27c+="&_metadata="+encodeURIComponent(_27e); 485} 486var _27f=_274.returnFormat||"json"; 487_27c+="&returnFormat="+_27f; 488if(_274.queryFormat){ 489_27c+="&queryFormat="+_274.queryFormat; 490} 491if(_274.formId){ 492var _280=$C.getFormQueryString(_274.formId,true); 493if(_277!=null){ 494for(prop in _280){ 495_277[prop]=_280[prop]; 496} 497}else{ 498_277=_280; 499} 500_274.formId=null; 501} 502var _281=""; 503if(_277!=null){ 504_281=$X.JSON.encodeInternal(_277,_279); 505_27c+="&argumentCollection="+encodeURIComponent(_281); 506} 507$L.info("ajaxproxy.invoke.invoking","http",[_274.cfcPath,_275,_281]); 508if(_274.callHandler){ 509_274.callHandler.call(null,_274.callHandlerParams,_274.cfcPath,_27c); 510return; 511} 512var _282; 513var _283=_274.async; 514if(_27a!=null){ 515_283=true; 516_282=function(req){ 517$X.callbackOp(req,_274,_278,_27a,_27b); 518}; 519}else{ 520if(_274.async){ 521_282=function(req){ 522$X.callback(req,_274,_278); 523}; 524} 525} 526var req=$A.sendMessage(_274.cfcPath,_274.httpMethod,_27c,_283,_282,null,true); 527if(!_283){ 528return $X.processResponse(req,_274); 529} 530}; 531$X.callback=function(req,_288,_289){ 532if($A.isRequestError(req)){ 533$C.handleError(_288.errorHandler,"ajaxproxy.invoke.error","http",[req.status,_288.cfcPath,req.statusText],req.status,req.statusText,false,_289); 534}else{ 535if(_288.callbackHandler){ 536var _28a=$X.processResponse(req,_288); 537_288.callbackHandler(_28a,_289); 538} 539} 540}; 541$X.callbackOp=function(req,_28c,_28d,_28e,_28f){ 542if($A.isRequestError(req)){ 543var _290=_28c.errorHandler; 544if(_28f!=null){ 545_290=_28f; 546} 547$C.handleError(_290,"ajaxproxy.invoke.error","http",[req.status,_28c.cfcPath,req.statusText],req.status,req.statusText,false,_28d); 548}else{ 549if(_28e){ 550var _291=$X.processResponse(req,_28c); 551_28e(_291,_28d); 552} 553} 554}; 555$X.processResponse=function(req,_293){ 556var _294=true; 557for(var i=0;i<req.responseText.length;i++){ 558var c=req.responseText.charAt(i); 559_294=(c==" "||c=="\n"||c=="\t"||c=="\r"); 560if(!_294){ 561break; 562} 563} 564var _297=(req.responseXML&&req.responseXML.childNodes.length>0); 565var _298=_297?"[XML Document]":req.responseText; 566$L.info("ajaxproxy.invoke.response","http",[_298]); 567var _299; 568var _29a=_293.returnFormat||"json"; 569if(_29a=="json"){ 570try{ 571_299=_294?null:$X.JSON.decode(req.responseText); 572} 573catch(e){ 574if(typeof _293._metadata!=="undefined"&&_293._metadata.servercfc&&typeof req.responseText==="string"){ 575_299=req.responseText; 576}else{ 577throw e; 578} 579} 580}else{ 581_299=_297?req.responseXML:(_294?null:req.responseText); 582} 583return _299; 584}; 585$X.init=function(_29b,_29c,_29d){ 586if(typeof _29d==="undefined"){ 587_29d=false; 588} 589var _29e=_29c; 590if(!_29d){ 591var _29f=_29c.split("."); 592var ns=self; 593for(i=0;i<_29f.length-1;i++){ 594if(_29f[i].length){ 595ns[_29f[i]]=ns[_29f[i]]||{}; 596ns=ns[_29f[i]]; 597} 598} 599var _2a1=_29f[_29f.length-1]; 600if(ns[_2a1]){ 601return ns[_2a1]; 602} 603ns[_2a1]=function(){ 604this.httpMethod="GET"; 605this.async=false; 606this.callbackHandler=null; 607this.errorHandler=null; 608this.formId=null; 609}; 610_29e=ns[_2a1].prototype; 611}else{ 612_29e.httpMethod="GET"; 613_29e.async=false; 614_29e.callbackHandler=null; 615_29e.errorHandler=null; 616_29e.formId=null; 617} 618_29e.cfcPath=_29b; 619_29e.setHTTPMethod=function(_2a2){ 620if(_2a2){ 621_2a2=_2a2.toUpperCase(); 622} 623if(_2a2!="GET"&&_2a2!="POST"){ 624$C.handleError(null,"ajaxproxy.sethttpmethod.invalidmethod","http",[_2a2],null,null,true); 625} 626this.httpMethod=_2a2; 627}; 628_29e.setSyncMode=function(){ 629this.async=false; 630}; 631_29e.setAsyncMode=function(){ 632this.async=true; 633}; 634_29e.setCallbackHandler=function(fn){ 635this.callbackHandler=fn; 636this.setAsyncMode(); 637}; 638_29e.setErrorHandler=function(fn){ 639this.errorHandler=fn; 640this.setAsyncMode(); 641}; 642_29e.setForm=function(fn){ 643this.formId=fn; 644}; 645_29e.setQueryFormat=function(_2a6){ 646if(_2a6){ 647_2a6=_2a6.toLowerCase(); 648} 649if(!_2a6||(_2a6!="column"&&_2a6!="row"&&_2a6!="struct")){ 650$C.handleError(null,"ajaxproxy.setqueryformat.invalidformat","http",[_2a6],null,null,true); 651} 652this.queryFormat=_2a6; 653}; 654_29e.setReturnFormat=function(_2a7){ 655if(_2a7){ 656_2a7=_2a7.toLowerCase(); 657} 658if(!_2a7||(_2a7!="plain"&&_2a7!="json"&&_2a7!="wddx")){
659$C.handleError(null,"ajaxproxy.setreturnformat.invalidformat","http",[_2a7],null,null,true); 660} 661this.returnFormat=_2a7; 662}; 663$L.info("ajaxproxy.init.created","http",[_29b]); 664if(_29d){ 665return _29e; 666}else{ 667return ns[_2a1]; 668} 669}; 670$U.isWhitespace=function(s){ 671var _2a9=true; 672for(var i=0;i<s.length;i++){ 673var c=s.charAt(i); 674_2a9=(c==" "||c=="\n"||c=="\t"||c=="\r"); 675if(!_2a9){ 676break; 677} 678} 679return _2a9; 680}; 681$U.getFirstNonWhitespaceIndex=function(s){ 682var _2ad=true; 683for(var i=0;i<s.length;i++){ 684var c=s.charAt(i); 685_2ad=(c==" "||c=="\n"||c=="\t"||c=="\r"); 686if(!_2ad){ 687break; 688} 689} 690return i; 691}; 692$C.trim=function(_2b0){ 693return _2b0.replace(/^\s+|\s+$/g,""); 694}; 695$U.isInteger=function(n){ 696var _2b2=true; 697if(typeof (n)=="number"){ 698_2b2=(n>=0); 699}else{ 700for(i=0;i<n.length;i++){ 701if($U.isInteger.numberChars.indexOf(n.charAt(i))==-1){ 702_2b2=false; 703break; 704} 705} 706} 707return _2b2; 708}; 709$U.isInteger.numberChars="0123456789"; 710$U.isArray=function(a){ 711return (typeof (a.length)=="number"&&!a.toUpperCase); 712}; 713$U.isBoolean=function(b){ 714if(b===true||b===false){ 715return true; 716}else{ 717if(b.toLowerCase){ 718b=b.toLowerCase(); 719return (b==$U.isBoolean.trueChars||b==$U.isBoolean.falseChars); 720}else{ 721return false; 722} 723} 724}; 725$U.isBoolean.trueChars="true"; 726$U.isBoolean.falseChars="false"; 727$U.castBoolean=function(b){ 728if(b===true){ 729return true; 730}else{ 731if(b===false){ 732return false; 733}else{ 734if(b.toLowerCase){ 735b=b.toLowerCase(); 736if(b==$U.isBoolean.trueChars){ 737return true; 738}else{ 739if(b==$U.isBoolean.falseChars){ 740return false; 741}else{ 742return false; 743} 744} 745}else{ 746return false; 747} 748} 749} 750}; 751$U.checkQuery=function(o){ 752var _2b7=null; 753if(o&&o.COLUMNS&&$U.isArray(o.COLUMNS)&&o.DATA&&$U.isArray(o.DATA)&&(o.DATA.length==0||(o.DATA.length>0&&$U.isArray(o.DATA[0])))){ 754_2b7="row"; 755}else{ 756if(o&&o.COLUMNS&&$U.isArray(o.COLUMNS)&&o.ROWCOUNT&&$U.isInteger(o.ROWCOUNT)&&o.DATA){ 757_2b7="col"; 758for(var i=0;i<o.COLUMNS.length;i++){ 759var _2b9=o.DATA[o.COLUMNS[i]]; 760if(!_2b9||!$U.isArray(_2b9)){ 761_2b7=null; 762break; 763} 764} 765} 766} 767return _2b7; 768}; 769$X.JSON=new function(){ 770var _2ba={}.hasOwnProperty?true:false; 771var _2bb=/^("(\\.|[^"\\\n\r])*?"|[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t])+?$/; 772var pad=function(n){ 773return n<10?"0"+n:n; 774}; 775var m={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","\"":"\\\"","\\":"\\\\"}; 776var _2bf=function(s){ 777if(/["\\\x00-\x1f]/.test(s)){ 778return "\""+s.replace(/([\x00-\x1f\\"])/g,function(a,b){ 779var c=m[b]; 780if(c){ 781return c; 782} 783c=b.charCodeAt(); 784return "\\u00"+Math.floor(c/16).toString(16)+(c%16).toString(16); 785})+"\""; 786} 787return "\""+s+"\""; 788}; 789var _2c4=function(o){ 790var a=["["],b,i,l=o.length,v; 791for(i=0;i<l;i+=1){ 792v=o[i]; 793switch(typeof v){ 794case "undefined": 795case "function": 796case "unknown": 797break; 798default: 799if(b){ 800a.push(","); 801} 802a.push(v===null?"null":$X.JSON.encode(v)); 803b=true; 804} 805} 806a.push("]"); 807return a.join(""); 808}; 809var _2c7=function(o){ 810return "\""+o.getFullYear()+"-"+pad(o.getMonth()+1)+"-"+pad(o.getDate())+"T"+pad(o.getHours())+":"+pad(o.getMinutes())+":"+pad(o.getSeconds())+"\""; 811}; 812this.encode=function(o){ 813return this.encodeInternal(o,false); 814}; 815this.encodeInternal=function(o,cfc){ 816if(typeof o=="undefined"||o===null){ 817return "null"; 818}else{ 819if(o instanceof Array){ 820return _2c4(o); 821}else{ 822if(o instanceof Date){ 823if(cfc){ 824return this.encodeInternal({_date_:o.getTime()},cfc); 825} 826return _2c7(o); 827}else{ 828if(typeof o=="string"){ 829return _2bf(o); 830}else{ 831if(typeof o=="number"){ 832return isFinite(o)?String(o):"null"; 833}else{ 834if(typeof o=="boolean"){ 835return String(o); 836}else{ 837if(cfc&&typeof o=="object"&&typeof o._metadata!=="undefined"){ 838return "{\"_metadata\":"+this.encodeInternal(o._metadata,false)+",\"_variables\":"+this.encodeInternal(o._variables,cfc)+"}"; 839}else{ 840var a=["{"],b,i,v; 841for(var i in o){ 842if(!_2ba||o.hasOwnProperty(i)){ 843v=o[i]; 844switch(typeof v){ 845case "undefined": 846case "function": 847case "unknown": 848break; 849default: 850if(b){ 851a.push(","); 852} 853a.push(this.encodeInternal(i,cfc),":",v===null?"null":this.encodeInternal(v,cfc)); 854b=true; 855} 856} 857} 858a.push("}"); 859return a.join(""); 860} 861} 862} 863} 864} 865} 866} 867}; 868this.decode=function(json){ 869if(typeof json=="object"){ 870return json; 871} 872if($U.isWhitespace(json)){ 873return null; 874} 875var _2cf=$U.getFirstNonWhitespaceIndex(json); 876if(_2cf>0){ 877json=json.slice(_2cf); 878} 879if(window._cf_jsonprefix&&json.indexOf(_cf_jsonprefix)==0){ 880json=json.slice(_cf_jsonprefix.length); 881} 882try{ 883if(_2bb.test(json)){ 884return JSON.parse(json); 885} 886} 887catch(e){ 888} 889throw new SyntaxError("parseJSON"); 890}; 891}(); 892if(!$C.JSON){ 893$C.JSON={}; 894} 895$C.JSON.encode=$X.JSON.encode; 896$C.JSON.encodeInternal=$X.JSON.encodeInternal;
897$C.JSON.decode=$X.JSON.decode; 898$C.navigate=function(url,_2d1,_2d2,_2d3,_2d4,_2d5){ 899if(url==null){ 900$C.handleError(_2d3,"navigate.urlrequired","widget"); 901return; 902} 903if(_2d4){ 904_2d4=_2d4.toUpperCase(); 905if(_2d4!="GET"&&_2d4!="POST"){ 906$C.handleError(null,"navigate.invalidhttpmethod","http",[_2d4],null,null,true); 907} 908}else{ 909_2d4="GET"; 910} 911var _2d6; 912if(_2d5){ 913_2d6=$C.getFormQueryString(_2d5); 914if(_2d6==-1){ 915$C.handleError(null,"navigate.formnotfound","http",[_2d5],null,null,true); 916} 917} 918if(_2d1==null){ 919if(_2d6){ 920if(url.indexOf("?")==-1){ 921url+="?"+_2d6; 922}else{ 923url+="&"+_2d6; 924} 925} 926$L.info("navigate.towindow","widget",[url]); 927window.location.replace(url); 928return; 929} 930$L.info("navigate.tocontainer","widget",[url,_2d1]); 931var obj=$C.objectCache[_2d1]; 932if(obj!=null){ 933if(typeof (obj._cf_body)!="undefined"&&obj._cf_body!=null){ 934_2d1=obj._cf_body; 935} 936} 937$A.replaceHTML(_2d1,url,_2d4,_2d6,_2d2,_2d3); 938}; 939$A.checkForm=function(_2d8,_2d9,_2da,_2db,_2dc){ 940var _2dd=_2d9.call(null,_2d8); 941if(_2dd==false){ 942return false; 943} 944var _2de=$C.getFormQueryString(_2d8); 945$L.info("ajax.submitform.submitting","http",[_2d8.name]); 946$A.replaceHTML(_2da,_2d8.action,_2d8.method,_2de,_2db,_2dc); 947return false; 948}; 949$A.replaceHTML=function(_2df,url,_2e1,_2e2,_2e3,_2e4){ 950var _2e5=document.getElementById(_2df); 951if(!_2e5){ 952$C.handleError(_2e4,"ajax.replacehtml.elnotfound","http",[_2df]); 953return; 954} 955var _2e6="_cf_containerId="+encodeURIComponent(_2df); 956_2e2=(_2e2)?_2e2+"&"+_2e6:_2e6; 957$L.info("ajax.replacehtml.replacing","http",[_2df,url,_2e2]); 958if(_cf_loadingtexthtml){ 959try{ 960_2e5.innerHTML=_cf_loadingtexthtml; 961} 962catch(e){ 963} 964} 965var _2e7=function(req,_2e9){ 966var _2ea=false; 967if($A.isRequestError(req)){ 968$C.handleError(_2e4,"ajax.replacehtml.error","http",[req.status,_2e9.id,req.statusText],req.status,req.statusText); 969_2ea=true; 970} 971var _2eb=new $E.CustomEvent("onReplaceHTML",_2e9); 972var _2ec=new $E.CustomEvent("onReplaceHTMLUser",_2e9); 973$E.loadEvents[_2e9.id]={system:_2eb,user:_2ec}; 974if(req.responseText.search(/<script/i)!=-1){ 975try{ 976_2e9.innerHTML=""; 977} 978catch(e){ 979} 980$A.replaceHTML.processResponseText(req.responseText,_2e9,_2e4); 981}else{ 982try{ 983_2e9.innerHTML=req.responseText; 984$A.updateLayouttab(_2e9); 985if(_2e2.indexOf("window-id")>-1){ 986var q=_2e2.substring(_2e2.indexOf("window-id")+10,_2e2.indexOf("&")); 987var cmp=Ext.getCmp(q); 988if(cmp){ 989cmp.update(_2e9.innerHTML); 990} 991} 992} 993catch(e){ 994} 995} 996$E.loadEvents[_2e9.id]=null; 997_2eb.fire(); 998_2eb.unsubscribe(); 999_2ec.fire(); 1000_2ec.unsubscribe(); 1001$L.info("ajax.replacehtml.success","http",[_2e9.id]); 1002if(_2e3&&!_2ea){ 1003_2e3(); 1004} 1005}; 1006try{ 1007$A.sendMessage(url,_2e1,_2e2,true,_2e7,_2e5); 1008} 1009catch(e){ 1010try{ 1011_2e5.innerHTML=$L.format(CFMessage["ajax.replacehtml.connectionerrordisplay"],[url,e]); 1012} 1013catch(e){ 1014} 1015$C.handleError(_2e4,"ajax.replacehtml.connectionerror","http",[_2df,url,e]); 1016} 1017}; 1018$A.replaceHTML.processResponseText=function(text,_2f0,_2f1){ 1019var pos=0; 1020var _2f3=0; 1021var _2f4=0; 1022_2f0._cf_innerHTML=""; 1023while(pos<text.length){ 1024var _2f5=text.indexOf("<s",pos); 1025if(_2f5==-1){ 1026_2f5=text.indexOf("<S",pos); 1027} 1028if(_2f5==-1){ 1029break; 1030} 1031pos=_2f5; 1032var _2f6=true; 1033var _2f7=$A.replaceHTML.processResponseText.scriptTagChars; 1034for(var i=1;i<_2f7.length;i++){ 1035var _2f9=pos+i+1; 1036if(_2f9>text.length){ 1037break; 1038} 1039var _2fa=text.charAt(_2f9); 1040if(_2f7[i][0]!=_2fa&&_2f7[i][1]!=_2fa){ 1041pos+=i+1; 1042_2f6=false; 1043break; 1044} 1045} 1046if(!_2f6){ 1047continue; 1048} 1049var _2fb=text.substring(_2f3,pos); 1050if(_2fb){ 1051_2f0._cf_innerHTML+=_2fb; 1052} 1053var _2fc=text.indexOf(">",pos)+1; 1054if(_2fc==0){ 1055pos++; 1056continue; 1057}else{ 1058pos+=7; 1059} 1060var _2fd=_2fc; 1061while(_2fd<text.length&&_2fd!=-1){ 1062_2fd=text.indexOf("</s",_2fd); 1063if(_2fd==-1){ 1064_2fd=text.indexOf("</S",_2fd); 1065} 1066if(_2fd!=-1){ 1067_2f6=true; 1068for(var i=1;i<_2f7.length;i++){ 1069var _2f9=_2fd+2+i; 1070if(_2f9>text.length){ 1071break; 1072} 1073var _2fa=text.charAt(_2f9); 1074if(_2f7[i][0]!=_2fa&&_2f7[i][1]!=_2fa){ 1075_2fd=_2f9; 1076_2f6=false; 1077break; 1078} 1079} 1080if(_2f6){ 1081break; 1082} 1083} 1084} 1085if(_2fd!=-1){ 1086var _2fe=text.substring(_2fc,_2fd); 1087var _2ff=_2fe.indexOf("<!--"); 1088if(_2ff!=-1){ 1089_2fe=_2fe.substring(_2ff+4); 1090} 1091var _300=_2fe.lastIndexOf("//-->"); 1092if(_300!=-1){ 1093_2fe=_2fe.substring(0,_300-1); 1094} 1095if(_2fe.indexOf("document.write")!=-1||_2fe.indexOf("CF_RunContent")!=-1){ 1096if(_2fe.indexOf("CF_RunContent")!=-1){ 1097_2fe=_2fe.replace("CF_RunContent","document.write"); 1098} 1099_2fe="var _cfDomNode = document.getElementById('"+_2f0.id+"'); var _cfBuffer='';"+"if (!document._cf_write)"+"{document._cf_write = document.write;"+"document.write = function(str){if (_cfBuffer!=null){_cfBuffer+=str;}else{document._cf_write(str);}};};"+_2fe+";_cfDomNode._cf_innerHTML += _cfBuffer; _cfBuffer=null;"; 1100} 1101try{ 1102eval(_2fe); 1103} 1104catch(ex){ 1105$C.handleError(_2f1,"ajax.replacehtml.jserror","http",[_2f0.id,ex]); 1106} 1107} 1108_2f5=text.indexOf(">",_2fd)+1; 1109if(_2f5==0){ 1110_2f4=_2fd+1; 1111break; 1112} 1113_2f4=_2f5; 1114pos=_2f5; 1115_2f3=_2f5; 1116} 1117if(_2f4<text.length-1){ 1118var _2fb=text.substring(_2f4,text.length); 1119if(_2fb){ 1120_2f0._cf_innerHTML+=_2fb; 1121} 1122} 1123try{ 1124_2f0.innerHTML=_2f0._cf_innerHTML; 1125$A.updateLayouttab(_2f0); 1126} 1127catch(e){ 1128} 1129_2f0._cf_innerHTML=""; 1130}; 1131$A.updateLayouttab=function(_301){ 1132var _302=_301.id; 1133var s=_302.substr(13,_302.length); 1134var cmp=Ext.getCmp(s); 1135var _305=_301.innerHTML; 1136var _306=document.getElementById(_302); 1137var html=_306.innerHTML; 1138if(cmp){
1139cmp.update("<div id="+_301.id+">"+html+"</div>"); 1140} 1141var _306=document.getElementById(_302); 1142if(_306){ 1143} 1144}; 1145$A.replaceHTML.processResponseText.scriptTagChars=[["s","S"],["c","C"],["r","R"],["i","I"],["p","P"],["t","T"]]; 1146$D.getElement=function(_308,_309){ 1147var _30a=function(_30b){ 1148return (_30b.name==_308||_30b.id==_308); 1149}; 1150var _30c=$D.getElementsBy(_30a,null,_309); 1151if(_30c.length==1){ 1152return _30c[0]; 1153}else{ 1154return _30c; 1155} 1156}; 1157$D.getElementsBy=function(_30d,tag,root){ 1158tag=tag||"*"; 1159var _310=[]; 1160if(root){ 1161root=$D.get(root); 1162if(!root){ 1163return _310; 1164} 1165}else{ 1166root=document; 1167} 1168var _311=root.getElementsByTagName(tag); 1169if(!_311.length&&(tag=="*"&&root.all)){ 1170_311=root.all; 1171} 1172for(var i=0,len=_311.length;i<len;++i){ 1173if(_30d(_311[i])){ 1174_310[_310.length]=_311[i]; 1175} 1176} 1177return _310; 1178}; 1179$D.get=function(el){ 1180if(!el){ 1181return null; 1182} 1183if(typeof el!="string"&&!(el instanceof Array)){ 1184return el; 1185} 1186if(typeof el=="string"){ 1187return document.getElementById(el); 1188}else{ 1189var _314=[]; 1190for(var i=0,len=el.length;i<len;++i){ 1191_314[_314.length]=$D.get(el[i]); 1192} 1193return _314; 1194} 1195return null; 1196}; 1197$E.loadEvents={}; 1198$E.CustomEvent=function(_316,_317){ 1199return {name:_316,domNode:_317,subs:[],subscribe:function(func,_319){ 1200var dup=false; 1201for(var i=0;i<this.subs.length;i++){ 1202var sub=this.subs[i]; 1203if(sub.f==func&&sub.p==_319){ 1204dup=true; 1205break; 1206} 1207} 1208if(!dup){ 1209this.subs.push({f:func,p:_319}); 1210} 1211},fire:function(){ 1212for(var i=0;i<this.subs.length;i++){ 1213var sub=this.subs[i]; 1214sub.f.call(null,this,sub.p); 1215} 1216},unsubscribe:function(){ 1217this.subscribers=[]; 1218}}; 1219}; 1220$E.windowLoadImpEvent=new $E.CustomEvent("cfWindowLoadImp"); 1221$E.windowLoadEvent=new $E.CustomEvent("cfWindowLoad"); 1222$E.windowLoadUserEvent=new $E.CustomEvent("cfWindowLoadUser"); 1223$E.listeners=[]; 1224$E.addListener=function(el,ev,fn,_322){ 1225var l={el:el,ev:ev,fn:fn,params:_322}; 1226$E.listeners.push(l); 1227var _324=function(e){ 1228if(!e){ 1229var e=window.event; 1230} 1231fn.call(null,e,_322); 1232}; 1233if(el.addEventListener){ 1234window.addEventListener("load",function(){ 1235el.addEventListener(ev,_324,false); 1236}); 1237el.addEventListener(ev,_324,false); 1238return true; 1239}else{ 1240if(el.attachEvent){ 1241el.attachEvent("on"+ev,_324); 1242return true; 1243}else{ 1244return false; 1245} 1246} 1247}; 1248$E.isListener=function(el,ev,fn,_329){ 1249var _32a=false; 1250var ls=$E.listeners; 1251for(var i=0;i<ls.length;i++){ 1252if(ls[i].el==el&&ls[i].ev==ev&&ls[i].fn==fn&&ls[i].params==_329){ 1253_32a=true; 1254break; 1255} 1256} 1257return _32a; 1258}; 1259$E.callBindHandlers=function(id,_32e,ev){ 1260var el=document.getElementById(id); 1261if(!el){ 1262return; 1263} 1264var ls=$E.listeners; 1265for(var i=0;i<ls.length;i++){ 1266if(ls[i].el==el&&ls[i].ev==ev&&ls[i].fn._cf_bindhandler){ 1267ls[i].fn.call(null,null,ls[i].params); 1268} 1269} 1270}; 1271$E.registerOnLoad=function(func,_334,_335,user){ 1272if($E.registerOnLoad.windowLoaded){ 1273if(_334&&_334._cf_containerId&&$E.loadEvents[_334._cf_containerId]){ 1274if(user){ 1275$E.loadEvents[_334._cf_containerId].user.subscribe(func,_334); 1276}else{ 1277$E.loadEvents[_334._cf_containerId].system.subscribe(func,_334); 1278} 1279}else{ 1280func.call(null,null,_334); 1281} 1282}else{ 1283if(user){ 1284$E.windowLoadUserEvent.subscribe(func,_334); 1285}else{ 1286if(_335){ 1287$E.windowLoadImpEvent.subscribe(func,_334); 1288}else{ 1289$E.windowLoadEvent.subscribe(func,_334); 1290} 1291} 1292} 1293}; 1294$E.registerOnLoad.windowLoaded=false; 1295$E.onWindowLoad=function(fn){ 1296if(window.addEventListener){ 1297window.addEventListener("load",fn,false); 1298}else{ 1299if(window.attachEvent){ 1300window.attachEvent("onload",fn); 1301}else{ 1302if(document.getElementById){ 1303window.onload=fn; 1304} 1305} 1306} 1307}; 1308$C.addSpanToDom=function(){ 1309var _338=document.createElement("span"); 1310document.body.insertBefore(_338,document.body.firstChild); 1311}; 1312$E.windowLoadHandler=function(e){ 1313if(window.Ext){ 1314Ext.BLANK_IMAGE_URL=_cf_ajaxscriptsrc+"/resources/ext/images/default/s.gif"; 1315} 1316$C.addSpanToDom(); 1317$L.init(); 1318$E.registerOnLoad.windowLoaded=true; 1319$E.windowLoadImpEvent.fire(); 1320$E.windowLoadImpEvent.unsubscribe(); 1321$E.windowLoadEvent.fire(); 1322$E.windowLoadEvent.unsubscribe(); 1323if(window.Ext){ 1324Ext.onReady(function(){ 1325$E.windowLoadUserEvent.fire(); 1326}); 1327}else{ 1328$E.windowLoadUserEvent.fire(); 1329} 1330$E.windowLoadUserEvent.unsubscribe(); 1331}; 1332$E.onWindowLoad($E.windowLoadHandler); 1333$B.register=function(_33a,_33b,_33c,_33d){ 1334for(var i=0;i<_33a.length;i++){ 1335var _33f=_33a[i][0]; 1336var _340=_33a[i][1]; 1337var _341=_33a[i][2]; 1338if(window[_33f]){ 1339var _342=eval(_33f); 1340if(_342&&_342._cf_register){ 1341_342._cf_register(_341,_33c,_33b); 1342continue; 1343} 1344} 1345var _343=$C.objectCache[_33f]; 1346if(_343&&_343._cf_register){ 1347_343._cf_register(_341,_33c,_33b); 1348continue; 1349} 1350var _344=$D.getElement(_33f,_340); 1351var _345=(_344&&((!_344.length&&_344.length!=0)||(_344.length&&_344.length>0)||_344.tagName=="SELECT")); 1352if(!_345){ 1353$C.handleError(null,"bind.register.elnotfound","bind",[_33f]); 1354} 1355if(_344.length>1&&!_344.options){ 1356for(var j=0;j<_344.length;j++){ 1357$B.register.addListener(_344[j],_341,_33c,_33b); 1358} 1359}else{ 1360$B.register.addListener(_344,_341,_33c,_33b); 1361} 1362} 1363if(!$C.bindHandlerCache[_33b.bindTo]&&typeof (_33b.bindTo)=="string"){ 1364$C.bindHandlerCache[_33b.bindTo]=function(){ 1365_33c.call(null,null,_33b); 1366}; 1367} 1368if(_33d){ 1369_33c.call(null,null,_33b); 1370} 1371}; 1372$B.register.addListener=function(_347,_348,_349,_34a){ 1373if(!$E.isListener(_347,_348,_349,_34a)){ 1374$E.addListener(_347,_348,_349,_34a); 1375} 1376}; 1377$B.assignValue=function(_34b,_34c,_34d,_34e){ 1378if(!_34b){ 1379return; 1380} 1381if(_34b.call){ 1382_34b.call(null,_34d,_34e); 1383return; 1384} 1385var _34f=$C.objectCache[_34b]; 1386if(_34f&&_34f._cf_setValue){ 1387_34f._cf_setValue(_34d); 1388return; 1389} 1390var _350=document.getElementById(_34b); 1391if(!_350){ 1392$C.handleError(null,"bind.assignvalue.elnotfound","bind",[_34b]); 1393} 1394if(_350.tagName=="SELECT"){ 1395var _351=$U.checkQuery(_34d); 1396var _352=$C.objectCache[_34b]; 1397if(_351){ 1398if(!_352||(_352&&(!_352.valueCol||!_352.displayCol))){ 1399$C.handleError(null,"bind.assignvalue.selboxmissingvaldisplay","bind",[_34b]); 1400return; 1401} 1402}else{ 1403if(typeof (_34d.length)=="number"&&!_34d.toUpperCase){ 1404if(_34d.length>0&&(typeof (_34d[0].length)!="number"||_34d[0].toUpperCase)){ 1405$C.handleError(null,"bind.assignvalue.selboxerror","bind",[_34b]); 1406return; 1407} 1408}else{ 1409$C.handleError(null,"bind.assignvalue.selboxerror","bind",[_34b]); 1410return; 1411} 1412} 1413_350.options.length=0; 1414var _353; 1415var _354=false; 1416if(_352){
1417_353=_352.selected; 1418if(_353&&_353.length>0){ 1419_354=true; 1420} 1421} 1422if(!_351){ 1423for(var i=0;i<_34d.length;i++){ 1424var opt=new Option(_34d[i][1],_34d[i][0]); 1425_350.options[i]=opt; 1426if(_354){ 1427for(var j=0;j<_353.length;j++){ 1428if(_353[j]==opt.value){ 1429opt.selected=true; 1430} 1431} 1432} 1433} 1434}else{ 1435if(_351=="col"){ 1436var _358=_34d.DATA[_352.valueCol]; 1437var _359=_34d.DATA[_352.displayCol]; 1438if(!_358||!_359){ 1439$C.handleError(null,"bind.assignvalue.selboxinvalidvaldisplay","bind",[_34b]); 1440return; 1441} 1442for(var i=0;i<_358.length;i++){ 1443var opt=new Option(_359[i],_358[i]); 1444_350.options[i]=opt; 1445if(_354){ 1446for(var j=0;j<_353.length;j++){ 1447if(_353[j]==opt.value){ 1448opt.selected=true; 1449} 1450} 1451} 1452} 1453}else{ 1454if(_351=="row"){ 1455var _35a=-1; 1456var _35b=-1; 1457for(var i=0;i<_34d.COLUMNS.length;i++){ 1458var col=_34d.COLUMNS[i]; 1459if(col==_352.valueCol){ 1460_35a=i; 1461} 1462if(col==_352.displayCol){ 1463_35b=i; 1464} 1465if(_35a!=-1&&_35b!=-1){ 1466break; 1467} 1468} 1469if(_35a==-1||_35b==-1){ 1470$C.handleError(null,"bind.assignvalue.selboxinvalidvaldisplay","bind",[_34b]); 1471return; 1472} 1473for(var i=0;i<_34d.DATA.length;i++){ 1474var opt=new Option(_34d.DATA[i][_35b],_34d.DATA[i][_35a]); 1475_350.options[i]=opt; 1476if(_354){ 1477for(var j=0;j<_353.length;j++){ 1478if(_353[j]==opt.value){ 1479opt.selected=true; 1480} 1481} 1482} 1483} 1484} 1485} 1486} 1487}else{ 1488_350[_34c]=_34d; 1489} 1490$E.callBindHandlers(_34b,null,"change"); 1491$L.info("bind.assignvalue.success","bind",[_34d,_34b,_34c]); 1492}; 1493$B.localBindHandler=function(e,_35e){ 1494var _35f=document.getElementById(_35e.bindTo); 1495var _360=$B.evaluateBindTemplate(_35e,true); 1496$B.assignValue(_35e.bindTo,_35e.bindToAttr,_360); 1497}; 1498$B.localBindHandler._cf_bindhandler=true; 1499$B.evaluateBindTemplate=function(_361,_362,_363,_364,_365){ 1500var _366=_361.bindExpr; 1501var _367=""; 1502if(typeof _365=="undefined"){ 1503_365=false; 1504} 1505for(var i=0;i<_366.length;i++){ 1506if(typeof (_366[i])=="object"){ 1507var _369=null; 1508if(!_366[i].length||typeof _366[i][0]=="object"){ 1509_369=$X.JSON.encode(_366[i]); 1510}else{ 1511var _369=$B.getBindElementValue(_366[i][0],_366[i][1],_366[i][2],_362,_364); 1512if(_369==null){ 1513if(_362){ 1514_367=""; 1515break; 1516}else{ 1517_369=""; 1518} 1519} 1520} 1521if(_363){ 1522_369=encodeURIComponent(_369); 1523} 1524_367+=_369; 1525}else{ 1526var _36a=_366[i]; 1527if(_365==true&&i>0){ 1528if(typeof (_36a)=="string"&&_36a.indexOf("&")!=0){ 1529_36a=encodeURIComponent(_36a); 1530} 1531} 1532_367+=_36a; 1533} 1534} 1535return _367; 1536}; 1537$B.jsBindHandler=function(e,_36c){ 1538var _36d=_36c.bindExpr; 1539var _36e=new Array(); 1540var _36f=_36c.callFunction+"("; 1541for(var i=0;i<_36d.length;i++){ 1542var _371; 1543if(typeof (_36d[i])=="object"){ 1544if(_36d[i].length){ 1545if(typeof _36d[i][0]=="object"){ 1546_371=_36d[i]; 1547}else{ 1548_371=$B.getBindElementValue(_36d[i][0],_36d[i][1],_36d[i][2],false); 1549} 1550}else{ 1551_371=_36d[i]; 1552} 1553}else{ 1554_371=_36d[i]; 1555} 1556if(i!=0){ 1557_36f+=","; 1558} 1559_36e[i]=_371; 1560_36f+="'"+_371+"'"; 1561} 1562_36f+=")"; 1563var _372=_36c.callFunction.apply(null,_36e); 1564$B.assignValue(_36c.bindTo,_36c.bindToAttr,_372,_36c.bindToParams); 1565}; 1566$B.jsBindHandler._cf_bindhandler=true; 1567$B.urlBindHandler=function(e,_374){ 1568var _375=_374.bindTo; 1569if($C.objectCache[_375]&&$C.objectCache[_375]._cf_visible===false){ 1570$C.objectCache[_375]._cf_dirtyview=true; 1571return; 1572} 1573var url=$B.evaluateBindTemplate(_374,false,true,false,true); 1574var _377=$U.extractReturnFormat(url); 1575if(_377==null||typeof _377=="undefined"){ 1576_377="JSON"; 1577} 1578if(_374.bindToAttr||typeof _374.bindTo=="undefined"||typeof _374.bindTo=="function"){ 1579var _374={"bindTo":_374.bindTo,"bindToAttr":_374.bindToAttr,"bindToParams":_374.bindToParams,"errorHandler":_374.errorHandler,"url":url,returnFormat:_377}; 1580try{ 1581$A.sendMessage(url,"GET",null,true,$B.urlBindHandler.callback,_374); 1582} 1583catch(e){ 1584$C.handleError(_374.errorHandler,"ajax.urlbindhandler.connectionerror","http",[url,e]); 1585} 1586}else{ 1587$A.replaceHTML(_375,url,null,null,_374.callback,_374.errorHandler); 1588} 1589}; 1590$B.urlBindHandler._cf_bindhandler=true; 1591$B.urlBindHandler.callback=function(req,_379){ 1592if($A.isRequestError(req)){ 1593$C.handleError(_379.errorHandler,"bind.urlbindhandler.httperror","http",[req.status,_379.url,req.statusText],req.status,req.statusText); 1594}else{ 1595$L.info("bind.urlbindhandler.response","http",[req.responseText]); 1596var _37a; 1597try{ 1598if(_379.returnFormat==null||_379.returnFormat==="JSON"){ 1599_37a=$X.JSON.decode(req.responseText); 1600}else{ 1601_37a=req.responseText; 1602} 1603} 1604catch(e){ 1605if(req.responseText!=null&&typeof req.responseText=="string"){ 1606_37a=req.responseText; 1607}else{ 1608$C.handleError(_379.errorHandler,"bind.urlbindhandler.jsonerror","http",[req.responseText]); 1609} 1610} 1611$B.assignValue(_379.bindTo,_379.bindToAttr,_37a,_379.bindToParams); 1612} 1613}; 1614$A.initSelect=function(_37b,_37c,_37d,_37e){ 1615$C.objectCache[_37b]={"valueCol":_37c,"displayCol":_37d,selected:_37e}; 1616}; 1617$S.setupSpry=function(){ 1618if(typeof (Spry)!="undefined"&&Spry.Data){ 1619Spry.Data.DataSet.prototype._cf_getAttribute=function(_37f){ 1620var val; 1621var row=this.getCurrentRow(); 1622if(row){ 1623val=row[_37f]; 1624} 1625return val; 1626}; 1627Spry.Data.DataSet.prototype._cf_register=function(_382,_383,_384){ 1628var obs={bindParams:_384}; 1629obs.onCurrentRowChanged=function(){ 1630_383.call(null,null,this.bindParams); 1631}; 1632obs.onDataChanged=function(){ 1633_383.call(null,null,this.bindParams); 1634}; 1635this.addObserver(obs); 1636}; 1637if(Spry.Debug.trace){ 1638var _386=Spry.Debug.trace; 1639Spry.Debug.trace=function(str){ 1640$L.info(str,"spry"); 1641_386(str); 1642}; 1643} 1644if(Spry.Debug.reportError){ 1645var _388=Spry.Debug.reportError; 1646Spry.Debug.reportError=function(str){ 1647$L.error(str,"spry"); 1648_388(str); 1649}; 1650} 1651$L.info("spry.setupcomplete","bind"); 1652} 1653}; 1654$E.registerOnLoad($S.setupSpry,null,true); 1655$S.bindHandler=function(_38a,_38b){ 1656var url; 1657var _38d="_cf_nodebug=true&_cf_nocache=true"; 1658if(window._cf_clientid){ 1659_38d+="&_cf_clientid="+_cf_clientid; 1660} 1661var _38e=window[_38b.bindTo]; 1662var _38f=(typeof (_38e)=="undefined"); 1663if(_38b.cfc){ 1664var _390={}; 1665var _391=_38b.bindExpr; 1666for(var i=0;i<_391.length;i++){ 1667var _393; 1668if(_391[i].length==2){ 1669_393=_391[i][1]; 1670}else{ 1671_393=$B.getBindElementValue(_391[i][1],_391[i][2],_391[i][3],false,_38f); 1672} 1673_390[_391[i][0]]=_393; 1674} 1675_390=$X.JSON.encode(_390); 1676_38d+="&method="+_38b.cfcFunction; 1677_38d+="&argumentCollection="+encodeURIComponent(_390); 1678$L.info("spry.bindhandler.loadingcfc","http",[_38b.bindTo,_38b.cfc,_38b.cfcFunction,_390]); 1679url=_38b.cfc; 1680}else{ 1681url=$B.evaluateBindTemplate(_38b,false,true,_38f); 1682$L.info("spry.bindhandler.loadingurl","http",[_38b.bindTo,url]); 1683} 1684var _394=_38b.options||{}; 1685if((_38e&&_38e._cf_type=="json")||_38b.dsType=="json"){ 1686_38d+="&returnformat=json"; 1687} 1688if(_38e){ 1689if(_38e.requestInfo.method=="GET"){ 1690_394.method="GET"; 1691if(url.indexOf("?")==-1){ 1692url+="?"+_38d; 1693}else{ 1694url+="&"+_38d; 1695} 1696}else{ 1697_394.postData=_38d; 1698_394.method="POST"; 1699_38e.setURL(""); 1700} 1701_38e.setURL(url,_394); 1702_38e.loadData(); 1703}else{ 1704if(!_394.method||_394.method=="GET"){ 1705if(url.indexOf("?")==-1){ 1706url+="?"+_38d; 1707}else{ 1708url+="&"+_38d; 1709} 1710}else{ 1711_394.postData=_38d; 1712_394.useCache=false; 1713} 1714var ds; 1715if(_38b.dsType=="xml"){ 1716ds=new Spry.Data.XMLDataSet(url,_38b.xpath,_394); 1717}else{ 1718ds=new Spry.Data.JSONDataSet(url,_394); 1719ds.preparseFunc=$S.preparseData; 1720} 1721ds._cf_type=_38b.dsType; 1722var _396={onLoadError:function(req){ 1723$C.handleError(_38b.errorHandler,"spry.bindhandler.error","http",[_38b.bindTo,req.url,req.requestInfo.postData]); 1724}}; 1725ds.addObserver(_396); 1726window[_38b.bindTo]=ds; 1727} 1728}; 1729$S.bindHandler._cf_bindhandler=true; 1730$S.preparseData=function(ds,_399){ 1731var _39a=$U.getFirstNonWhitespaceIndex(_399); 1732if(_39a>0){ 1733_399=_399.slice(_39a); 1734} 1735if(window._cf_jsonprefix&&_399.indexOf(_cf_jsonprefix)==0){ 1736_399=_399.slice(_cf_jsonprefix.length); 1737} 1738return _399; 1739}; 1740$P.init=function(_39b){ 1741$L.info("pod.init.creating","widget",[_39b]); 1742var _39c={}; 1743_39c._cf_body=_39b+"_body"; 1744$C.objectCache[_39b]=_39c; 1745}; 1746$B.cfcBindHandler=function(e,_39e){ 1747var _39f=(_39e.httpMethod)?_39e.httpMethod:"GET"; 1748var _3a0={}; 1749var _3a1=_39e.bindExpr; 1750for(var i=0;i<_3a1.length;i++){ 1751var _3a3; 1752if(_3a1[i].length==2){ 1753_3a3=_3a1[i][1]; 1754}else{ 1755_3a3=$B.getBindElementValue(_3a1[i][1],_3a1[i][2],_3a1[i][3],false); 1756} 1757_3a0[_3a1[i][0]]=_3a3; 1758} 1759var _3a4=function(_3a5,_3a6){ 1760$B.assignValue(_3a6.bindTo,_3a6.bindToAttr,_3a5,_3a6.bindToParams); 1761}; 1762var _3a7={"bindTo":_39e.bindTo,"bindToAttr":_39e.bindToAttr,"bindToParams":_39e.bindToParams}; 1763var _3a8={"async":true,"cfcPath":_39e.cfc,"httpMethod":_39f,"callbackHandler":_3a4,"errorHandler":_39e.errorHandler}; 1764if(_39e.proxyCallHandler){ 1765_3a8.callHandler=_39e.proxyCallHandler; 1766_3a8.callHandlerParams=_39e; 1767} 1768$X.invoke(_3a8,_39e.cfcFunction,_39e._cf_ajaxproxytoken,_3a0,_3a7); 1769}; 1770$B.cfcBindHandler._cf_bindhandler=true; 1771$U.extractReturnFormat=function(url){ 1772var _3aa; 1773var _3ab=url.toUpperCase(); 1774var _3ac=_3ab.indexOf("RETURNFORMAT"); 1775if(_3ac>0){ 1776var _3ad=_3ab.indexOf("&",_3ac+13); 1777if(_3ad<0){ 1778_3ad=_3ab.length; 1779} 1780_3aa=_3ab.substring(_3ac+13,_3ad); 1781} 1782return _3aa; 1783}; 1784$U.replaceAll=function(_3ae,_3af,_3b0){ 1785var _3b1=_3ae.indexOf(_3af); 1786while(_3b1>-1){ 1787_3ae=_3ae.replace(_3af,_3b0); 1788_3b1=_3ae.indexOf(_3af); 1789} 1790return _3ae; 1791}; 1792$U.cloneObject=function(obj){ 1793var _3b3={}; 1794for(key in obj){ 1795var _3b4=obj[key]; 1796if(typeof _3b4=="object"){ 1797_3b4=$U.cloneObject(_3b4); 1798} 1799_3b3.key=_3b4; 1800} 1801return _3b3; 1802}; 1803$C.clone=function(obj,_3b6){ 1804if(typeof (obj)!="object"){ 1805return obj; 1806}
1807if(obj==null){ 1808return obj; 1809} 1810var _3b7=new Object(); 1811for(var i in obj){ 1812if(_3b6===true){ 1813_3b7[i]=$C.clone(obj[i]); 1814}else{ 1815_3b7[i]=obj[i]; 1816} 1817} 1818return _3b7; 1819}; 1820$C.printObject=function(obj){ 1821var str=""; 1822for(key in obj){ 1823str=str+" "+key+"="; 1824value=obj[key]; 1825if(typeof (value)=="object"){ 1826value=$C.printObject(value); 1827} 1828str+=value; 1829} 1830return str; 1831}; 1832} 1833} 1834cfinit();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.