/*ADOBE SYSTEMS INCORPORATED
Copyright 2007 Adobe Systems Incorporated
All Rights Reserved.

NOTICE:  Adobe permits you to use, modify, and distribute this file in accordance with the
terms of the Adobe license agreement accompanying it.  If you have received this file from a
source other than Adobe, then your use, modification, or distribution of it requires the prior
written permission of Adobe.*/
function cfinit(){
if(!window.ColdFusion){
ColdFusion={};
var $C=ColdFusion;
if(!$C.Ajax){
$C.Ajax={};
}
var $A=$C.Ajax;
if(!$C.AjaxProxy){
$C.AjaxProxy={};
}
var $X=$C.AjaxProxy;
if(!$C.Bind){
$C.Bind={};
}
var $B=$C.Bind;
if(!$C.Event){
$C.Event={};
}
var $E=$C.Event;
if(!$C.Log){
$C.Log={};
}
var $L=$C.Log;
if(!$C.Util){
$C.Util={};
}
var $U=$C.Util;
if(!$C.DOM){
$C.DOM={};
}
var $D=$C.DOM;
if(!$C.Spry){
$C.Spry={};
}
var $S=$C.Spry;
if(!$C.Pod){
$C.Pod={};
}
var $P=$C.Pod;
if(!$C.objectCache){
$C.objectCache={};
}
if(!$C.required){
$C.required={};
}
if(!$C.importedTags){
$C.importedTags=[];
}
if(!$C.requestCounter){
$C.requestCounter=0;
}
if(!$C.bindHandlerCache){
$C.bindHandlerCache={};
}
window._cf_loadingtexthtml=window._cf_loadingtexthtml+"&nbsp;"+CFMessage["loading"]+"</div>";
$C.globalErrorHandler=function(_2de,_2df){
if($L.isAvailable){
$L.error(_2de,_2df);
}
if($C.userGlobalErrorHandler){
$C.userGlobalErrorHandler(_2de);
}
if(!$L.isAvailable&&!$C.userGlobalErrorHandler){
alert(_2de+CFMessage["globalErrorHandler.alert"]);
}
};
$C.handleError=function(_2e0,_2e1,_2e2,_2e3,_2e4,_2e5,_2e6){
var msg=$L.format(_2e1,_2e3);
if(_2e0){
$L.error(msg,"http");
if(!_2e4){
_2e4=-1;
}
if(!_2e5){
_2e5=msg;
}
_2e0(_2e4,_2e5);
}else{
if(_2e6){
$L.error(msg,"http");
throw msg;
}else{
$C.globalErrorHandler(msg,_2e2);
}
}
};
$C.setGlobalErrorHandler=function(_2e8){
$C.userGlobalErrorHandler=_2e8;
};
$A.createXMLHttpRequest=function(){
var _2e9=["Microsoft.XMLHTTP","MSXML2.XMLHTTP.5.0","MSXML2.XMLHTTP.4.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP"];
for(var i=0;i<_2e9.length;i++){
try{
return new ActiveXObject(_2e9[i]);
}
catch(e){
}
}
try{
return new XMLHttpRequest();
}
catch(e){
}
return false;
};
$A.isRequestError=function(req){
return ((req.status!=0&&req.status!=200)||req.getResponseHeader("server-error"));
};
$A.sendMessage=function(url,_2ed,_2ee,_2ef,_2f0,_2f1,_2f2){
var req=$A.createXMLHttpRequest();
if(!_2ed){
_2ed="GET";
}
if(_2ef&&_2f0){
req.onreadystatechange=function(){
$A.callback(req,_2f0,_2f1);
};
}
if(_2ee){
_2ee+="&_cf_nodebug=true&_cf_nocache=true";
}else{
_2ee="_cf_nodebug=true&_cf_nocache=true";
}
if(window._cf_clientid){
_2ee+="&_cf_clientid="+_cf_clientid;
}
if(_2ed=="GET"){
if(_2ee){
_2ee+="&_cf_rc="+($C.requestCounter++);
if(url.indexOf("?")==-1){
url+="?"+_2ee;
}else{
url+="&"+_2ee;
}
}
$L.info("ajax.sendmessage.get","http",[url]);
req.open(_2ed,url,_2ef);
req.send(null);
}else{
$L.info("ajax.sendmessage.post","http",[url,_2ee]);
req.open(_2ed,url,_2ef);
req.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
if(_2ee){
req.send(_2ee);
}else{
req.send(null);
}
}
if(!_2ef){
while(req.readyState!=4){
}
if($A.isRequestError(req)){
$C.handleError(null,"ajax.sendmessage.error","http",[req.status,req.statusText],req.status,req.statusText,_2f2);
}else{
return req;
}
}
};
$A.callback=function(req,_2f5,_2f6){
if(req.readyState!=4){
return;
}
_2f5(req,_2f6);
};
$A.submitForm=function(_2f7,url,_2f9,_2fa,_2fb,_2fc){
var _2fd=$C.getFormQueryString(_2f7);
if(_2fd==-1){
$C.handleError(_2fa,"ajax.submitform.formnotfound","http",[_2f7],-1,null,true);
return;
}
if(!_2fb){
_2fb="POST";
}
_2fc=!(_2fc===false);
var _2fe=function(req){
$A.submitForm.callback(req,_2f7,_2f9,_2fa);
};
$L.info("ajax.submitform.submitting","http",[_2f7]);
var _300=$A.sendMessage(url,_2fb,_2fd,_2fc,_2fe);
if(!_2fc){
$L.info("ajax.submitform.success","http",[_2f7]);
return _300.responseText;
}
};
$A.submitForm.callback=function(req,_302,_303,_304){
if($A.isRequestError(req)){
$C.handleError(_304,"ajax.submitform.error","http",[req.status,_302,req.statusText],req.status,req.statusText);
}else{
$L.info("ajax.submitform.success","http",[_302]);
if(_303){
_303(req.responseText);
}
}
};
$C.empty=function(){
};
$C.getFormQueryString=function(_305,_306){
var _307;
if(typeof _305=="string"){
_307=(document.getElementById(_305)||document.forms[_305]);
}else{
if(typeof _305=="object"){
_307=_305;
}
}
if(!_307){
return -1;
}
var _308,elementName,elementValue,elementDisabled;
var _309=false;
var _30a=(_306)?{}:"";
for(var i=0;i<_307.elements.length;i++){
_308=_307.elements[i];
elementDisabled=_308.disabled;
elementName=_308.name;
elementValue=_308.value;
if(!elementDisabled&&elementName){
switch(_308.type){
case "select-one":
case "select-multiple":
for(var j=0;j<_308.options.length;j++){
if(_308.options[j].selected){
if(window.ActiveXObject){
_30a=$C.getFormQueryString.processFormData(_30a,_306,elementName,_308.options[j].attributes["value"].specified?_308.options[j].value:_308.options[j].text);
}else{
_30a=$C.getFormQueryString.processFormData(_30a,_306,elementName,_308.options[j].hasAttribute("value")?_308.options[j].value:_308.options[j].text);
}
}
}
break;
case "radio":
case "checkbox":
if(_308.checked){
_30a=$C.getFormQueryString.processFormData(_30a,_306,elementName,elementValue);
}
break;
case "file":
case undefined:
case "reset":
case "button":
break;
case "submit":
if(_309==false){
_30a=$C.getFormQueryString.processFormData(_30a,_306,elementName,elementValue);
_309=true;
}
break;
case "textarea":
var _30d;
if(window.FCKeditorAPI&&(_30d=$C.objectCache[elementName])&&_30d.richtextid){
var _30e=FCKeditorAPI.GetInstance(_30d.richtextid);
if(_30e){
elementValue=_30e.GetXHTML();
}
}
_30a=$C.getFormQueryString.processFormData(_30a,_306,elementName,elementValue);
break;
default:
_30a=$C.getFormQueryString.processFormData(_30a,_306,elementName,elementValue);
break;
}
}
}
if(!_306){
_30a=_30a.substr(0,_30a.length-1);
}
return _30a;
};
$C.getFormQueryString.processFormData=function(_30f,_310,_311,_312){
if(_310){
if(_30f[_311]){
_30f[_311]+=","+_312;
}else{
_30f[_311]=_312;
}
}else{
_30f+=encodeURIComponent(_311)+"="+encodeURIComponent(_312)+"&";
}
return _30f;
};
$A.importTag=function(_313){
$C.importedTags.push(_313);
};
$A.checkImportedTag=function(_314){
var _315=false;
for(var i=0;i<$C.importedTags.length;i++){
if($C.importedTags[i]==_314){
_315=true;
break;
}
}
if(!_315){
$C.handleError(null,"ajax.checkimportedtag.error","widget",[_314]);
}
};
$C.getElementValue=function(_317,_318,_319){
if(!_317){
$C.handleError(null,"getelementvalue.noelementname","bind",null,null,null,true);
return;
}
if(!_319){
_319="value";
}
var _31a=$B.getBindElementValue(_317,_318,_319);
if(typeof (_31a)=="undefined"){
_31a=null;
}
if(_31a==null){
$C.handleError(null,"getelementvalue.elnotfound","bind",[_317,_319],null,null,true);
return;
}
return _31a;
};
$B.getBindElementValue=function(_31b,_31c,_31d,_31e,_31f){
var _320="";
if(window[_31b]){
var _321=eval(_31b);
if(_321&&_321._cf_getAttribute){
_320=_321._cf_getAttribute(_31d);
return _320;
}
}
var _322=$C.objectCache[_31b];
if(_322&&_322._cf_getAttribute){
_320=_322._cf_getAttribute(_31d);
return _320;
}
var el=$D.getElement(_31b,_31c);
var _324=(el&&((!el.length&&el.length!=0)||(el.length&&el.length>0)||el.tagName=="SELECT"));
if(!_324&&!_31f){
$C.handleError(null,"bind.getbindelementvalue.elnotfound","bind",[_31b]);
return null;
}
if(el.tagName!="SELECT"){
if(el.length>1){
var _325=true;
for(var i=0;i<el.length;i++){
var _327=(el[i].getAttribute("type")=="radio"||el[i].getAttribute("type")=="checkbox");
if(!_327||(_327&&el[i].checked)){
if(!_325){
_320+=",";
}
_320+=$B.getBindElementValue.extract(el[i],_31d);
_325=false;
}
}
}else{
_320=$B.getBindElementValue.extract(el,_31d);
}
}else{
var _325=true;
for(var i=0;i<el.options.length;i++){
if(el.options[i].selected){
if(!_325){
_320+=",";
}
_320+=$B.getBindElementValue.extract(el.options[i],_31d);
_325=false;
}
}
}
if(typeof (_320)=="object"){
$C.handleError(null,"bind.getbindelementvalue.simplevalrequired","bind",[_31b,_31d]);
return null;
}
if(_31e&&$C.required[_31b]&&_320.length==0){
return null;
}
return _320;
};
$B.getBindElementValue.extract=function(el,_329){
var _32a=el[_329];
if((_32a==null||typeof (_32a)=="undefined")&&el.getAttribute){
_32a=el.getAttribute(_329);
}
return _32a;
};
$L.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(_32b){
var _32c=_32b.category;
return "<p>"+"<span class='"+_32c+"'>"+_32c+"</span>:<i>"+_32b.source+"</i>: "+_32b.msg+"</p>";
};
var _32d=new YAHOO.widget.LogReader(null,{width:"30em",fontSize:"100%"});
_32d.setTitle(CFMessage["log.title"]||"ColdFusion AJAX Logger");
_32d._btnCollapse.value=CFMessage["log.collapse"]||"Collapse";
_32d._btnPause.value=CFMessage["log.pause"]||"Pause";
_32d._btnClear.value=CFMessage["log.clear"]||"Clear";
$L.isAvailable=true;
}
};
$L.log=function(_32e,_32f,_330,_331){
if(!$L.isAvailable){
return;
}
if(!_330){
_330="global";
}
_330=CFMessage[_330]||_330;
_32f=CFMessage[_32f]||_32f;
_32e=$L.format(_32e,_331);
YAHOO.log(_32e,_32f,_330);
};
$L.format=function(code,_333){
var msg=CFMessage[code]||code;
if(_333){
for(i=0;i<_333.length;i++){
if(!_333[i].length){
_333[i]="";
}
var _335="{"+i+"}";
msg=msg.replace(_335,_333[i]);
}
}
return msg;
};
$L.debug=function(_336,_337,_338){
$L.log(_336,"debug",_337,_338);
};
$L.info=function(_339,_33a,_33b){
$L.log(_339,"info",_33a,_33b);
};
$L.error=function(_33c,_33d,_33e){
$L.log(_33c,"error",_33d,_33e);
};
$L.dump=function(_33f,_340){
if($L.isAvailable){
var dump=(/string|number|undefined|boolean/.test(typeof (_33f))||_33f==null)?_33f:recurse(_33f,typeof _33f,true);
$L.debug(dump,_340);
}
};
$X.invoke=function(_342,_343,_344,_345){
var _346="method="+_343;
var _347=_342.returnFormat||"json";
_346+="&returnFormat="+_347;
if(_342.queryFormat){
_346+="&queryFormat="+_342.queryFormat;
}
if(_342.formId){
var _348=$C.getFormQueryString(_342.formId,true);
if(_344!=null){
for(prop in _348){
_344[prop]=_348[prop];
}
}else{
_344=_348;
}
_342.formId=null;
}
var _349="";
if(_344!=null){
_349=$X.JSON.encode(_344);
_346+="&argumentCollection="+encodeURIComponent(_349);
}
$L.info("ajaxproxy.invoke.invoking","http",[_342.cfcPath,_343,_349]);
if(_342.callHandler){
_342.callHandler.call(null,_342.callHandlerParams,_342.cfcPath,_346);
return;
}
var _34a;
if(_342.async){
_34a=function(req){
$X.callback(req,_342,_345);
};
}
var req=$A.sendMessage(_342.cfcPath,_342.httpMethod,_346,_342.async,_34a,null,true);
if(!_342.async){
return $X.processResponse(req,_342);
}
};
$X.callback=function(req,_34e,_34f){
if($A.isRequestError(req)){
$C.handleError(_34e.errorHandler,"ajaxproxy.invoke.error","http",[req.status,_34e.cfcPath,req.statusText],req.status,req.statusText);
}else{
if(_34e.callbackHandler){
var _350=$X.processResponse(req,_34e);
_34e.callbackHandler(_350,_34f);
}
}
};
$X.processResponse=function(req,_352){
var _353=true;
for(var i=0;i<req.responseText.length;i++){
var c=req.responseText.charAt(i);
_353=(c==" "||c=="\n"||c=="\t"||c=="\r");
if(!_353){
break;
}
}
var _356=(req.responseXML&&req.responseXML.childNodes.length>0);
var _357=_356?"[XML Document]":req.responseText;
$L.info("ajaxproxy.invoke.response","http",[_357]);
var _358;
var _359=_352.returnFormat||"json";
if(_359=="json"){
_358=_353?null:$X.JSON.decode(req.responseText);
}else{
_358=_356?req.responseXML:(_353?null:req.responseText);
}
return _358;
};
$X.init=function(_35a,_35b){
var _35c=_35b.split(".");
var ns=self;
for(i=0;i<_35c.length-1;i++){
if(_35c[i].length){
ns[_35c[i]]=ns[_35c[i]]||{};
ns=ns[_35c[i]];
}
}
var _35e=_35c[_35c.length-1];
if(ns[_35e]){
return ns[_35e];
}
ns[_35e]=function(){
this.httpMethod="GET";
this.async=false;
this.callbackHandler=null;
this.errorHandler=null;
this.formId=null;
};
ns[_35e].prototype.cfcPath=_35a;
ns[_35e].prototype.setHTTPMethod=function(_35f){
if(_35f){
_35f=_35f.toUpperCase();
}
if(_35f!="GET"&&_35f!="POST"){
$C.handleError(null,"ajaxproxy.sethttpmethod.invalidmethod","http",[_35f],null,null,true);
}
this.httpMethod=_35f;
};
ns[_35e].prototype.setSyncMode=function(){
this.async=false;
};
ns[_35e].prototype.setAsyncMode=function(){
this.async=true;
};
ns[_35e].prototype.setCallbackHandler=function(fn){
this.callbackHandler=fn;
this.setAsyncMode();
};
ns[_35e].prototype.setErrorHandler=function(fn){
this.errorHandler=fn;
this.setAsyncMode();
};
ns[_35e].prototype.setForm=function(fn){
this.formId=fn;
};
ns[_35e].prototype.setQueryFormat=function(_363){
if(_363){
_363=_363.toLowerCase();
}
if(!_363||(_363!="column"&&_363!="row")){
$C.handleError(null,"ajaxproxy.setqueryformat.invalidformat","http",[_363],null,null,true);
}
this.queryFormat=_363;
};
ns[_35e].prototype.setReturnFormat=function(_364){
if(_364){
_364=_364.toLowerCase();
}
if(!_364||(_364!="plain"&&_364!="json"&&_364!="wddx")){
$C.handleError(null,"ajaxproxy.setreturnformat.invalidformat","http",[_364],null,null,true);
}
this.returnFormat=_364;
};
$L.info("ajaxproxy.init.created","http",[_35a]);
return ns[_35e];
};
$U.isWhitespace=function(s){
var _366=true;
for(var i=0;i<s.length;i++){
var c=s.charAt(i);
_366=(c==" "||c=="\n"||c=="\t"||c=="\r");
if(!_366){
break;
}
}
return _366;
};
$U.getFirstNonWhitespaceIndex=function(s){
var _36a=true;
for(var i=0;i<s.length;i++){
var c=s.charAt(i);
_36a=(c==" "||c=="\n"||c=="\t"||c=="\r");
if(!_36a){
break;
}
}
return i;
};
$C.trim=function(_36d){
return _36d.replace(/^\s+|\s+$/g,"");
};
$U.isInteger=function(n){
var _36f=true;
if(typeof (n)=="number"){
_36f=(n>=0);
}else{
for(i=0;i<n.length;i++){
if($U.isInteger.numberChars.indexOf(n.charAt(i))==-1){
_36f=false;
break;
}
}
}
return _36f;
};
$U.isInteger.numberChars="0123456789";
$U.isArray=function(a){
return (typeof (a.length)=="number"&&!a.toUpperCase);
};
$U.isBoolean=function(b){
if(b===true||b===false){
return true;
}else{
if(b.toLowerCase){
b=b.toLowerCase();
return (b==$U.isBoolean.trueChars||b==$U.isBoolean.falseChars);
}else{
return false;
}
}
};
$U.isBoolean.trueChars="true";
$U.isBoolean.falseChars="false";
$U.castBoolean=function(b){
if(b===true){
return true;
}else{
if(b===false){
return false;
}else{
if(b.toLowerCase){
b=b.toLowerCase();
if(b==$U.isBoolean.trueChars){
return true;
}else{
if(b==$U.isBoolean.falseChars){
return false;
}else{
return false;
}
}
}else{
return false;
}
}
}
};
$U.checkQuery=function(o){
var _374=null;
if(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])))){
_374="row";
}else{
if(o&&o.COLUMNS&&$U.isArray(o.COLUMNS)&&o.ROWCOUNT&&$U.isInteger(o.ROWCOUNT)&&o.DATA){
_374="col";
for(var i=0;i<o.COLUMNS.length;i++){
var _376=o.DATA[o.COLUMNS[i]];
if(!_376||!$U.isArray(_376)){
_374=null;
break;
}
}
}
}
return _374;
};
$X.JSON=new function(){
var _377={}.hasOwnProperty?true:false;
var _378=/^("(\\.|[^"\\\n\r])*?"|[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t])+?$/;
var pad=function(n){
return n<10?"0"+n:n;
};
var m={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","\"":"\\\"","\\":"\\\\"};
var _37c=function(s){
if(/["\\\x00-\x1f]/.test(s)){
return "\""+s.replace(/([\x00-\x1f\\"])/g,function(a,b){
var c=m[b];
if(c){
return c;
}
c=b.charCodeAt();
return "\\u00"+Math.floor(c/16).toString(16)+(c%16).toString(16);
})+"\"";
}
return "\""+s+"\"";
};
var _381=function(o){
var a=["["],b,i,l=o.length,v;
for(i=0;i<l;i+=1){
v=o[i];
switch(typeof v){
case "undefined":
case "function":
case "unknown":
break;
default:
if(b){
a.push(",");
}
a.push(v===null?"null":$X.JSON.encode(v));
b=true;
}
}
a.push("]");
return a.join("");
};
var _384=function(o){
return "\""+o.getFullYear()+"-"+pad(o.getMonth()+1)+"-"+pad(o.getDate())+"T"+pad(o.getHours())+":"+pad(o.getMinutes())+":"+pad(o.getSeconds())+"\"";
};
this.encode=function(o){
if(typeof o=="undefined"||o===null){
return "null";
}else{
if(o instanceof Array){
return _381(o);
}else{
if(o instanceof Date){
return _384(o);
}else{
if(typeof o=="string"){
return _37c(o);
}else{
if(typeof o=="number"){
return isFinite(o)?String(o):"null";
}else{
if(typeof o=="boolean"){
return String(o);
}else{
var a=["{"],b,i,v;
for(var i in o){
if(!_377||o.hasOwnProperty(i)){
v=o[i];
switch(typeof v){
case "undefined":
case "function":
case "unknown":
break;
default:
if(b){
a.push(",");
}
a.push(this.encode(i),":",v===null?"null":this.encode(v));
b=true;
}
}
}
a.push("}");
return a.join("");
}
}
}
}
}
}
};
this.decode=function(json){
if($U.isWhitespace(json)){
return null;
}
var _38a=$U.getFirstNonWhitespaceIndex(json);
if(_38a>0){
json=json.slice(_38a);
}
if(window._cf_jsonprefix&&json.indexOf(_cf_jsonprefix)==0){
json=json.slice(_cf_jsonprefix.length);
}
try{
if(_378.test(json)){
return eval("("+json+")");
}
}
catch(e){
}
throw new SyntaxError("parseJSON");
};
}();
if(!$C.JSON){
$C.JSON={};
}
$C.JSON.encode=$X.JSON.encode;
$C.JSON.decode=$X.JSON.decode;
$C.navigate=function(url,_38c,_38d,_38e,_38f,_390){
if(url==null){
$C.handleError(_38e,"navigate.urlrequired","widget");
return;
}
if(_38f){
_38f=_38f.toUpperCase();
if(_38f!="GET"&&_38f!="POST"){
$C.handleError(null,"navigate.invalidhttpmethod","http",[_38f],null,null,true);
}
}else{
_38f="GET";
}
var _391;
if(_390){
_391=$C.getFormQueryString(_390);
if(_391==-1){
$C.handleError(null,"navigate.formnotfound","http",[_390],null,null,true);
}
}
if(_38c==null){
if(_391){
if(url.indexOf("?")==-1){
url+="?"+_391;
}else{
url+="&"+_391;
}
}
$L.info("navigate.towindow","widget",[url]);
window.location.replace(url);
return;
}
$L.info("navigate.tocontainer","widget",[url,_38c]);
var obj=$C.objectCache[_38c];
if(obj!=null){
if(typeof (obj._cf_body)!="undefined"&&obj._cf_body!=null){
_38c=obj._cf_body;
}
}
$A.replaceHTML(_38c,url,_38f,_391,_38d,_38e);
};
$A.checkForm=function(_393,_394,_395,_396,_397){
var _398=_394.call(null,_393);
if(_398==false){
return false;
}
var _399=$C.getFormQueryString(_393);
$L.info("ajax.submitform.submitting","http",[_393.name]);
$A.replaceHTML(_395,_393.action,_393.method,_399,_396,_397);
return false;
};
$A.replaceHTML=function(_39a,url,_39c,_39d,_39e,_39f){
var _3a0=document.getElementById(_39a);
if(!_3a0){
$C.handleError(_39f,"ajax.replacehtml.elnotfound","http",[_39a]);
return;
}
var _3a1="_cf_containerId="+encodeURIComponent(_39a);
_39d=(_39d)?_39d+"&"+_3a1:_3a1;
$L.info("ajax.replacehtml.replacing","http",[_39a,url,_39d]);
if(_cf_loadingtexthtml){
try{
_3a0.innerHTML=_cf_loadingtexthtml;
}
catch(e){
}
}
var _3a2=function(req,_3a4){
var _3a5=false;
if($A.isRequestError(req)){
$C.handleError(_39f,"ajax.replacehtml.error","http",[req.status,_3a4.id,req.statusText],req.status,req.statusText);
_3a5=true;
}
var _3a6=new $E.CustomEvent("onReplaceHTML",_3a4);
var _3a7=new $E.CustomEvent("onReplaceHTMLUser",_3a4);
$E.loadEvents[_3a4.id]={system:_3a6,user:_3a7};
if(req.responseText.search(/<script/i)!=-1){
try{
_3a4.innerHTML="";
}
catch(e){
}
$A.replaceHTML.processResponseText(req.responseText,_3a4,_39f);
}else{
try{
_3a4.innerHTML=req.responseText;
}
catch(e){
}
}
$E.loadEvents[_3a4.id]=null;
_3a6.fire();
_3a6.unsubscribe();
_3a7.fire();
_3a7.unsubscribe();
$L.info("ajax.replacehtml.success","http",[_3a4.id]);
if(_39e&&!_3a5){
_39e();
}
};
try{
$A.sendMessage(url,_39c,_39d,true,_3a2,_3a0);
}
catch(e){
try{
_3a0.innerHTML=$L.format(CFMessage["ajax.replacehtml.connectionerrordisplay"],[url,e]);
}
catch(e){
}
$C.handleError(_39f,"ajax.replacehtml.connectionerror","http",[_39a,url,e]);
}
};
$A.replaceHTML.processResponseText=function(text,_3a9,_3aa){
var pos=0;
var _3ac=0;
var _3ad=0;
_3a9._cf_innerHTML="";
while(pos<text.length){
var _3ae=text.indexOf("<s",pos);
if(_3ae==-1){
_3ae=text.indexOf("<S",pos);
}
if(_3ae==-1){
break;
}
pos=_3ae;
var _3af=true;
var _3b0=$A.replaceHTML.processResponseText.scriptTagChars;
for(var i=1;i<_3b0.length;i++){
var _3b2=pos+i+1;
if(_3b2>text.length){
break;
}
var _3b3=text.charAt(_3b2);
if(_3b0[i][0]!=_3b3&&_3b0[i][1]!=_3b3){
pos+=i+1;
_3af=false;
break;
}
}
if(!_3af){
continue;
}
var _3b4=text.substring(_3ac,pos);
if(_3b4){
_3a9._cf_innerHTML+=_3b4;
}
var _3b5=text.indexOf(">",pos)+1;
if(_3b5==0){
pos++;
continue;
}else{
pos+=7;
}
var _3b6=_3b5;
while(_3b6<text.length&&_3b6!=-1){
_3b6=text.indexOf("</s",_3b6);
if(_3b6==-1){
_3b6=text.indexOf("</S",_3b6);
}
if(_3b6!=-1){
_3af=true;
for(var i=1;i<_3b0.length;i++){
var _3b2=_3b6+2+i;
if(_3b2>text.length){
break;
}
var _3b3=text.charAt(_3b2);
if(_3b0[i][0]!=_3b3&&_3b0[i][1]!=_3b3){
_3b6=_3b2;
_3af=false;
break;
}
}
if(_3af){
break;
}
}
}
if(_3b6!=-1){
var _3b7=text.substring(_3b5,_3b6);
var _3b8=_3b7.indexOf("<!--");
if(_3b8!=-1){
_3b7=_3b7.substring(_3b8+4);
}
var _3b9=_3b7.lastIndexOf("//-->");
if(_3b9!=-1){
_3b7=_3b7.substring(0,_3b9-1);
}
if(_3b7.indexOf("document.write")!=-1){
_3b7="var _cfDomNode = document.getElementById('"+_3a9.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);}};};"+_3b7+";_cfDomNode._cf_innerHTML += _cfBuffer; _cfBuffer=null;";
}
try{
eval(_3b7);
}
catch(ex){
$C.handleError(_3aa,"ajax.replacehtml.jserror","http",[_3a9.id,ex]);
}
}
_3ae=text.indexOf(">",_3b6)+1;
if(_3ae==0){
_3ad=_3b6+1;
break;
}
_3ad=_3ae;
pos=_3ae;
_3ac=_3ae;
}
if(_3ad<text.length-1){
var _3b4=text.substring(_3ad,text.length);
if(_3b4){
_3a9._cf_innerHTML+=_3b4;
}
}
try{
_3a9.innerHTML=_3a9._cf_innerHTML;
}
catch(e){
}
_3a9._cf_innerHTML="";
};
$A.replaceHTML.processResponseText.scriptTagChars=[["s","S"],["c","C"],["r","R"],["i","I"],["p","P"],["t","T"]];
$D.getElement=function(_3ba,_3bb){
var _3bc=function(_3bd){
return (_3bd.name==_3ba||_3bd.id==_3ba);
};
var _3be=$D.getElementsBy(_3bc,null,_3bb);
if(_3be.length==1){
return _3be[0];
}else{
return _3be;
}
};
$D.getElementsBy=function(_3bf,tag,root){
tag=tag||"*";
var _3c2=[];
if(root){
root=$D.get(root);
if(!root){
return _3c2;
}
}else{
root=document;
}
var _3c3=root.getElementsByTagName(tag);
if(!_3c3.length&&(tag=="*"&&root.all)){
_3c3=root.all;
}
for(var i=0,len=_3c3.length;i<len;++i){
if(_3bf(_3c3[i])){
_3c2[_3c2.length]=_3c3[i];
}
}
return _3c2;
};
$D.get=function(el){
if(!el){
return null;
}
if(typeof el!="string"&&!(el instanceof Array)){
return el;
}
if(typeof el=="string"){
return document.getElementById(el);
}else{
var _3c6=[];
for(var i=0,len=el.length;i<len;++i){
_3c6[_3c6.length]=$D.get(el[i]);
}
return _3c6;
}
return null;
};
$E.loadEvents={};
$E.CustomEvent=function(_3c8,_3c9){
return {name:_3c8,domNode:_3c9,subs:[],subscribe:function(func,_3cb){
var dup=false;
for(var i=0;i<this.subs.length;i++){
var sub=this.subs[i];
if(sub.f==func&&sub.p==_3cb){
dup=true;
break;
}
}
if(!dup){
this.subs.push({f:func,p:_3cb});
}
},fire:function(){
for(var i=0;i<this.subs.length;i++){
var sub=this.subs[i];
sub.f.call(null,this,sub.p);
}
},unsubscribe:function(){
this.subscribers=[];
}};
};
$E.windowLoadImpEvent=new $E.CustomEvent("cfWindowLoadImp");
$E.windowLoadEvent=new $E.CustomEvent("cfWindowLoad");
$E.windowLoadUserEvent=new $E.CustomEvent("cfWindowLoadUser");
$E.listeners=[];
$E.addListener=function(el,ev,fn,_3d4){
var l={el:el,ev:ev,fn:fn,params:_3d4};
$E.listeners.push(l);
var _3d6=function(e){
if(!e){
var e=window.event;
}
fn.call(null,e,_3d4);
};
if(el.addEventListener){
el.addEventListener(ev,_3d6,false);
return true;
}else{
if(el.attachEvent){
el.attachEvent("on"+ev,_3d6);
return true;
}else{
return false;
}
}
};
$E.isListener=function(el,ev,fn,_3db){
var _3dc=false;
var ls=$E.listeners;
for(var i=0;i<ls.length;i++){
if(ls[i].el==el&&ls[i].ev==ev&&ls[i].fn==fn&&ls[i].params==_3db){
_3dc=true;
break;
}
}
return _3dc;
};
$E.callBindHandlers=function(id,_3e0,ev){
var el=document.getElementById(id);
if(!el){
return;
}
var ls=$E.listeners;
for(var i=0;i<ls.length;i++){
if(ls[i].el==el&&ls[i].ev==ev&&ls[i].fn._cf_bindhandler){
ls[i].fn.call(null,null,ls[i].params);
}
}
};
$E.registerOnLoad=function(func,_3e6,_3e7,user){
if($E.registerOnLoad.windowLoaded){
if(_3e6&&_3e6._cf_containerId&&$E.loadEvents[_3e6._cf_containerId]){
if(user){
$E.loadEvents[_3e6._cf_containerId].user.subscribe(func,_3e6);
}else{
$E.loadEvents[_3e6._cf_containerId].system.subscribe(func,_3e6);
}
}else{
func.call(null,null,_3e6);
}
}else{
if(user){
$E.windowLoadUserEvent.subscribe(func,_3e6);
}else{
if(_3e7){
$E.windowLoadImpEvent.subscribe(func,_3e6);
}else{
$E.windowLoadEvent.subscribe(func,_3e6);
}
}
}
};
$E.registerOnLoad.windowLoaded=false;
$E.onWindowLoad=function(fn){
if(window.addEventListener){
window.addEventListener("load",fn,false);
}else{
if(window.attachEvent){
window.attachEvent("onload",fn);
}else{
if(document.getElementById){
window.onload=fn;
}
}
}
};
$C.addSpanToDom=function(){
var _3ea=document.createElement("span");
document.body.insertBefore(_3ea,document.body.firstChild);
};
$E.windowLoadHandler=function(e){
if(window.Ext){
Ext.BLANK_IMAGE_URL=_cf_contextpath+"/CFIDE/scripts/ajax/resources/ext/images/default/s.gif";
}
$C.addSpanToDom();
$L.init();
$E.registerOnLoad.windowLoaded=true;
$E.windowLoadImpEvent.fire();
$E.windowLoadImpEvent.unsubscribe();
$E.windowLoadEvent.fire();
$E.windowLoadEvent.unsubscribe();
$E.windowLoadUserEvent.fire();
$E.windowLoadUserEvent.unsubscribe();
};
$E.onWindowLoad($E.windowLoadHandler);
$B.register=function(_3ec,_3ed,_3ee,_3ef){
for(var i=0;i<_3ec.length;i++){
var _3f1=_3ec[i][0];
var _3f2=_3ec[i][1];
var _3f3=_3ec[i][2];
if(window[_3f1]){
var _3f4=eval(_3f1);
if(_3f4&&_3f4._cf_register){
_3f4._cf_register(_3f3,_3ee,_3ed);
continue;
}
}
var _3f5=$C.objectCache[_3f1];
if(_3f5&&_3f5._cf_register){
_3f5._cf_register(_3f3,_3ee,_3ed);
continue;
}
var _3f6=$D.getElement(_3f1,_3f2);
var _3f7=(_3f6&&((!_3f6.length&&_3f6.length!=0)||(_3f6.length&&_3f6.length>0)||_3f6.tagName=="SELECT"));
if(!_3f7){
$C.handleError(null,"bind.register.elnotfound","bind",[_3f1]);
}
if(_3f6.length>1&&!_3f6.options){
for(var i=0;i<_3f6.length;i++){
$B.register.addListener(_3f6[i],_3f3,_3ee,_3ed);
}
}else{
$B.register.addListener(_3f6,_3f3,_3ee,_3ed);
}
}
if(!$C.bindHandlerCache[_3ed.bindTo]&&typeof (_3ed.bindTo)=="string"){
$C.bindHandlerCache[_3ed.bindTo]=function(){
_3ee.call(null,null,_3ed);
};
}
if(_3ef){
_3ee.call(null,null,_3ed);
}
};
$B.register.addListener=function(_3f8,_3f9,_3fa,_3fb){
if(!$E.isListener(_3f8,_3f9,_3fa,_3fb)){
$E.addListener(_3f8,_3f9,_3fa,_3fb);
}
};
$B.assignValue=function(_3fc,_3fd,_3fe,_3ff){
if(!_3fc){
return;
}
if(_3fc.call){
_3fc.call(null,_3fe,_3ff);
return;
}
var _400=$C.objectCache[_3fc];
if(_400&&_400._cf_setValue){
_400._cf_setValue(_3fe);
return;
}
var _401=document.getElementById(_3fc);
if(!_401){
$C.handleError(null,"bind.assignvalue.elnotfound","bind",[_3fc]);
}
if(_401.tagName=="SELECT"){
var _402=$U.checkQuery(_3fe);
var _403=$C.objectCache[_3fc];
if(_402){
if(!_403||(_403&&(!_403.valueCol||!_403.displayCol))){
$C.handleError(null,"bind.assignvalue.selboxmissingvaldisplay","bind",[_3fc]);
return;
}
}else{
if(typeof (_3fe.length)=="number"&&!_3fe.toUpperCase){
if(_3fe.length>0&&(typeof (_3fe[0].length)!="number"||_3fe[0].toUpperCase)){
$C.handleError(null,"bind.assignvalue.selboxerror","bind",[_3fc]);
return;
}
}else{
$C.handleError(null,"bind.assignvalue.selboxerror","bind",[_3fc]);
return;
}
}
_401.options.length=0;
if(!_402){
for(var i=0;i<_3fe.length;i++){
var opt=new Option(_3fe[i][1],_3fe[i][0]);
_401.options[i]=opt;
}
}else{
if(_402=="col"){
var _406=_3fe.DATA[_403.valueCol];
var _407=_3fe.DATA[_403.displayCol];
if(!_406||!_407){
$C.handleError(null,"bind.assignvalue.selboxinvalidvaldisplay","bind",[_3fc]);
return;
}
for(var i=0;i<_406.length;i++){
var opt=new Option(_407[i],_406[i]);
_401.options[i]=opt;
}
}else{
if(_402=="row"){
var _408=-1;
var _409=-1;
for(var i=0;i<_3fe.COLUMNS.length;i++){
var col=_3fe.COLUMNS[i];
if(col==_403.valueCol){
_408=i;
}
if(col==_403.displayCol){
_409=i;
}
if(_408!=-1&&_409!=-1){
break;
}
}
if(_408==-1||_409==-1){
$C.handleError(null,"bind.assignvalue.selboxinvalidvaldisplay","bind",[_3fc]);
return;
}
for(var i=0;i<_3fe.DATA.length;i++){
var opt=new Option(_3fe.DATA[i][_409],_3fe.DATA[i][_408]);
_401.options[i]=opt;
}
}
}
}
}else{
_401[_3fd]=_3fe;
}
$E.callBindHandlers(_3fc,null,"change");
$L.info("bind.assignvalue.success","bind",[_3fe,_3fc,_3fd]);
};
$B.localBindHandler=function(e,_40c){
var _40d=document.getElementById(_40c.bindTo);
var _40e=$B.evaluateBindTemplate(_40c,true);
$B.assignValue(_40c.bindTo,_40c.bindToAttr,_40e);
};
$B.localBindHandler._cf_bindhandler=true;
$B.evaluateBindTemplate=function(_40f,_410,_411,_412){
var _413=_40f.bindExpr;
var _414="";
for(var i=0;i<_413.length;i++){
if(typeof (_413[i])=="object"){
var _416=$B.getBindElementValue(_413[i][0],_413[i][1],_413[i][2],_410,_412);
if(_416==null){
if(_410){
_414="";
break;
}else{
_416="";
}
}
if(_411){
_416=encodeURIComponent(_416);
}
_414+=_416;
}else{
_414+=_413[i];
}
}
return _414;
};
$B.jsBindHandler=function(e,_418){
var _419=_418.bindExpr;
var _41a=_418.callFunction+"(";
for(var i=0;i<_419.length;i++){
var _41c;
if(typeof (_419[i])=="object"){
_41c=$B.getBindElementValue(_419[i][0],_419[i][1],_419[i][2],false);
}else{
_41c=_419[i];
}
if(_41c&&_41c.replace){
_41c=_41c.replace(/\\/g,"\\\\");
_41c=_41c.replace(/\'/g,"\\'");
_41c=_41c.replace(/\r\n/g,"\\r\\n");
_41c=_41c.replace(/\n/g,"\\n");
_41c=_41c.replace(/\r/g,"\\r");
}
if(i!=0){
_41a+=",";
}
_41a+="'"+_41c+"'";
}
_41a+=")";
$L.info("bind.jsbindhandler.invoking","bind",[_41a]);
var _41d=eval(_41a);
$B.assignValue(_418.bindTo,_418.bindToAttr,_41d,_418.bindToParams);
};
$B.jsBindHandler._cf_bindhandler=true;
$B.urlBindHandler=function(e,_41f){
var _420=_41f.bindTo;
if($C.objectCache[_420]&&$C.objectCache[_420]._cf_visible===false){
$C.objectCache[_420]._cf_dirtyview=true;
return;
}
var url=$B.evaluateBindTemplate(_41f,false,true);
if(_41f.bindToAttr){
var _41f={"bindTo":_41f.bindTo,"bindToAttr":_41f.bindToAttr,"bindToParams":_41f.bindToParams,"errorHandler":_41f.errorHandler,"url":url};
try{
$A.sendMessage(url,"GET",null,true,$B.urlBindHandler.callback,_41f);
}
catch(e){
$C.handleError(_41f.errorHandler,"ajax.urlbindhandler.connectionerror","http",[url,e]);
}
}else{
$A.replaceHTML(_420,url,null,null,null,_41f.errorHandler);
}
};
$B.urlBindHandler._cf_bindhandler=true;
$B.urlBindHandler.callback=function(req,_423){
if($A.isRequestError(req)){
$C.handleError(_423.errorHandler,"bind.urlbindhandler.httperror","http",[req.status,_423.url,req.statusText],req.status,req.statusText);
}else{
$L.info("bind.urlbindhandler.response","http",[req.responseText]);
var _424;
try{
_424=$X.JSON.decode(req.responseText);
}
catch(e){
$C.handleError(_423.errorHandler,"bind.urlbindhandler.jsonerror","http",[req.responseText]);
}
$B.assignValue(_423.bindTo,_423.bindToAttr,_424,_423.bindToParams);
}
};
$A.initSelect=function(_425,_426,_427){
$C.objectCache[_425]={"valueCol":_426,"displayCol":_427};
};
$S.setupSpry=function(){
if(typeof (Spry)!="undefined"&&Spry.Data){
Spry.Data.DataSet.prototype._cf_getAttribute=function(_428){
var val;
var row=this.getCurrentRow();
if(row){
val=row[_428];
}
return val;
};
Spry.Data.DataSet.prototype._cf_register=function(_42b,_42c,_42d){
var obs={bindParams:_42d};
obs.onCurrentRowChanged=function(){
_42c.call(null,null,this.bindParams);
};
obs.onDataChanged=function(){
_42c.call(null,null,this.bindParams);
};
this.addObserver(obs);
};
if(Spry.Debug.trace){
var _42f=Spry.Debug.trace;
Spry.Debug.trace=function(str){
$L.info(str,"spry");
_42f(str);
};
}
if(Spry.Debug.reportError){
var _431=Spry.Debug.reportError;
Spry.Debug.reportError=function(str){
$L.error(str,"spry");
_431(str);
};
}
$L.info("spry.setupcomplete","bind");
}
};
$E.registerOnLoad($S.setupSpry,null,true);
$S.bindHandler=function(_433,_434){
var url;
var _436="_cf_nodebug=true&_cf_nocache=true";
if(window._cf_clientid){
_436+="&_cf_clientid="+_cf_clientid;
}
var _437=window[_434.bindTo];
var _438=(typeof (_437)=="undefined");
if(_434.cfc){
var _439={};
var _43a=_434.bindExpr;
for(var i=0;i<_43a.length;i++){
var _43c;
if(_43a[i].length==2){
_43c=_43a[i][1];
}else{
_43c=$B.getBindElementValue(_43a[i][1],_43a[i][2],_43a[i][3],false,_438);
}
_439[_43a[i][0]]=_43c;
}
_439=$X.JSON.encode(_439);
_436+="&method="+_434.cfcFunction;
_436+="&argumentCollection="+encodeURIComponent(_439);
$L.info("spry.bindhandler.loadingcfc","http",[_434.bindTo,_434.cfc,_434.cfcFunction,_439]);
url=_434.cfc;
}else{
url=$B.evaluateBindTemplate(_434,false,true,_438);
$L.info("spry.bindhandler.loadingurl","http",[_434.bindTo,url]);
}
var _43d=_434.options||{};
if((_437&&_437._cf_type=="json")||_434.dsType=="json"){
_436+="&returnformat=json";
}
if(_437){
if(_437.requestInfo.method=="GET"){
_43d.method="GET";
if(url.indexOf("?")==-1){
url+="?"+_436;
}else{
url+="&"+_436;
}
}else{
_43d.postData=_436;
_43d.method="POST";
_437.setURL("");
}
_437.setURL(url,_43d);
_437.loadData();
}else{
if(!_43d.method||_43d.method=="GET"){
if(url.indexOf("?")==-1){
url+="?"+_436;
}else{
url+="&"+_436;
}
}else{
_43d.postData=_436;
_43d.useCache=false;
}
var ds;
if(_434.dsType=="xml"){
ds=new Spry.Data.XMLDataSet(url,_434.xpath,_43d);
}else{
ds=new Spry.Data.JSONDataSet(url,_43d);
ds.preparseFunc=$S.preparseData;
}
ds._cf_type=_434.dsType;
var _43f={onLoadError:function(req){
$C.handleError(_434.errorHandler,"spry.bindhandler.error","http",[_434.bindTo,req.url,req.requestInfo.postData]);
}};
ds.addObserver(_43f);
window[_434.bindTo]=ds;
}
};
$S.bindHandler._cf_bindhandler=true;
$S.preparseData=function(ds,_442){
var _443=$U.getFirstNonWhitespaceIndex(_442);
if(_443>0){
_442=_442.slice(_443);
}
if(window._cf_jsonprefix&&_442.indexOf(_cf_jsonprefix)==0){
_442=_442.slice(_cf_jsonprefix.length);
}
return _442;
};
$P.init=function(_444){
$L.info("pod.init.creating","widget",[_444]);
var _445={};
_445._cf_body=_444+"_body";
$C.objectCache[_444]=_445;
};
$B.cfcBindHandler=function(e,_447){
var _448=(_447.httpMethod)?_447.httpMethod:"GET";
var _449={};
var _44a=_447.bindExpr;
for(var i=0;i<_44a.length;i++){
var _44c;
if(_44a[i].length==2){
_44c=_44a[i][1];
}else{
_44c=$B.getBindElementValue(_44a[i][1],_44a[i][2],_44a[i][3],false);
}
_449[_44a[i][0]]=_44c;
}
var _44d=function(_44e,_44f){
$B.assignValue(_44f.bindTo,_44f.bindToAttr,_44e,_44f.bindToParams);
};
var _450={"bindTo":_447.bindTo,"bindToAttr":_447.bindToAttr,"bindToParams":_447.bindToParams};
var _451={"async":true,"cfcPath":_447.cfc,"httpMethod":_448,"callbackHandler":_44d,"errorHandler":_447.errorHandler};
if(_447.proxyCallHandler){
_451.callHandler=_447.proxyCallHandler;
_451.callHandlerParams=_447;
}
$X.invoke(_451,_447.cfcFunction,_449,_450);
};
$B.cfcBindHandler._cf_bindhandler=true;
}
}
cfinit();

