function cfinit(){if(!window.ColdFusion){var h=ColdFusion={};if(!h.Ajax)h.Ajax={};var s=h.Ajax;if(!h.AjaxProxy)h.AjaxProxy={};var w=h.AjaxProxy;if(!h.Bind)h.Bind={};var r=h.Bind;if(!h.Event)h.Event={};var p=h.Event;if(!h.Log)h.Log={};var n=h.Log;if(!h.Util)h.Util={};var t=h.Util;if(!h.DOM)h.DOM={};var y=h.DOM;if(!h.Spry)h.Spry={};var z=h.Spry;if(!h.Pod)h.Pod={};var D=h.Pod;if(!h.objectCache)h.objectCache={};if(!h.required)h.required={};if(!h.importedTags)h.importedTags=[];if(!h.requestCounter)h.requestCounter=
0;if(!h.bindHandlerCache)h.bindHandlerCache={};window._cf_loadingtexthtml='<div style="text-align: center;">'+window._cf_loadingtexthtml+"&nbsp;"+CFMessage.loading+"</div>";h.globalErrorHandler=function(a,b){n.isAvailable&&n.error(a,b);h.userGlobalErrorHandler&&h.userGlobalErrorHandler(a);!n.isAvailable&&!h.userGlobalErrorHandler&&alert(a+CFMessage["globalErrorHandler.alert"])};h.handleError=function(a,b,c,d,e,f,k){var g=n.format(b,d);if(a){n.error(g,"http");e||(e=-1);f||(f=g);a(e,f)}else if(k){n.error(g,
"http");throw g;}else h.globalErrorHandler(g,c)};h.setGlobalErrorHandler=function(a){h.userGlobalErrorHandler=a};s.createXMLHttpRequest=function(){for(var a=["Microsoft.XMLHTTP","MSXML2.XMLHTTP.5.0","MSXML2.XMLHTTP.4.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP"],b=0;b<a.length;b++)try{return new ActiveXObject(a[b])}catch(c){}try{return new XMLHttpRequest}catch(d){}return false};s.isRequestError=function(a){return a.status!=0&&a.status!=200||a.getResponseHeader("server-error")};s.sendMessage=function(a,
b,c,d,e,f,k){var g=s.createXMLHttpRequest();b||(b="GET");if(d&&e)g.onreadystatechange=function(){s.callback(g,e,f)};if(c)c+="&_cf_nodebug=true&_cf_nocache=true";else c="_cf_nodebug=true&_cf_nocache=true";if(window._cf_clientid)c+="&_cf_clientid="+_cf_clientid;if(b=="GET"){if(c){c+="&_cf_rc="+h.requestCounter++;a+=a.indexOf("?")==-1?"?"+c:"&"+c}n.info("ajax.sendmessage.get","http",[a]);g.open(b,a,d);g.send(null)}else{n.info("ajax.sendmessage.post","http",[a,c]);g.open(b,a,d);g.setRequestHeader("Content-Type",
"application/x-www-form-urlencoded");c?g.send(c):g.send(null)}if(!d){for(;g.readyState!=4;);if(s.isRequestError(g))h.handleError(null,"ajax.sendmessage.error","http",[g.status,g.statusText],g.status,g.statusText,k);else return g}};s.callback=function(a,b,c){a.readyState==4&&b(a,c)};s.submitForm=function(a,b,c,d,e,f){var k=h.getFormQueryString(a);if(k==-1)h.handleError(d,"ajax.submitform.formnotfound","http",[a],-1,null,true);else{e||(e="POST");f=f!==false;var g=function(l){s.submitForm.callback(l,
a,c,d)};n.info("ajax.submitform.submitting","http",[a]);var j=s.sendMessage(b,e,k,f,g);if(!f){n.info("ajax.submitform.success","http",[a]);return j.responseText}}};s.submitForm.callback=function(a,b,c,d){if(s.isRequestError(a))h.handleError(d,"ajax.submitform.error","http",[a.status,b,a.statusText],a.status,a.statusText);else{n.info("ajax.submitform.success","http",[b]);c&&c(a.responseText)}};h.empty=function(){};h.setSubmitClicked=function(a,b){var c=y.getElement(b,a);c.cfinputbutton=true;h.setClickedProperty=
function(){c.clicked=true};p.addListener(c,"click",h.setClickedProperty)};h.getFormQueryString=function(a,b){var c;if(typeof a=="string")c=document.getElementById(a)||document.forms[a];else if(typeof a=="object")c=a;if(!c||null==c.elements)return-1;for(var d,e,f,k,g=false,j=b?{}:"",l=0;l<c.elements.length;l++){d=c.elements[l];k=d.disabled;e=d.name;f=d.value;if(!k&&e)switch(d.type){case "select-one":case "select-multiple":for(f=0;f<d.options.length;f++)if(d.options[f].selected)j=window.ActiveXObject?
h.getFormQueryString.processFormData(j,b,e,d.options[f].attributes.value.specified?d.options[f].value:d.options[f].text):h.getFormQueryString.processFormData(j,b,e,d.options[f].hasAttribute("value")?d.options[f].value:d.options[f].text);break;case "radio":case "checkbox":if(d.checked)j=h.getFormQueryString.processFormData(j,b,e,f);break;case "file":case undefined:case "reset":case "button":break;case "submit":if(d.cfinputbutton){if(g==false&&d.clicked){j=h.getFormQueryString.processFormData(j,b,e,
f);g=true}}else j=h.getFormQueryString.processFormData(j,b,e,f);break;case "textarea":var m;if(window.FCKeditorAPI&&(m=h.objectCache[e])&&m.richtextid){var q=FCKeditorAPI.GetInstance(m.richtextid);if(q)f=q.GetXHTML()}j=h.getFormQueryString.processFormData(j,b,e,f);break;default:j=h.getFormQueryString.processFormData(j,b,e,f);break}}b||(j=j.substr(0,j.length-1));return j};h.getFormQueryString.processFormData=function(a,b,c,d){if(b)if(a[c])a[c]+=","+d;else a[c]=d;else a+=encodeURIComponent(c)+"="+encodeURIComponent(d)+
"&";return a};s.importTag=function(a){h.importedTags.push(a)};s.checkImportedTag=function(a){for(var b=false,c=0;c<h.importedTags.length;c++)if(h.importedTags[c]==a){b=true;break}b||h.handleError(null,"ajax.checkimportedtag.error","widget",[a])};h.getElementValue=function(a,b,c){if(a){c||(c="value");var d=r.getBindElementValue(a,b,c);if(typeof d=="undefined")d=null;if(d==null)h.handleError(null,"getelementvalue.elnotfound","bind",[a,c],null,null,true);else return d}else h.handleError(null,"getelementvalue.noelementname",
"bind",null,null,null,true)};r.getBindElementValue=function(a,b,c,d,e){var f="";if(window[a]){var k=eval(a);if(k&&k._cf_getAttribute)return f=k._cf_getAttribute(c)}var g=h.objectCache[a];if(g&&g._cf_getAttribute)return f=g._cf_getAttribute(c);var j=y.getElement(a,b),l=j&&(!j.length&&j.length!=0||j.length&&j.length>0||j.tagName=="SELECT");if(!l&&!e){h.handleError(null,"bind.getbindelementvalue.elnotfound","bind",[a]);return null}if(j.tagName!="SELECT")if(j.length>1)for(var m=true,q=0;q<j.length;q++){var o=
j[q].getAttribute("type")=="radio"||j[q].getAttribute("type")=="checkbox";if(!o||o&&j[q].checked){m||(f+=",");f+=r.getBindElementValue.extract(j[q],c);m=false}}else f=r.getBindElementValue.extract(j,c);else{m=true;for(q=0;q<j.options.length;q++)if(j.options[q].selected){m||(f+=",");f+=r.getBindElementValue.extract(j.options[q],c);m=false}}if(typeof f=="object"){h.handleError(null,"bind.getbindelementvalue.simplevalrequired","bind",[a,c]);return null}if(d&&h.required[a]&&f.length==0)return null;return f};
r.getBindElementValue.extract=function(a,b){var c=a[b];if((c==null||typeof c=="undefined")&&a.getAttribute)c=a.getAttribute(b);return c};n.init=function(){if(window.YAHOO&&YAHOO.widget&&YAHOO.widget.Logger){YAHOO.widget.Logger.categories=[CFMessage.debug,CFMessage.info,CFMessage.error,CFMessage.window];YAHOO.widget.LogReader.prototype.formatMsg=function(b){var c=b.category;return"<p><span class='"+c+"'>"+c+"</span>:<i>"+b.source+"</i>: "+b.msg+"</p>"};var a=new YAHOO.widget.LogReader(null,{width:"30em",
fontSize:"100%"});a.setTitle(CFMessage["log.title"]||"ColdFusion AJAX Logger");a._btnCollapse.value=CFMessage["log.collapse"]||"Collapse";a._btnPause.value=CFMessage["log.pause"]||"Pause";a._btnClear.value=CFMessage["log.clear"]||"Clear";n.isAvailable=true}};n.log=function(a,b,c,d){if(n.isAvailable){c||(c="global");c=CFMessage[c]||c;b=CFMessage[b]||b;a=n.format(a,d);YAHOO.log(a,b,c)}};n.format=function(a,b){var c=CFMessage[a]||a;if(b)for(i=0;i<b.length;i++){b[i].length||(b[i]="");var d="{"+i+"}";
c=c.replace(d,b[i])}return c};n.debug=function(a,b,c){n.log(a,"debug",b,c)};n.info=function(a,b,c){n.log(a,"info",b,c)};n.error=function(a,b,c){n.log(a,"error",b,c)};n.dump=function(a,b){if(n.isAvailable){var c=/string|number|undefined|boolean/.test(typeof a)||a==null?a:recurse(a,typeof a,true);n.debug(c,b)}};w.invoke=function(a,b,c,d){var e="method="+b,f=a.returnFormat||"json";e+="&returnFormat="+f;if(a.queryFormat)e+="&queryFormat="+a.queryFormat;if(a.formId){var k=h.getFormQueryString(a.formId,
true);if(c!=null)for(prop in k)c[prop]=k[prop];else c=k;a.formId=null}var g="";if(c!=null){g=w.JSON.encode(c);e+="&argumentCollection="+encodeURIComponent(g)}n.info("ajaxproxy.invoke.invoking","http",[a.cfcPath,b,g]);if(a.callHandler)a.callHandler.call(null,a.callHandlerParams,a.cfcPath,e);else{var j;if(a.async)j=function(m){w.callback(m,a,d)};var l=s.sendMessage(a.cfcPath,a.httpMethod,e,a.async,j,null,true);if(!a.async)return w.processResponse(l,a)}};w.callback=function(a,b,c){if(s.isRequestError(a))h.handleError(b.errorHandler,
"ajaxproxy.invoke.error","http",[a.status,b.cfcPath,a.statusText],a.status,a.statusText);else if(b.callbackHandler){var d=w.processResponse(a,b);b.callbackHandler(d,c)}};w.processResponse=function(a,b){for(var c=true,d=0;d<a.responseText.length;d++){var e=a.responseText.charAt(d);c=e==" "||e=="\n"||e=="\t"||e=="\r";if(!c)break}var f=a.responseXML&&a.responseXML.childNodes.length>0,k=f?"[XML Document]":a.responseText;n.info("ajaxproxy.invoke.response","http",[k]);var g,j=b.returnFormat||"json";return g=
j=="json"?c?null:w.JSON.decode(a.responseText):f?a.responseXML:c?null:a.responseText};w.init=function(a,b){var c=b.split("."),d=self;for(i=0;i<c.length-1;i++)if(c[i].length){d[c[i]]=d[c[i]]||{};d=d[c[i]]}var e=c[c.length-1];if(d[e])return d[e];d[e]=function(){this.httpMethod="GET";this.async=false;this.formId=this.errorHandler=this.callbackHandler=null};d[e].prototype.cfcPath=a;d[e].prototype.setHTTPMethod=function(f){if(f)f=f.toUpperCase();f!="GET"&&f!="POST"&&h.handleError(null,"ajaxproxy.sethttpmethod.invalidmethod",
"http",[f],null,null,true);this.httpMethod=f};d[e].prototype.setSyncMode=function(){this.async=false};d[e].prototype.setAsyncMode=function(){this.async=true};d[e].prototype.setCallbackHandler=function(f){this.callbackHandler=f;this.setAsyncMode()};d[e].prototype.setErrorHandler=function(f){this.errorHandler=f;this.setAsyncMode()};d[e].prototype.setForm=function(f){this.formId=f};d[e].prototype.setQueryFormat=function(f){if(f)f=f.toLowerCase();if(!f||f!="column"&&f!="row")h.handleError(null,"ajaxproxy.setqueryformat.invalidformat",
"http",[f],null,null,true);this.queryFormat=f};d[e].prototype.setReturnFormat=function(f){if(f)f=f.toLowerCase();if(!f||f!="plain"&&f!="json"&&f!="wddx")h.handleError(null,"ajaxproxy.setreturnformat.invalidformat","http",[f],null,null,true);this.returnFormat=f};n.info("ajaxproxy.init.created","http",[a]);return d[e]};t.isWhitespace=function(a){for(var b=true,c=0;c<a.length;c++){var d=a.charAt(c);b=d==" "||d=="\n"||d=="\t"||d=="\r";if(!b)break}return b};t.getFirstNonWhitespaceIndex=function(a){for(var b=
true,c=0;c<a.length;c++){var d=a.charAt(c);b=d==" "||d=="\n"||d=="\t"||d=="\r";if(!b)break}return c};h.trim=function(a){return a.replace(/^\s+|\s+$/g,"")};t.isInteger=function(a){var b=true;if(typeof a=="number")b=a>=0;else for(i=0;i<a.length;i++)if(t.isInteger.numberChars.indexOf(a.charAt(i))==-1){b=false;break}return b};t.isInteger.numberChars="0123456789";t.isArray=function(a){return typeof a.length=="number"&&!a.toUpperCase};t.isBoolean=function(a){if(a===true||a===false)return true;else if(a.toLowerCase){a=
a.toLowerCase();return a==t.isBoolean.trueChars||a==t.isBoolean.falseChars}else return false};t.isBoolean.trueChars="true";t.isBoolean.falseChars="false";t.castBoolean=function(a){if(a===true)return true;else if(a===false)return false;else if(a.toLowerCase){a=a.toLowerCase();return a==t.isBoolean.trueChars?true:false}else return false};t.checkQuery=function(a){var b=null;if(a&&a.COLUMNS&&t.isArray(a.COLUMNS)&&a.DATA&&t.isArray(a.DATA)&&(a.DATA.length==0||a.DATA.length>0&&t.isArray(a.DATA[0])))b="row";
else if(a&&a.COLUMNS&&t.isArray(a.COLUMNS)&&a.ROWCOUNT&&t.isInteger(a.ROWCOUNT)&&a.DATA){b="col";for(var c=0;c<a.COLUMNS.length;c++){var d=a.DATA[a.COLUMNS[c]];if(!d||!t.isArray(d)){b=null;break}}}return b};w.JSON=new (function(){var a={}.hasOwnProperty?true:false,b=/^("(\\.|[^"\\\n\r])*?"|[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t])+?$/;function c(g){return g<10?"0"+g:g}var d={"\u0008":"\\b","\t":"\\t","\n":"\\n","\u000c":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function e(g){if(/["\\\x00-\x1f]/.test(g))return'"'+
g.replace(/([\x00-\x1f\\"])/g,function(j,l){if(j=d[l])return j;j=l.charCodeAt();return"\\u00"+Math.floor(j/16).toString(16)+(j%16).toString(16)})+'"';return'"'+g+'"'}function f(g){var j=["["],l,m,q=g.length,o;for(m=0;m<q;m+=1){o=g[m];switch(typeof o){case "undefined":case "function":case "unknown":break;default:l&&j.push(",");j.push(o===null?"null":w.JSON.encode(o));l=true}}j.push("]");return j.join("")}function k(g){return'"'+g.getFullYear()+"-"+c(g.getMonth()+1)+"-"+c(g.getDate())+"T"+c(g.getHours())+
":"+c(g.getMinutes())+":"+c(g.getSeconds())+'"'}this.encode=function(g){if(typeof g=="undefined"||g===null)return"null";else if(g instanceof Array)return f(g);else if(g instanceof Date)return k(g);else if(typeof g=="string")return e(g);else if(typeof g=="number")return isFinite(g)?String(g):"null";else if(typeof g=="boolean")return String(g);else{var j=["{"],l,m,q;for(m in g)if(!a||g.hasOwnProperty(m)){q=g[m];switch(typeof q){case "undefined":case "function":case "unknown":break;default:l&&j.push(",");
j.push(this.encode(m),":",q===null?"null":this.encode(q));l=true}}j.push("}");return j.join("")}};this.decode=function(g){if(t.isWhitespace(g))return null;var j=t.getFirstNonWhitespaceIndex(g);if(j>0)g=g.slice(j);if(window._cf_jsonprefix&&g.indexOf(_cf_jsonprefix)==0)g=g.slice(_cf_jsonprefix.length);try{if(b.test(g))return eval("("+g+")")}catch(l){}throw new SyntaxError("parseJSON");}});if(!h.JSON)h.JSON={};h.JSON.encode=w.JSON.encode;h.JSON.decode=w.JSON.decode;h.navigate=function(a,b,c,d,e,f){if(a==
null)h.handleError(d,"navigate.urlrequired","widget");else{if(e){e=e.toUpperCase();e!="GET"&&e!="POST"&&h.handleError(null,"navigate.invalidhttpmethod","http",[e],null,null,true)}else e="GET";var k;if(f){k=h.getFormQueryString(f);k==-1&&h.handleError(null,"navigate.formnotfound","http",[f],null,null,true)}if(b==null){if(k)a+=a.indexOf("?")==-1?"?"+k:"&"+k;n.info("navigate.towindow","widget",[a]);window.location.replace(a)}else{n.info("navigate.tocontainer","widget",[a,b]);var g=h.objectCache[b];if(g!=
null)if(typeof g._cf_body!="undefined"&&g._cf_body!=null)b=g._cf_body;s.replaceHTML(b,a,e,k,c,d)}}};s.checkForm=function(a,b,c,d,e){var f=b.call(null,a);if(f==false)return false;var k=h.getFormQueryString(a);n.info("ajax.submitform.submitting","http",[a.name]);s.replaceHTML(c,a.action,a.method,k,d,e);return false};s.replaceHTML=function(a,b,c,d,e,f){var k=document.getElementById(a);if(k){var g="_cf_containerId="+encodeURIComponent(a);d=d?d+"&"+g:g;n.info("ajax.replacehtml.replacing","http",[a,b,d]);
if(_cf_loadingtexthtml)try{k.innerHTML=_cf_loadingtexthtml}catch(j){}var l=function(o,u){var v=false;if(s.isRequestError(o)){h.handleError(f,"ajax.replacehtml.error","http",[o.status,u.id,o.statusText],o.status,o.statusText);v=true}var x=new p.CustomEvent("onReplaceHTML",u),A=new p.CustomEvent("onReplaceHTMLUser",u);p.loadEvents[u.id]={system:x,user:A};if(o.responseText.search(/<script/i)!=-1){try{u.innerHTML=""}catch(B){}s.replaceHTML.processResponseText(o.responseText,u,f)}else try{u.innerHTML=
o.responseText}catch(C){}p.loadEvents[u.id]=null;x.fire();x.unsubscribe();A.fire();A.unsubscribe();n.info("ajax.replacehtml.success","http",[u.id]);e&&!v&&e()};try{s.sendMessage(b,c,d,true,l,k)}catch(m){try{k.innerHTML=n.format(CFMessage["ajax.replacehtml.connectionerrordisplay"],[b,m])}catch(q){}h.handleError(f,"ajax.replacehtml.connectionerror","http",[a,b,m])}}else h.handleError(f,"ajax.replacehtml.elnotfound","http",[a])};s.replaceHTML.processResponseText=function(a,b,c){var d=0,e=0,f=0;for(b._cf_innerHTML=
"";d<a.length;){var k=a.indexOf("<s",d);if(k==-1)k=a.indexOf("<S",d);if(k==-1)break;d=k;for(var g=true,j=s.replaceHTML.processResponseText.scriptTagChars,l=1;l<j.length;l++){var m=d+l+1;if(m>a.length)break;var q=a.charAt(m);if(j[l][0]!=q&&j[l][1]!=q){d+=l+1;g=false;break}}if(g){var o=a.substring(e,d);if(o)b._cf_innerHTML+=o;var u=a.indexOf(">",d)+1;if(u==0)d++;else{d+=7;for(var v=u;v<a.length&&v!=-1;){v=a.indexOf("</s",v);if(v==-1)v=a.indexOf("</S",v);if(v!=-1){g=true;for(l=1;l<j.length;l++){m=v+
2+l;if(m>a.length)break;q=a.charAt(m);if(j[l][0]!=q&&j[l][1]!=q){v=m;g=false;break}}if(g)break}}if(v!=-1){var x=a.substring(u,v),A=x.indexOf("<!--");if(A!=-1)x=x.substring(A+4);var B=x.lastIndexOf("//--\>");if(B!=-1)x=x.substring(0,B-1);if(x.indexOf("document.write")!=-1)x="var _cfDomNode = document.getElementById('"+b.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);}};};"+
x+";_cfDomNode._cf_innerHTML += _cfBuffer; _cfBuffer=null;";try{eval(x)}catch(C){h.handleError(c,"ajax.replacehtml.jserror","http",[b.id,C])}}k=a.indexOf(">",v)+1;if(k==0){f=v+1;break}e=d=f=k}}}if(f<a.length-1)if(o=a.substring(f,a.length))b._cf_innerHTML+=o;try{b.innerHTML=b._cf_innerHTML}catch(E){}b._cf_innerHTML=""};s.replaceHTML.processResponseText.scriptTagChars=[["s","S"],["c","C"],["r","R"],["i","I"],["p","P"],["t","T"]];y.getElement=function(a,b){function c(e){return e.name==a||e.id==a}var d=
y.getElementsBy(c,null,b);return d.length==1?d[0]:d};y.getElementsBy=function(a,b,c){b=b||"*";var d=[];if(c){c=y.get(c);if(!c)return d}else c=document;var e=c.getElementsByTagName(b);if(!e.length&&b=="*"&&c.all)e=c.all;b=0;for(var f=e.length;b<f;++b)if(a(e[b]))d[d.length]=e[b];return d};y.get=function(a){if(!a)return null;if(typeof a!="string"&&!(a instanceof Array))return a;if(typeof a=="string")return document.getElementById(a);else{for(var b=[],c=0,d=a.length;c<d;++c)b[b.length]=y.get(a[c]);return b}};
p.loadEvents={};p.CustomEvent=function(a,b){return{name:a,domNode:b,subs:[],subscribe:function(c,d){for(var e=false,f=0;f<this.subs.length;f++){var k=this.subs[f];if(k.f==c&&k.p==d){e=true;break}}e||this.subs.push({f:c,p:d})},fire:function(){for(var c=0;c<this.subs.length;c++){var d=this.subs[c];d.f.call(null,this,d.p)}},unsubscribe:function(){this.subscribers=[]}}};p.windowLoadImpEvent=new p.CustomEvent("cfWindowLoadImp");p.windowLoadEvent=new p.CustomEvent("cfWindowLoad");p.windowLoadUserEvent=
new p.CustomEvent("cfWindowLoadUser");p.listeners=[];p.addListener=function(a,b,c,d){var e={el:a,ev:b,fn:c,params:d};p.listeners.push(e);function f(k){if(!k)k=window.event;c.call(null,k,d)}if(a.addEventListener){a.addEventListener(b,f,false);return true}else if(a.attachEvent){a.attachEvent("on"+b,f);return true}else return false};p.isListener=function(a,b,c,d){for(var e=false,f=p.listeners,k=0;k<f.length;k++)if(f[k].el==a&&f[k].ev==b&&f[k].fn==c&&f[k].params==d){e=true;break}return e};p.callBindHandlers=
function(a,b,c){if(a=document.getElementById(a))for(var d=p.listeners,e=0;e<d.length;e++)d[e].el==a&&d[e].ev==c&&d[e].fn._cf_bindhandler&&d[e].fn.call(null,null,d[e].params)};p.registerOnLoad=function(a,b,c,d){if(p.registerOnLoad.windowLoaded)if(b&&b._cf_containerId&&p.loadEvents[b._cf_containerId])d?p.loadEvents[b._cf_containerId].user.subscribe(a,b):p.loadEvents[b._cf_containerId].system.subscribe(a,b);else a.call(null,null,b);else if(d)p.windowLoadUserEvent.subscribe(a,b);else c?p.windowLoadImpEvent.subscribe(a,
b):p.windowLoadEvent.subscribe(a,b)};p.registerOnLoad.windowLoaded=false;p.onWindowLoad=function(a){if(window.addEventListener)window.addEventListener("load",a,false);else if(window.attachEvent)window.attachEvent("onload",a);else if(document.getElementById)window.onload=a};h.addSpanToDom=function(){var a=document.createElement("span");document.body.insertBefore(a,document.body.firstChild)};p.windowLoadHandler=function(a){if(window.Ext)Ext.BLANK_IMAGE_URL=_cf_contextpath+"/CFIDE/scripts/ajax/resources/ext/images/default/s.gif";
h.addSpanToDom();n.init();p.registerOnLoad.windowLoaded=true;p.windowLoadImpEvent.fire();p.windowLoadImpEvent.unsubscribe();p.windowLoadEvent.fire();p.windowLoadEvent.unsubscribe();p.windowLoadUserEvent.fire();p.windowLoadUserEvent.unsubscribe()};p.onWindowLoad(p.windowLoadHandler);r.register=function(a,b,c,d){for(var e=0;e<a.length;e++){var f=a[e][0],k=a[e][1],g=a[e][2];if(window[f]){var j=eval(f);if(j&&j._cf_register){j._cf_register(g,c,b);continue}}var l=h.objectCache[f];if(l&&l._cf_register)l._cf_register(g,
c,b);else{var m=y.getElement(f,k),q=m&&(!m.length&&m.length!=0||m.length&&m.length>0||m.tagName=="SELECT");q||h.handleError(null,"bind.register.elnotfound","bind",[f]);if(m.length>1&&!m.options)for(e=0;e<m.length;e++)r.register.addListener(m[e],g,c,b);else r.register.addListener(m,g,c,b)}}if(!h.bindHandlerCache[b.bindTo]&&typeof b.bindTo=="string")h.bindHandlerCache[b.bindTo]=function(){c.call(null,null,b)};d&&c.call(null,null,b)};r.register.addListener=function(a,b,c,d){p.isListener(a,b,c,d)||p.addListener(a,
b,c,d)};r.assignValue=function(a,b,c,d){if(a)if(a.call)a.call(null,c,d);else{var e=h.objectCache[a];if(e&&e._cf_setValue)e._cf_setValue(c);else{var f=document.getElementById(a);f||h.handleError(null,"bind.assignvalue.elnotfound","bind",[a]);if(f.tagName=="SELECT"){var k=t.checkQuery(c),g=h.objectCache[a];if(k){if(!g||g&&(!g.valueCol||!g.displayCol)){h.handleError(null,"bind.assignvalue.selboxmissingvaldisplay","bind",[a]);return}}else if(typeof c.length=="number"&&!c.toUpperCase){if(c.length>0&&(typeof c[0].length!=
"number"||c[0].toUpperCase)){h.handleError(null,"bind.assignvalue.selboxerror","bind",[a]);return}}else{h.handleError(null,"bind.assignvalue.selboxerror","bind",[a]);return}f.options.length=0;if(k)if(k=="col"){var j=c.DATA[g.valueCol],l=c.DATA[g.displayCol];if(!j||!l){h.handleError(null,"bind.assignvalue.selboxinvalidvaldisplay","bind",[a]);return}for(o=0;o<j.length;o++){u=new Option(l[o],j[o]);f.options[o]=u}}else{if(k=="row"){var m=-1,q=-1;for(o=0;o<c.COLUMNS.length;o++){u=c.COLUMNS[o];if(u==g.valueCol)m=
o;if(u==g.displayCol)q=o;if(m!=-1&&q!=-1)break}if(m==-1||q==-1){h.handleError(null,"bind.assignvalue.selboxinvalidvaldisplay","bind",[a]);return}for(o=0;o<c.DATA.length;o++){u=new Option(c.DATA[o][q],c.DATA[o][m]);f.options[o]=u}}}else for(var o=0;o<c.length;o++){var u=new Option(c[o][1],c[o][0]);f.options[o]=u}}else f[b]=c;p.callBindHandlers(a,null,"change");n.info("bind.assignvalue.success","bind",[c,a,b])}}};r.localBindHandler=function(a,b){var c=document.getElementById(b.bindTo),d=r.evaluateBindTemplate(b,
true);r.assignValue(b.bindTo,b.bindToAttr,d)};r.localBindHandler._cf_bindhandler=true;r.evaluateBindTemplate=function(a,b,c,d){for(var e=a.bindExpr,f="",k=0;k<e.length;k++)if(typeof e[k]=="object"){var g=r.getBindElementValue(e[k][0],e[k][1],e[k][2],b,d);if(g==null)if(b){f="";break}else g="";if(c)g=encodeURIComponent(g);f+=g}else f+=e[k];return f};r.jsBindHandler=function(a,b){var c=b.bindExpr,d=b.callFunction+"(";for(a=0;a<c.length;a++){var e;if((e=typeof c[a]=="object"?r.getBindElementValue(c[a][0],
c[a][1],c[a][2],false):c[a])&&e.replace){e=e.replace(/\\/g,"\\\\");e=e.replace(/\'/g,"\\'");e=e.replace(/\r\n/g,"\\r\\n");e=e.replace(/\n/g,"\\n");e=e.replace(/\r/g,"\\r")}if(a!=0)d+=",";d+="'"+e+"'"}d+=")";n.info("bind.jsbindhandler.invoking","bind",[d]);var f=eval(d);r.assignValue(b.bindTo,b.bindToAttr,f,b.bindToParams)};r.jsBindHandler._cf_bindhandler=true;r.urlBindHandler=function(a,b){var c=b.bindTo;if(h.objectCache[c]&&h.objectCache[c]._cf_visible===false)h.objectCache[c]._cf_dirtyview=true;
else{a=r.evaluateBindTemplate(b,false,true);if(b.bindToAttr){b={bindTo:b.bindTo,bindToAttr:b.bindToAttr,bindToParams:b.bindToParams,errorHandler:b.errorHandler,url:a};try{s.sendMessage(a,"GET",null,true,r.urlBindHandler.callback,b)}catch(d){h.handleError(b.errorHandler,"ajax.urlbindhandler.connectionerror","http",[a,d])}}else s.replaceHTML(c,a,null,null,null,b.errorHandler)}};r.urlBindHandler._cf_bindhandler=true;r.urlBindHandler.callback=function(a,b){if(s.isRequestError(a))h.handleError(b.errorHandler,
"bind.urlbindhandler.httperror","http",[a.status,b.url,a.statusText],a.status,a.statusText);else{n.info("bind.urlbindhandler.response","http",[a.responseText]);var c;try{c=w.JSON.decode(a.responseText)}catch(d){h.handleError(b.errorHandler,"bind.urlbindhandler.jsonerror","http",[a.responseText])}r.assignValue(b.bindTo,b.bindToAttr,c,b.bindToParams)}};s.initSelect=function(a,b,c){h.objectCache[a]={valueCol:b,displayCol:c}};z.setupSpry=function(){if(typeof Spry!="undefined"&&Spry.Data){Spry.Data.DataSet.prototype._cf_getAttribute=
function(c){var d,e=this.getCurrentRow();if(e)d=e[c];return d};Spry.Data.DataSet.prototype._cf_register=function(c,d,e){var f={bindParams:e};f.onCurrentRowChanged=function(){d.call(null,null,this.bindParams)};f.onDataChanged=function(){d.call(null,null,this.bindParams)};this.addObserver(f)};if(Spry.Debug.trace){var a=Spry.Debug.trace;Spry.Debug.trace=function(c){n.info(c,"spry");a(c)}}if(Spry.Debug.reportError){var b=Spry.Debug.reportError;Spry.Debug.reportError=function(c){n.error(c,"spry");b(c)}}n.info("spry.setupcomplete",
"bind")}};p.registerOnLoad(z.setupSpry,null,true);z.bindHandler=function(a,b){var c,d="_cf_nodebug=true&_cf_nocache=true";if(window._cf_clientid)d+="&_cf_clientid="+_cf_clientid;var e=window[b.bindTo],f=typeof e=="undefined";if(b.cfc){var k={},g=b.bindExpr;for(c=0;c<g.length;c++){var j;j=g[c].length==2?g[c][1]:r.getBindElementValue(g[c][1],g[c][2],g[c][3],false,f);k[g[c][0]]=j}k=w.JSON.encode(k);d+="&method="+b.cfcFunction;d+="&argumentCollection="+encodeURIComponent(k);n.info("spry.bindhandler.loadingcfc",
"http",[b.bindTo,b.cfc,b.cfcFunction,k]);c=b.cfc}else{c=r.evaluateBindTemplate(b,false,true,f);n.info("spry.bindhandler.loadingurl","http",[b.bindTo,c])}var l=b.options||{};if(e&&e._cf_type=="json"||b.dsType=="json")d+="&returnformat=json";if(e){if(e.requestInfo.method=="GET"){l.method="GET";c+=c.indexOf("?")==-1?"?"+d:"&"+d}else{l.postData=d;l.method="POST";e.setURL("")}e.setURL(c,l);e.loadData()}else{if(!l.method||l.method=="GET")c+=c.indexOf("?")==-1?"?"+d:"&"+d;else{l.postData=d;l.useCache=false}if(b.dsType==
"xml")c=new Spry.Data.XMLDataSet(c,b.xpath,l);else{c=new Spry.Data.JSONDataSet(c,l);c.preparseFunc=z.preparseData}c._cf_type=b.dsType;var m={onLoadError:function(q){h.handleError(b.errorHandler,"spry.bindhandler.error","http",[b.bindTo,q.url,q.requestInfo.postData])}};c.addObserver(m);window[b.bindTo]=c}};z.bindHandler._cf_bindhandler=true;z.preparseData=function(a,b){var c=t.getFirstNonWhitespaceIndex(b);if(c>0)b=b.slice(c);if(window._cf_jsonprefix&&b.indexOf(_cf_jsonprefix)==0)b=b.slice(_cf_jsonprefix.length);
return b};D.init=function(a){n.info("pod.init.creating","widget",[a]);var b={};b._cf_body=a+"_body";h.objectCache[a]=b};r.cfcBindHandler=function(a,b){var c=b.httpMethod?b.httpMethod:"GET",d={},e=b.bindExpr;for(a=0;a<e.length;a++){var f;f=e[a].length==2?e[a][1]:r.getBindElementValue(e[a][1],e[a][2],e[a][3],false);d[e[a][0]]=f}function k(l,m){r.assignValue(m.bindTo,m.bindToAttr,l,m.bindToParams)}var g={bindTo:b.bindTo,bindToAttr:b.bindToAttr,bindToParams:b.bindToParams},j={async:true,cfcPath:b.cfc,
httpMethod:c,callbackHandler:k,errorHandler:b.errorHandler};if(b.proxyCallHandler){j.callHandler=b.proxyCallHandler;j.callHandlerParams=b}w.invoke(j,b.cfcFunction,d,g)};r.cfcBindHandler._cf_bindhandler=true}}cfinit();