
/*
Engine for Web Applications
Composite file "engcomp.js" release: 0.8
Copyright 2002, 2003. All Rights Reserved.
Rights to copy, archive, distribute, or alter this software are described in the license, available in "engine.license.txt".

Author: Stephen W. Cote
Email: wranlon@hotmail.com
*/


var $EPS=[],$EPI=[],$EPV="0.0.9.1205.2003";var $D={S:"string",O:"object",F:"function",U:"undefined",N:"number"};var data_undefined;$D.X=(typeof XMLHttpRequest!=$D.U?XMLHttpRequest:data_undefined);$D.A=(typeof ActiveXObject!=$D.U?ActiveXObject:data_undefined);function $EP(c){var a,i=0,s,w=window,o,l;o=w;if(typeof c==$D.S){if(!$EPI[c]){l=$EPS.length;$EPI[c]=l;$EPS[l]=c;}a=c.split(".");for(;i<a.length;){s=a[i++];if(typeof o[s]!=$D.O)o[s]={};o=o[s];}}}
function GetPackage(c){return ValidatePackage(c,1);}
function ValidatePackage(c,b){var a,i=0,s,w=window,o,l;o=w;if(typeof c==$D.S){a=c.split(".");l=a.length;if(l==0)return 0;for(;i<l;){s=a[i++];if(typeof o[s]!=$D.O)return 0;o=o[s];}}else{return 0;}if(b)return o;return 1;}
$EP("$E");$E={ci:{},gc:0,v:"0.1.40.1205.2003",h:
function(s){var i=c=0;for(;s&&i<s.length;++i){c=(c+s.charCodeAt(i)*(i+1))&0xFFFFFFFF;}return c.toString(16);},gnbid:
function(){var d=new String(parseInt(Math.random()*9999)).toString();for(i=d.length;i<4;i++)d="0"+d;return d;},guid:
function(){var _j=$E;var i=_j.gnbid()+"-"+_j.gnbid();var d=_j.h(new String(new Date().getTime()).toString())+"-"+_j.h(location.href)+"-"+i;return d;},merge:
function(o,n,s){var _j=$E;_j.ci[n]=s;_j.IM(o,n);}};$E.GG=function(){var d=new Date(),t,i=4,r,l,x=0;t=new String(d.getTime());r=new String(parseInt(Math.random()*(1000*i)));l=r.length;for(;x<i-l;x++)r="0"+r;return("swc-"+(++$E.gc)+"-"+t+"-"+r);}
$E.IM=function(o,s){var _js=$E,v,a=arguments,i;var n_a=[];for(i=1;i<a.length;i++)n_a[n_a.length]=a[i];v=_js.FN.apply(this.caller,n_a);if(typeof o==$D.O&&typeof v==$D.O){for(i in v)o[i]=v[i];}};$E.FN=function(s){var _js=$E,v,a=arguments;if(typeof _js.ci[s]==$D.S){eval("v="+_js.ci[s]);return v;}switch(s){case "code_object":return{code_name:a[1],ro:a[2],rno:a[3],po:a[4],pno:a[5],description:a[6]};break;case "service_object":return{service_id:$E.GG(),service_name:a[1],service_state:0,rc:a[2],pc:0,rd:0,pd:0,getResponseData:
function(){return this.pd;},code_name:a[3],handler:a[4],completed:0};break;case "engine_object":return{engine_element:a[1],engine_id:a[2],engine_name:a[3],engine_index:a[5],config_name:0,task:a[4],is_primary:0,eo:[],en:[],ei:[],getContainer:
function(){return this.engine_element;},getObjects:
function(){return this.eo;},getObject:
function(i){if(typeof this.ei[i]==$D.N&&typeof this.eo[this.ei[i]]==$D.O){return this.eo[this.ei[i]];}return 0;},isObject:
function(n){if(typeof n==$D.S&&typeof this.en[n]==$D.N&&typeof this.eo[this.en[n]]==$D.O){return 1;}return 0;},getObjectByName:
function(n){if(typeof n==$D.S&&typeof this.en[n]==$D.N&&typeof this.eo[this.en[n]]==$D.O){return this.eo[this.en[n]];}return 0;},pw:[],getPrimitiveWire:
function(i){if(typeof i==$D.S&&typeof this.pw[i]!=$D.U)return this.pw[i];return 0;},ds:0,setDataSource:
function(s){this.ds=s;},getDataSource:
function(){return this.ds;},dp:0,setDataPath:
function(s){this.dp=s;},getDataPath:
function(){return this.dp;},data_variant:[],setDataVariant:
function(i,v){if(typeof i==$D.N){this.data_variant[i]=v;return 1}return 0;},getDataVariant:
function(i){if(typeof i==$D.N&&typeof this.data_variant[i]!=$D.U){return this.data_variant[i];}return 0;}};break;case "task_object":return{task_state:0,handled:0,task_name:a[1],action_type:a[2],action:a[3],handler_type:a[4],handler:a[5],task_id:a[6],index:a[7],transaction_id:a[8],data:0,depends:[],executed:0,busy:0,ad:0,setAutoDestroy:
function(b){this.ad=(b?1:0);}};break;case "base_object":return{i:$E.GG(),getObjectId:
function(){return this.i;},t:a[1],getObjectType:
function(){return this.t;},v:a[2],getObjectVersion:
function(){return this.v;},r:0,getReadyState:
function(){return this.r;},getStatus:
function(){return this.o.s;},getPointers:
function(){return this.o.p;}};break;case "basic_message":return{entry:a[1],index:-1,data:a[2],time:new Date(),id:_js.GG()};break;case "basic_message_subscription":return{object:a[1],subscription_name:a[2],handler:a[3],target:a[4]};break;case "packet_object":return{packet_id:a[1],packet_name:a[2],participants:[],participant_count:0,packet_state:0,bst:0,btt:0,bet:0,serve_type:1,setBlockStartTransaction:
function(b){this.bst=(b?1:0);},setBlockServeTransaction:
function(b){this.btt=(b?1:0);},setBlockEndTransaction:
function(b){this.bet=(b?1:0);},setServeType:
function(i){this.btt=(!isNaN(i)?i:0);},st:0,sp:0,is_open:0,is_finalized:0,errors:0,owner_id:a[3],data:a[4],handler:a[5]};break;break;default:break;}return null;}
$EP("$E.dom");$E.dom.event={v:"0.0.12.1205.2003",_gevt:
function(o){return(typeof event==$D.O)?event:o;},_gevt_cancel:
function(o){(typeof o.preventDefault!=$D.F)?(o.returnValue=false):o.preventDefault();},_gevt_dest:
function(e){return(e.relatedTarget)?e.relatedTarget:e.toElement;},_gevt_org:
function(e){return(e.relatedTarget)?e.relatedTarget:e.fromElement;},_gevt_src:
function(o){var s=$E.dom.event._gevt(o);if(s==null){$E.message.MessageService.S("Bad event reference","515.3",1);return o;}return(s.target)?s.target:s.srcElement;},addEventBuffer:
function(o){var e="createHandler";try{o[e]=function(s,r,x,l){var b=(typeof r==$D.O&&r!=null?1:0),t=this,e,h,f;r=(b)?r:t;e="_prehandle_"+s;b=(l?1:0);h="f=function(){\n"+"try{\n"+"var o="+(b?'$E.registry.ObjectRegistry.getObject(\"'+r.i+'\")':"this")+";\n"+"if(typeof o!=\"object\"){alert('Object is invalid');return;}\no._handle_"+s+".apply(o,arguments);"+"}\ncatch(e){alert(r.i+\"::\"+s+\"::\"+(e.description?e.description:e.message));}\n"+"}";eval(h);if(!x)t[e]=f;return f;};}catch(e){alert("Error:"+e.description);}},addEventListener:
function(o,e,f,b){if(typeof o.addEventListener!=$D.U){o.addEventListener(e,f,b);}else if(typeof o.attachEvent!=$D.U){o.attachEvent("on"+e,f);}},removeEventListener:
function(o,e,f,b){if(typeof o.removeEventListener!=$D.U){o.removeEventListener(e,f,b);}else if(typeof o.detachEvent!=$D.U){o.detachEvent("on"+e,f);}},getAbsoluteTop:
function(o){return $E.dom.event.getAbsolutePosition(o,1);},getAbsoluteLeft:
function(o){return $E.dom.event.getAbsolutePosition(o,0);},getAbsolutePosition:
function(o,b){var c=o,i=0;while(c!=null&&!c.nodeName.match(/body/i)){i+=(b?(c.offsetTop?c.offsetTop:0):(c.offsetLeft?c.offsetLeft:0));c=c.offsetParent;}return i;}}
$EP("$E.util");$E.util={v:"0.0.3.1205.2003",getDate:
function(i){var d=new Date();return i?d:d.getTime();},EH:
function(e,h){if(typeof e==$D.O&&typeof e.getAttribute!=$D.U&&typeof e.getAttribute(h)==$D.S){try{eval(e.getAttribute(h));}catch(z){$E.message.MessageService.S("Error evaluating [engine]."+h+":"+(z.description?z.description:z.message),"515.4",1);}}}};$EP("$E.xml");$E.xml={v:"1.0.102.1205.2003",r:[],rm:[],ho:[],hu:0,hc:0,hs:5,hm:10,hp:0,he:1,newXmlDocument:
function(n){var r=0,e;if(!n)return 0;if(typeof document.implementation!=$D.U&&typeof document.implementation.createDocument!=$D.U){r=document.implementation.createDocument("",n,null);}else{r=new $D.A("MSXML.DOMDocument");e=r.createElement(n);r.appendChild(e);}return r;},clearCache:
function(){var _x=$E.xml,i=0,o;for(;i<_x.r.length;i++){o=_x.r[i];if(o.c&&typeof o.cd==$D.O){o.cd=0;}}},getXmlHttpArray:
function(){return $E.xml.ho;},R:
function(){var _x=$E.xml,i=0,o;_x.hp=1;_x.hu=0;_x.ho=[];_x.hc=_x.hs;for(;i<_x.hs;i++){o=_x.ho[i]=_x.O(1,i);}},testXmlHttpObject:
function(){return $E.xml.O(null,null,1);},O:
function(b,i,z){var o=null,v,f,_m=$E.message.MessageService;if(typeof $D.X!=$D.U){o=new $D.X();if(z)return 1;}else if(typeof $D.A!=$D.U){try{o=new $D.A("MSXML2.XMLHTTP.3.0");if(z)return 1;}catch(e){_m.S("XMLError:"+(e.description?e.description:e.message),"512.4",(z?1:0));}if(z)return 0;}if(b&&typeof i==$D.N){v={o:o,u:0,i:i,v:-1,h:0};try{if(typeof $D.X!=$D.U&&o instanceof $D.X){v.h=function(){$E.xml.L(i);};o.addEventListener("load",v.h,false);}else if(typeof $D.A!=$D.U&&o instanceof $D.A){v.h=function(){$E.xml.S(i);};o.onreadystatechange=v.h;}}catch(e){_m.S("Error in X:"+(e.description?e.description:e.message),"512.4",1);}return v;}else{return o;}},P:
function(i){var _x=$E.xml,b=0,o,a;a=_x.ho;if(typeof a[i]==$D.O){o=a[i];if(o.i>=_x.hs){a[i]=null;}else{o.u=0;o.v=-1;o.o.abort();if(typeof $D.A!=$D.U&&o.o instanceof $D.A){o.o.onreadystatechange=o.h;}}_x.hu--;}return 1;},G:
function(){var _x=$E.xml,i=0,b=0,o,a,_m=$E.message.MessageService,n=-1;if(!_x.hp)_x.R();a=_x.ho;for(;i<a.length;i++){if(typeof a[i]==$D.O&&typeof a[i].u==$D.N&&!a[i].u){a[i].u=1;b=i;break;}if(n==-1&&a[i]==null){n=i;}}if(b<0){b=(n>-1)?n:a.length;if(b<_x.hm){a[b]=_x.O(1,b);a[b].u=1;}else{_m.S("Max pool size reached!","200.4");b=0;}}if(b>-1){_x.hu++;return a[b];}return null;},L:
function(i){var _x=$E.xml,o,v,_m=$E.message.MessageService,z;try{if(_x.he&&typeof _x.ho[i]==$D.O){z=_x.ho[i].v;if(z==-1){_m.S("Invalid pool index for "+i,"200.4",1);return 0;}i=z;}if(typeof _x.rm[i]==$D.N){o=_x.r[_x.rm[i]];v={"xdom":null,"id":i};if(o.u.match(/^file:/i)&&typeof $D.A=="function"&&o.o instanceof $D.A){var mp=new $D.A("MSXML.DOMDocument");mp.loadXML(o.o.responseText);v.xdom=mp;}else if(o.o!=null&&o.o.responseXML!=null){v.xdom=o.o.responseXML;}else if(o.o!=null){_m.S("Error loading '"+o.u+"'. Response text is:"+o.o.responseText,"540.4",1);}else{_m.S("Error loading '"+o.u+"'. The internal XML object reference is null","540.4",1);}o.r=1;if(o.ih){o.ih=0;}if(o.c){o.cd=v.xdom;}$E.message.MessageService.publish("onloadxml",v);if(typeof o.h==$D.F)o.h("onloadxml",v);if(o.pi>-1){_x.P(o.pi);}o.o=0;}else{_m.S("Invalid id reference:"+i,"200.4",1);}}catch(e){_m.S("Error in handle_xml_request_load:"+(e.description?e.description:e.message),"512.4",1);}},S:
function(i){var _x=$E.xml,o;if(_x.he&&typeof _x.ho[i]==$D.O){o=_x.ho[i];if(o!=null&&typeof o.o==$D.O&&o.o.readyState==4){_x.L(i);}}else if(typeof _x.rm[i]==$D.N){o=_x.r[_x.rm[i]];if(typeof o.o==$D.O&&o.o.readyState==4){_x.L(i);}}},getXml:
function(p,h,a,i,c){return $E.xml.X(p,h,a,i,0,null,c);},postXml:
function(p,d,h,a,i){return $E.xml.X(p,h,a,i,1,d,0);},X:
function(p,h,a,i,x,d,c){var _x=$E.xml,f,o=null,v,_m=$E.message.MessageService,y,z,r,b,b_ia,g;if(typeof p!=$D.S||p.length==0){_m.S("Invalid path parameter in X","512.4",1);return 0;}if(typeof c==$D.U)c=0;if(typeof x==$D.U)x=0;if(typeof d==$D.U)d=null;z=(x?"POST":"GET");if(typeof i!=$D.S)i=$E.GG();if(typeof _x.rm[i]==$D.N&&typeof _x.r[_x.rm[i]]==$D.O){r=_x.r[_x.rm[i]];if(r.c&&typeof r.cd==$D.O){b={"xdom":r.cd,"id":i};_m.publish("onloadxml",b);if(typeof h==$D.F)h("onloadxml",b);return r.cd;}}b=_x.he;if(b){r=_x.G();}else{r=_x.O();}if(!(b?r.o:r)){_m.S("Null XML object in in X.","512.4",1);return 0;}if(b)r.v=i;y=_x.r.length;_x.r[y]={u:p,i:i,o:(b?r.o:r),ih:0,h:h,pi:(b?r.i:-1),c:c,cd:0,r:0};_x.rm[i]=y;o=_x.r[y].o;if(!p.match(/:\/\//)){var m,e=new RegExp("^/");if(!p.match(e)){m=location.pathname;if(m.match(/\\/))m=m.replace(/\\/g,"/");m=m.substring(0,m.lastIndexOf("/")+1);p=m+p;}if(!location.protocol.match(/^file:$/i)){p=location.protocol+"//"+location.host+p;}else{p=location.protocol+"//"+p;}}_x.r[y].u=p;b_ia=(typeof $D.A!=$D.U&&o instanceof $D.A)?1:0;try{if(!b&&a&&typeof $D.X!=$D.U&&o instanceof $D.X){_x.r[y].ih=function(){$E.xml.L(i);};o.addEventListener("load",_x.r[y].ih,false);}else if(!b&&a&&b_ia){_x.r[y].ih=function(){$E.xml.S(i);};o.onreadystatechange=_x.r[y].ih;}}catch(e){_m.S("Error in X:"+(e.description?e.description:e.message),"512.4",1);}if(b&&!a&&b_ia){o.onreadystatechange=_x.B;_x.ho[_x.r[y].pi]=null;}g=(a?true:false);o.open(z,p,g);o.send(d);if(!a){z=o.responseXML;if(p.match(/^file:/i)&&b_ia){var mp=new $D.A("MSXML.DOMDocument");mp.loadXML(o.responseText);z=mp;}if(b&&b_ia){_x.ho[_x.r[y].pi]=r;_x.L(_x.r[y].pi);}_x.r[y].o=null;if(!b&&_x.r[y].pi>-1){_x.P(_x.r[y].pi);}return z;}return 1;},transformNode:
function(x,s,n,i,j,p){var xp,o=null,_m=$E.message.MessageService,_x=$E.xml,v,a,b,c,d;if(typeof x==$D.S&&x.length>0){if(p&&!i)p=0;v=x;x=_x.getXml(x,0,0,i,p);if(v.match(/\?(\S*)$/)){v=v.match(/\?(\S*)/)[1];a=v.split("&");for(b=0;b<a.length;b++){c=a[b].split("=");x.documentElement.setAttribute(c[0],c[1]);}}}if(typeof s==$D.S&&s.length>0){if(p&&!j)p=0;s=_x.getXml(s,0,0,j,p);}if(typeof x!=$D.O||x==null||typeof s!=$D.O||s==null){_m.S("Invalid parameters in transformNode. Xml Node="+x+",xsl document="+s,"512.4",1);return o;}if(typeof n!=$D.O)n=x;try{if(typeof XSLTProcessor!=$D.U){xp=new XSLTProcessor();xp.importStylesheet(s);o=xp.transformToFragment(n,document);if(o)o=o.firstChild;}else if(typeof $D.A!=$D.U&&x instanceof $D.A){o=new $D.A("MSXML.DOMDocument");xp=n.transformNode(s);o.loadXML(xp);o=o.documentElement;}else{_m.S("Error in transformNode:"+(e.description?e.description:e.message),"512.4",1);}}catch(e){_m.S("Error in transformNode:"+(e.description?e.description:e.message),"512.4",1);}return o;},selectSingleNode:
function(d,x,c){var s,i,n;if(typeof d.evaluate!=$D.U){c=(c?c:d.documentElement);s=d.evaluate(x,c,null,0,null);return s.iterateNext();}else if(typeof d.selectNodes!=$D.U){return(c?c:d).selectSingleNode(x);}return 0;},selectNodes:
function(d,x,c){var s,a=[],i,n;if(typeof d.evaluate!=$D.U){c=(c?c:d.documentElement);s=d.evaluate(x,c,null,0,null);n=s.iterateNext();while(typeof n==$D.O&&n!=null){a[a.length]=n;n=s.iterateNext();}return a;}else if(typeof d.selectNodes!=$D.U){return(c?c:d).selectNodes(x);}return a;},queryNodes:
function(x,p,n,a,v){return $E.xml.Q(x,p,n,a,v,1);},queryNode:
function(x,p,n,a,v){return $E.xml.Q(x,p,n,a,v,0);},Q:
function(x,p,n,a,v,z){var i=0,b,e,c,r=[];if(!z)r=null;c=x.getElementsByTagName(p);if(typeof n==$D.S){if(!c.length){if(!z)return null;else return r;}c=c[0];e=c.getElementsByTagName(n);}else e=c;for(;i<e.length;i++){b=e[i];if((!a&&!v)||(b.getAttribute(a)==v)){if(!z){r=b;break;}else r[r.length]=b;}}return r;},serialize:
function(n){var v;if(typeof XMLSerializer!=$D.U){return(new XMLSerializer()).serializeToString(n);}else if(typeof n.xml==$D.S){return n.xml;}},getCDATAValue:
function(n){var c,d="",i=0,e;if(n==null)return d;c=n.childNodes;for(;i<c.length;i++){e=c[i];if(e.nodeName=="#cdata-section")d+=e.nodeValue;}return d;},getInnerText:
function(s){var r="",a,i,e;if(typeof s==$D.S)return s;if(s==null)return r;if(typeof s==$D.O&&s.nodeType==3)return s.nodeValue;if(s.hasChildNodes()){a=s.childNodes;for(i=0;i<a.length;i++){e=a[i];if(e.nodeType==3)r+=e.nodeValue;if(e.nodeType==1&&e.hasChildNodes()){r+=this.getInnerText(e);}}}return r;},removeChildren:
function(o){var i;for(i=o.childNodes.length-1;i>=0;i--){o.removeChild(o.childNodes[i]);}},setInnerXHTML:
function(t,s,p,d,z){var y,e,a,l,x,n,v,r=0,b;if(!d)d=document;b=(d==document?1:0);if(!p){$E.xml.removeChildren(t);}y=(s&&typeof s==$D.O)?s.nodeType:(typeof s==$D.S)?33:-1;switch(y){case 1:e=d.createElement(s.nodeName);a=s.attributes;l=a.length;for(x=0;x<l;x++){n=a[x].nodeName;v=a[x].nodeValue;if(b&&n=="style"){e.style.cssText=v;}else if(b&&n=="id"){e.id=v;}else if(b&&n=="class"){e.className=v;}else if(b&&n.match(/^on/i)){eval("e."+n+"=function(){"+v+"}");}else{e.setAttribute(n,v);}}if(!z&&s.hasChildNodes()){a=s.childNodes;l=a.length;for(x=0;x<l;x++){this.setInnerXHTML(e,a[x],1,d);}}t.appendChild(e);r=e;break;case 3:e=s.nodeValue;if(e){e=e.replace(/\s+/g," ");t.appendChild(d.createTextNode(e));r=e;}break;case 4:e=s.nodeValue;t.appendChild(d.createCDATASection(e));break;case 8:break;case 33:e=s;if(e){e=e.replace(/^\s*/,"");e=e.replace(/\s*$/,"");e=e.replace(/\s+/g," ");t.appendChild(d.createTextNode(e));r=e;}break;default:break;}return r;},B:
function(){}};$EP("$E.registry");$E.registry={ObjectRegistry:null,ObjectRegistryImpl:
function(){var t=this;t.o={s:{rt:0},p:{o:[],om:[]}};t.canRegister=function(o){if(typeof o!=$D.O||(typeof o.i!=$D.S||typeof o.t!=$D.S||typeof o.v!=$D.S||typeof o.r!=$D.N)){return 0;}return 1;};t.addObject=function(o){var i,m,p;if(!t.canRegister(o)){if(ValidatePackage("$E.message")&&$E.message.MessageService!=null){$E.message.MessageService.S("Invalid Object Structure","540.4",1);}else{alert("Invalid Object Structure");}return 0;}if(t.isRegistered(o)){$E.message.MessageService.S("Object '"+o.i+"' is already registered","540.4");return 0;}p=t.o.p;i=o.i;if(typeof p.om[i]!=$D.N){m=p.o.length;p.o[m]=o;p.om[i]=m;if(t.o.s.rt&&ValidatePackage("$E.transaction")&&$E.transaction.TransactionService!=null){$E.transaction.TransactionService.register(o);}return 1;}return 0;};t.removeObject=function(o){var i=o.i,m,p;p=t.o.p;if(typeof p.om[i]==$D.N){m=p.om[i];p.o[m]=0;p.om[i]=null;return 1;}return 0;};t.getObject=function(i){var p=t.o.p;if(typeof p.om[i]==$D.N&&typeof p.o[p.om[i]]==$D.O){return p.o[p.om[i]];}return null;};t.isRegistered=function(i){if(typeof i==$D.O){if(typeof i.i==$D.U)return 0;i=i.i;}if(typeof t.o.p.om[i]==$D.N){return 1;}return 0;};t.sendSigterm=function(){var o,i,p=t.o.p;for(i=0;i<p.o.length;i++){o=p.o[i];if(o!=null&&o.r==4&&typeof o.sigterm==$D.F){o.sigterm();}}};t.sendDestroyTo=function(o){if(t.isRegistered(o)&&typeof o.destroy==$D.F){o.destroy();return 1;}return 0;};$E.IM(t,"base_object","object_registry","0.0.7.1205.2003");t.addObject(t);}}
$E.registry.ObjectRegistry=new $E.registry.ObjectRegistryImpl();$EP("$E.message");$E.message={MessageService:null,MessageServiceImpl:
function(){var t=this;t.o={p:{s:[],dd:[],e:[],ld:[]},s:{dd:20,me:200,rt:1},data:{l:["ALL","DEBUG","ADVISORY","NORMAL","WARNING","ERROR","FATAL","NONE"],lm:{ALL:0,DEBUG:1,ADVISORY:2,NORMAL:3,WARNING:4,ERROR:5,FATAL:6,NONE:7},ed:[	]}};t.setReportThreshold=function(i){var c=t.o;if(typeof i==$D.N)i=c.data.l[i];if(typeof c.data.lm[i]==$D.N){c.s.rt=c.data.lm[i];}};t.clearEntries=function(){t.o.p.e=[];};t.getDeliveryDelay=function(){return t.o.s.dd;};t.setDeliveryDelay=function(i){if(typeof i==$D.N&&i>=0){t.o.s.dd=i;}};t.subscribe=function(o,e,f,v){var c,l,a=arguments;c=t.o;if(a.length==4){if(!o)o=window;if(!v)v=null;}if(a.length==2){var t1=a[0],t2=a[1];o=window;e=t1;f=t2;}if(typeof c.p.s[e]!=$D.O)c.p.s[e]=[];l=c.p.s[e].length;c.p.s[e][l]=$E.FN("basic_message_subscription",o,e,f,v);};t.unsubscribe=function(o,e,f){var t=this,a=[],l,i=0,z,c,g=arguments;c=t.o;if(g.length==2){var t1=g[0],t2=g[1];o=window;e=t1;f=t2;}if(typeof c.p.s[e]!=$D.O)return;l=c.p.s[e].length;for(;i<l;i++){z=c.p.s[e][i];if(z.object!=o||z.handler!=f){a[a.length]=z;}}c.p.s[e]=a;};t.sigterm=function(){var t=this,c;c=t.o;t.r=5;c.s.dd=0;c.p.dd=[];};t.flush=function(){t.o.p.dd=[];};t._P=function(i){var t=this,d,c;c=t.o;if(t.r!=4)return;if(typeof i==$D.S&&typeof c.p.dd[i]==$D.O){d=c.p.dd[i];t.P(d.event,d.data);c.p.dd[i]=0;}};t.publish=function(e,o){var t=this,c,x,d;c=t.o;if(c.s.dd){d=c.p.dd;x=$E.GG();d[x]={data:o,event:e};setTimeout("$E.registry.ObjectRegistry.getObject('"+t.i+"')._P('"+x+"')",c.s.dd);}else{t.P(e,o);}};t.P=function(e,o){var t=this,c,j,l,i=0,z,x,d;c=t.o;if(typeof c.p.s[e]!=$D.O)return;l=c.p.s[e].length;for(;i<l;i++){z=c.p.s[e][i];if(!z.target||z.target==o){if(typeof z.handler==$D.S)z.object[z.handler](e,o);if(typeof z.handler==$D.F)z.handler(e,o);}}};t.sendMessage=function(d,s,p){return t.S(d,s,p);};t.S=function(d,s,p){var o=null,v,c,t=this,ms;c=t.o;if(typeof s!=$D.S)s="200";v=t.I(s);if(v.t<c.s.rt){return o;}if(typeof p!=$D.N)p=0;if(p)o=t.R(s,d,v);else o=t.C(s,d,v);ms=t.M(o);if(ms==null)ms="[message error]";t.publish("onsendmessage",{message:ms,level:v.t,description:o.d});return o;};t.R=function(s,d,v){var t=this,o;o=t.C(s,d,v);alert(t.M(o));return o;};t.C=function(s,d,v){var o=$E.FN("basic_message",v,d),i,c,t=this;c=t.o;i=c.p.e.length;if(i>=c.s.me&&c.s.me>0){c.p.e.shift();i--;}o.index=i;c.p.e[i]=o;return o;};t.M=function(o){var v="[error]",a,l,d,c,t=this;c=t.o;if(typeof o==$D.O){a=t.D(o);d=o.time;var m=new String(d.getMinutes()),s=new String(d.getSeconds()),ms=new String(d.getMilliseconds());if(s.length==1)s="0"+s;if(m.length==1)m="0"+m;if(ms.length==1)ms="0"+ms;if(ms.length==2)ms="0"+ms;v=d.getHours()+":"+m+":"+s+":"+ms+"::";v+=t.G(o.entry.t)+":";v+=(a!=null?a[0]:":");v+="("+o.entry.m+").";o.d=(a!=null?a[1]:"");if(o.data){v+=" "+o.data;}else{v+=" "+o.d;}}return v;};t.G=function(i){return this.o.data.l[i];};t.D=function(o){var v=null,f=100,l,m,n,i=0,a,d,c,t=this;c=t.o;if(typeof o==$D.O){l=c.data.ed.length;m=o.entry.mc;n=o.entry.nc;for(;i<l;i++){a=c.data.ed[i];if(a.length>=2){d=a[2];if(m>=d&&m<(d+f))v=a;if(v!=null&&m>(d+f))break;}}}return v;};t.I=function(s){var a=[],c,i=100,o,m=0,n,x=900,d,p,y;o=i;if(s)a=s.split(".");c=(a[0])?parseInt(a[0]):200;for(y=i;y<=x;y+=100){if(c>=i&&c<(y+i))m=i;if(m>0&&m<=(y+100))break;}if(m<0||m>900||c<0||c>900){m=200;c=200;}n=c-m;d=(a[1])?parseInt(a[1]):3;if(d>7||d<0)d=3;l=(a[2])?parseInt(a[2]):0;p=(a[3])?parseInt(a[3]):0;return{mc:c,mb:m,nc:n,t:d,l:l,id:p,d:"",m:c+"."+d+"."+l+"."+p};};$E.IM(t,"base_object","message_service","0.0.23.1205.2003");$E.registry.ObjectRegistry.addObject(t);t.r=4;}}
$E.message.MessageService=new $E.message.MessageServiceImpl();$EP("$E.object");$E.object={v:"0.0.8.1205.2003",newInstance:
function(s,z){var o=$E.FN("generic_object"),_m=$E.message.MessageService,_r=$E.registry.ObjectRegistry;$E.IM(o,"base_object",s,z);if(_r.addObject(o)){$E.dom.event.addEventBuffer(o);}return o;},IOA:
function(o,s){if(typeof o!=$D.O||typeof o.o!=$D.O||typeof o.o.p!=$D.O){alert("Invalid object reference in ocjo.IOA");return 0;}o.o.p[s+"s"]=[];o.o.p[s+"names"]=[];o.o.p[s+"index"]=[];var	s_name=s.substring(0,1).toUpperCase()+s.substring(1,s.length),f;o["get"+s_name+"ByName"]=eval('f=function(s){'+' var c=this.o.p;'+' if(typeof c.'+s+'names[s]==$D.N)return c.'+s+'s[c.'+s+'names[s]];'+' return 0;'+'}');o["get"+s_name]=eval('f=function(i){var _p=this.o.p;if(typeof _p.'+s+'index[i]==$D.N&&typeof _p.'+s+'s[_p.'+s+'index[i]]==$D.O){return _p.'+s+'s[_p.'+s+'index[i]];}return 0;};');o["get"+s_name+"s"]=eval('f=function(){return this.o.p.'+s+'s;};');o["is"+s_name]=eval('f=function(o){var _p=this.o.p;if(typeof o==$D.S){if(this.get'+s_name+'(o))return 1;return 0;}if(typeof o==$D.O&&o!=null&&typeof _p.'+s+'index[o.'+s+'_id]==$D.N&&typeof _p.'+s+'s[_p.'+s+'index[o.'+s+'_id]]==$D.O){return 1;}return 0;};');return 1;}}
$EP("$E.util.driver");$E.util.driver={ApplicationDriver:null,ApplicationDriverImpl:
function(){var t=this,_j=$E,_x=$E.xml,_m=$E.message.MessageService;t.o={s:{l:0,wl:0,gc:0},p:{application_config:0}};t._terminate=function(){_m.publish("destroy",window);};t.getConfig=function(){return t.o.p.a;};t.setConfig=function(o,b){t.o.s.l=1;t.o.p.a=o;if(b)_m.publish("application_config_loaded",o);};t._handle_window_unload=function(){_j.registry.ObjectRegistry.sendSigterm();this._terminate();};t._handle_window_load=function(){t.o.s.wl=1;_m.publish("dom_event_window_load",this);};$E.dom.event.addEventBuffer(t);$E.IM(t,"base_object","driver_utility","0.0.7.1205.2003");$E.registry.ObjectRegistry.addObject(t);t.createHandler("window_load",0,0,1);t.createHandler("window_unload",0,0,1);_j.dom.event.addEventListener(window,"unload",t._prehandle_window_unload);_j.dom.event.addEventListener(window,"load",t._prehandle_window_load);}};$E.util.driver.ApplicationDriver=new $E.util.driver.ApplicationDriverImpl();$EP("$E.util.config");$E.util.config={newInstance:
function(s,h,a){var n={o:{p:{config:[],config_map:[],config_load_handler:0},s:{config_path:0,l:0,load_async:0,element_parent_name:"config",element_name:"param",attr_name_name:"name",attr_value_name:"value"}}};n.setElementParentName=function(s){this.o.s.element_parent_name=s;};n.setElementName=function(s){this.o.s.param_child_name=s;};n.setAttrNameName=function(s){this.o.s.attr_name_name=s;};n.setAttrValueName=function(s){this.o.s.attr_value_name=s;};n.clearConfig=function(){var t=this,_p;_p=t.o.p;_p.config=[];_p.config_map=[];};n.reload=function(){var t=this,_s,_p;t.clearConfig();_s=t.o.s;_p=t.o.p;if(_s.config_path){t.load(_s.config_path,_p.config_load_handler,_s.load_async);}};n.load=function(s,h,a){var t=this,_j=$E,o,c;c=t.o;c.p.config_load_handler=(typeof h==$D.F?h:0);c.s.config_path=s;c.s.load_async=a;o=_j.xml.getXml(s,null,a,t.i);if(!a)t._parse_config(o);};n.HLX=function(s,v){var t=this;if(v.id==t.i&&t.o.s.load_async){this._parse_config(v.xdom);}};n.getParams=function(){return this.o.p.config;};n.getParam=function(x){var t=this,c,o;c=t.o;if(!c.s.l)return null;if(typeof x==$D.S)x=c.p.config_map[x];if(typeof x==$D.N&&typeof c.p.config[x]==$D.O)return c.p.config[x].value;return null;};n.parseConfig=function(o){return this._parse_config(o);};n._parse_config=function(o){var t=this,c,p,i=0,a,n,v;c=t.o;if(typeof o==$D.O&&o.documentElement!=null){c.s.l=1;a=$E.xml.selectNodes(o,c.s.element_parent_name+"/"+c.s.element_name,o.documentElement);for(;i<a.length;i++){p=a[i];n=p.getAttribute(c.s.attr_name_name);if(typeof n==$D.S&&n.length>0){v=p.getAttribute(c.s.attr_value_name);if(typeof v!=$D.S)v="";c.p.config_map[n]=c.p.config.length;if(v=="#cdata"&&p.hasChildNodes())v=$E.xml.getCDATAValue(n);c.p.config[c.p.config.length]={"name":n,"value":v};}}}if(typeof c.p.config_load_handler==$D.F){c.p.config_load_handler("onconfigload",this);}};$E.IM(n,"base_object","config_utility","0.0.17.1205.2003");$E.registry.ObjectRegistry.addObject(n);$E.message.MessageService.subscribe(n,"onloadxml","HLX");if(typeof h==$D.S&&typeof window[h]==$D.F){h=window[h];}if(typeof s==$D.S){if(!a)a=0;n.load(s,h,a);}if(typeof s==$D.O&&s!=null){n._parse_config(s);}return n;}}
$EP("$E.wires");$E.wires.primitive={PrimitiveWire:null,PrimitiveWireImpl:
function(){var t=this;t.o={p:{w:[]},s:{c:0}};t.invoke=function(i,args,b,z,p,o,m){var c=t.o,h,a,d,r=0;h=c.p.w[i];if(typeof args!=$D.O)args=[];if(typeof h==$D.O){a=(typeof h.ap==$D.O&&typeof h.a==$D.S)?1:0;if((o||(!h.i&&(r=(a?h.ap[h.a].apply(h.ap,args):h.a.apply(window,args)))))||b){if(!m)h.i=1;if(z)return r;a=(typeof h.hp==$D.O&&typeof h.h==$D.S)?1:0;if(!h.r){if(a){if(typeof h.hp[h.h]==$D.F)h.hp[h.h].apply(h.hp,args);else alert("$E.wires.primitive::invoke Error=Invalid function pointer "+h.h);}else{if(typeof h.h==$D.F)h.h.apply(window,args);else alert("$E.wires.primitive::invoke Error=Invalid function pointer "+h.h);}if(!m)h.r=1;if(!p)c.p.w[i]=0;return r;}}}else{alert("$E.wires.primitive::invoke Error=Invalid wire reference with "+i);}return 0;};t.getWire=function(i){var c=t.o,h;h=c.p.w[i];if(typeof h==$D.O){return h;}return 0;};t.fireWire=function(i){var c=t.o,h;h=c.p.w[i];if(typeof h==$D.O){h.i=1;t.invoke(i,0,1);}};t.wire=function(xp,x,yp,y,ep,e,tl){if(typeof tl!=$D.S)tl="swc.ocjw.primitive";try{if(typeof xp==$D.S)xp=eval(xp);if(typeof yp==$D.S)yp=eval(yp);if(typeof ep==$D.S)ep=eval(ep);}catch(e){alert("ocjw.wire.Error:"+e.toString());return 0;}var i=tl+"."+(++t.o.s.c),c=t.o;if(!xp)xp=window;if(!yp)yp=window;if(!ep)ep=window;c.p.w[i]={ap:xp,a:x,hp:yp,h:y,ep:ep,e:e,i:0,r:0};return i;};$E.IM(t,"base_object","primitive_wire","0.0.8.1205.2003");$E.registry.ObjectRegistry.addObject(t);}}
$E.wires.primitive.PrimitiveWire=new $E.wires.primitive.PrimitiveWireImpl();$EP("$E.wires");$E.wires.wire={newInstance:
function(){var t=this;t.o={p:{w:[],h:[],l:[],pw:new $E.wires.primitive.PrimitiveWireImpl()},s:{counter:0,wire_id_label:"swc.ocjw.wire",can_signal:1}};t.getLength=function(){};t.setCanSignal=function(b){t.o.s.can_signal=(b?1:0);};t.getCanSignal=function(){return t.o.s.can_signal;};t.invoke=function(args,xp,x,b,o){var i=-1,l,d,_p=t.o.p,_s=t.o.s,w,wl,pw,r,a;if(typeof args!=$D.O)args=[];try{if(typeof xp==$D.S)xp=eval(xp);}catch(e){alert("ocjw.invoke.Error:"+e.toString());return 0;}if(typeof xp!=$D.U&&x){l=(xp!=null?(xp.i?xp.i:(xp.id?xp.id:(xp.name?xp.name:0))):0);d=l+"-"+x;if(typeof _p.l[d]==$D.O){wl=_p.l[d];}else{alert("Invalid Wire Reference("+d+")in $E.wires.js::invoke");}}else{if(typeof _p.w[0]==$D.O){w=_p.w[0];wl=_p.l[w.la+"-"+w.a];}}if(typeof wl==$D.O&&wl.length>0){w=_p.w[wl[0]];if(!o)r=_p.pw.invoke(w.pid,args,0,1,0,0,1);if((o||(!w.i&&r))||b){w.i=1;for(i=0;i<wl.length;i++){w=_p.w[wl[i]];_p.pw.invoke(w.pid,args,1,0,1,1,1);if(_s.can_signal){d=w.lh+"-"+w.h;if(typeof _p.l[d]==$D.O){l=_p.w[_p.l[d][0]];pw=_p.pw.getWire(l.pid);if(pw){if(!l.i)t.invoke(args,pw.ap,pw.a,0,1);}}}}}else{}}return r;};t.addInterceptor=function(o){};t.join=function(yp,y){};t.wire=function(xp,x,yp,y,ep,e){var v,i,a,_p=t.o.p,_s=t.o.s;try{if(typeof xp==$D.S)xp=eval(xp);if(typeof yp==$D.S)yp=eval(yp);if(typeof ep==$D.S)ep=eval(ep);}catch(e){alert("ocjw.wire.Error:"+e.toString());return 0;}i=_p.pw.wire(xp,x,yp,y,ep,e,_s.wire_id_label);v={pid:i,a:x,h:y,la:(xp!=null?(xp.i?xp.i:(xp.id?xp.id:(xp.name?xp.name:0))):0),lh:(yp!=null?(yp.i?yp.i:(yp.id?yp.id:(yp.name?yp.name:0))):0),le:(ep!=null?(ep.i?ep.i:(ep.id?ep.id:(ep.name?ep.name:0))):0),id:0,i:0};v.id=v.a+"-"+v.h+"-"+v.pid;_p.h[v.id]=_p.w.length;_p.w[_p.w.length]=v;i=v.la+"-"+v.a;if(typeof _p.l[i]!=$D.O)_p.l[i]=[];a=_p.l[i];a[a.length]=_p.h[v.id];return 1;};t.primitiveWire=function(xp,x,yp,y,ep,e){var _p=t.o.p,_s=t.o.s;try{if(typeof xp==$D.S)xp=eval(xp);if(typeof yp==$D.S)yp=eval(yp);if(typeof ep==$D.S)ep=eval(ep);}catch(e){alert("ocjw.wire.Error:"+e.toString());return 0;}return _p.pw.wire(xp,x,yp,y,ep,e,_s.wire_id_label);};t.invokePrimitive=function(args,i,o,z){var _pw=t.o.p.pw,r;if(typeof i==$D.S){if(!o){r=_pw.invoke(i,args,0,1,0,0,1);}if(o||r){if(!z){_pw.invoke(i,args,1,0,1,1,1);}}else{}}return r;};t.invokeHardWireAction=function(o,i,a){var pw,c=[],b,l,k=0,_m=$E.message.MessageService;if(typeof o!=$D.O||typeof o.pw!=$D.O){_m.S("Invalid object reference for primitive wire","511.4");return 0;}pw=o.getPrimitiveWire(i);if(typeof pw!=$D.O){_m.S("Invalid primitive wire id "+i,"511.4");return 0;}b=pw.action_arguments;for(;k<b.length;)c[k]=b[k++];if(typeof a==$D.O&&(l=a.length))for(k=0;k<l;)c[c.length]=a[k++];return t.invokePrimitive(c,pw.id,0,1);};t.invokeHardWireHandler=function(o,i,a){var pw,c=[],b,l,k=0,_m=$E.message.MessageService;if(typeof o!=$D.O||typeof o.pw!=$D.O){_m.S("Invalid object reference for primitive wire","511.4");return 0;}pw=o.getPrimitiveWire(i);if(typeof pw!=$D.O){_m.S("Invalid primitive wire id "+i,"511.4");return 0;}b=pw.handler_arguments;for(;k<b.length;)c[k]=b[k++];if(typeof a==$D.O&&(l=a.length))for(k=0;k<l;)c[c.length]=a[k++];return t.invokePrimitive(c,pw.id,1,0);};t.hardWire=function(o,i,action_args,handler_args,ac,a,hc,h,ec,e,error_args){if(typeof o!=$D.O||typeof o.pw!=$D.O)return 0;var pid=t.primitiveWire(ac,a,hc,h,ec,e);if(pid!=0){o.pw[i]={id:pid,action_arguments:action_args,handler_arguments:handler_args,error_arguments:error_args};}return pid;};$E.IM(t,"base_object","wire_service","0.0.47.1205.2003");$E.registry.ObjectRegistry.addObject(t);return t;}}
$EP("$E.transaction");$E.transaction={TransactionService:null,TransactionServiceImpl:
function(){var t=this;t.o={p:{r:[],rm:[]},s:{a:0,c:0,l:"swc.ocjt.transaction"}};t.canRegister=function(o){var _o=$E.registry.ObjectRegistry;if(!_o.isRegistered(o.i)||typeof o.doTransaction!=$D.F||typeof o.startTransaction!=$D.F||typeof o.endTransaction!=$D.F){return 0;}return 1;};t.isRegistered=function(o){var _p=t.o.p;if(typeof o==$D.O&&o!=null&&typeof _p.rm[o.i]==$D.N&&_p.r[_p.rm[o.i]]){return 1;}return 0;};t.register=function(o){var _p=t.o.p,_m=$E.message.MessageService;if(!t.canRegister(o)||o.t=="transaction_service"){_m.S("Unable to register object "+o.t+" with transaction service","511.4");return 0;}_p.rm[o.i]=_p.r.length;_p.r[_p.r.length]=o.i;return 1;};t.addTransactionParticipant=function(o,p){var _m=$E.message.MessageService;if(t.isRegistered(o)&&t.isPacket(p)&&!p.participants[o.i]){p.participants[o.i]=1;p.participant_count++;if(!p.bst)o.startTransaction(t,p);return 1;}return 0;};t.removeTransactionParticipant=function(o,p){var _m=$E.message.MessageService;if(t.isRegistered(o)&&t.isPacket(p)&&p.participants[o.i]){p.participants[o.i]=0;p.participant_count--;return 1;}return 0;};t.serveTransaction=function(p,x,b){var _m=$E.message.MessageService,_o=$E.registry.ObjectRegistry,o,a,i,d,r;if(t.isPacket(p)){if(!p.is_open||!p.participant_count)return 0;if(typeof x==$D.U)x=p.owner_id;a=p.participants;if(x&&_o.isRegistered(x)&&!b&&((p.serve_type==1&&a[x]!=2)||(p.serve_type==2&&!a[x]))){o=_o.getObject(x);if(t.isRegistered(o)&&a[o.i]){r=(o.doTransaction(t,p)?1:0);if(r&&p.serve_type==1)a[x]=2;}}if(!x||!p.btt){for(i in a){d=a[i];if(a[i]&&((p.serve_type==1&&a[i]!=2)||(p.serve_type==2&&!a[i]))&&_o.isRegistered(i)&&i!=x){o=_o.getObject(i);if(t.isRegistered(o)){r=(o.doTransaction(t,p)?1:0);if(r&&p.serve_type==1)a[i]=2;}}}}r=1;for(i in a){if((p.serve_type==1&&a[i]!=2)||(p.serve_type==2&&!a[i])){r=0;break;}}if(r)t.XT(p);return 1;}else{_m.S("Invalid transaction packet.","511.4");}return 0;};t.XT=function(p){var _m=$E.message.MessageService,_o=$E.registry.ObjectRegistry,a,i,o;if(t.isPacket(p)){if(p.is_open){a=p.participants;p.is_open=0;if(p.owner_id&&_o.isRegistered(p.owner_id)){o=_o.getObject(p.owner_id);o.endTransaction(t,p);}if(!p.owner_id||!p.bet){for(i in a){if(p.owner_id!=i){o=_o.getObject(i);if(o!=null){o.endTransaction(t,p);}else{_m.S("Null object reference "+i,"540.4");}}a[i]=0;}}p.sp=$E.util.getDate();p.is_finalized=1;if(typeof p.handler==$D.F){p.handler(t,p);}}else{_m.S("Transaction packet is not open.","200.4");}}else{_m.S("Invalid transaction packet.","200.4");}};t.ST=function(p,o){var n,a=t.o.p.r,c;if(typeof p==$D.O){o.bst=1;v=o.participants[p.i]=(p.startTransaction(t,o)?1:0);o.participant_count+=v;}if(o.participant_count){o.st=$E.util.getDate();o.is_open=1;return 1;}return 0;};t.closeTransaction=function(i){var _p=t.o.p,o,m,_m=$E.message.MessageService;o=t.getPacket(i);if(t.isPacket(o)){m=_p.packetindex[i];_p.packetnames[o.packet_name]=0;_p.packetindex[i]=0;_p.packets[m]=0;}else{_m.S("Invalid packet id "+i,"200.4");}};t.openTransaction=function(n,p,d,f){var i,_j=$E,o,c,_p=t.o.p,_s=t.o.s,_m=$E.message.MessageService;i=_s.l+":"+(++_s.c);if(typeof n==$D.U)n=i;if(typeof d==$D.U)d=0;if(typeof f==$D.U)f=0;if(typeof p==$D.O){if(!t.isRegistered(p)){_m.S("Invalid transaction owner.","200.4");return 0;}}else{p=0;}if(typeof _p.packetnames[n]==$D.N&&typeof _p.packets[_p.packetnames[n]]==$D.O&&_p.packets[_p.packetnames[n]].is_open){_m.S("Transaction "+n+" is already open.","200.4");return 0;}o=_j.FN("packet_object",i,n,p.i,d,f);c=_p.packets.length;_p.packetnames[n]=c;_p.packetindex[i]=c;_p.packets[c]=o;if(t.ST(p,o)){if(_s.a)t.serveTransaction(o);}else{_m.S("Transaction "+n+" was not opened.","200.4");}return i;};$E.object.IOA(t,"packet");$E.IM(t,"base_object","transaction_service","0.1a");$E.registry.ObjectRegistry.addObject(t);}}
$E.transaction.TransactionService=new $E.transaction.TransactionServiceImpl();$EP("$E.task");$E.task={TaskService:null,TaskServiceImpl:
function(){var t=this,_j=$E,_x=$E.xml,_m=$E.message.MessageService,_t=$E.transaction.TransactionService;t.o={p:{rd:[]},s:{etn:0,etl:0,wl:0,til:"task_trans_",sd:0},data:{a:0,b:1,c:2,d:3,e:4,f:5,g:99,h:"xml",i:"task",j:"import-task",k:$D.F,l:"event",m:"script",n:""}};t.clearTask=function(i){var _p=t.o.p,o,l;if(typeof i==$D.S)o=t.getTask(i);if(typeof i==$D.O)o=i;if(t.isTask(o)){if(o.task_state<t.o.data.f){o.setAutoDestroy(1);return 1;}l=_p.taskindex[o.task_id];_p.tasks[l]=0;_p.taskindex[o.task_id]=null;_p.tasknames[o.task_name]=null;_t.closeTransaction(o.transaction_id);return 1;}else{_m.S("Invalid task id "+i,"200.4",1);}return 0;};t.clearTasks=function(){var _p=t.o.p,_s=t.o.s,a,i,o;a=_p.tasks;_p.tasks=[];_p.taskindex=[];_p.tasknames=[];_p.rd=[];_s.etn=0;_s.etl=0;for(i=0;i<a.length;i++){o=a[i];_t.closeTransaction(o.transaction_id);}if(_s.wl){t.returnDependency("dom_event_window_load");}};t.sigterm=function(){var t=this,c;c=t.o;t.r=5;};t.HWD=function(s,v){var t=this,c;c=t.o;t.sigterm();c.p.tasks=[];c.p.taskindex=[];c.p.tasknames=[];};t.isExternalLoaded=function(){return t.o.s.etl;};t.addTaskDependency=function(o,d){if(t.isTask(o)&&!t.o.p.rd[d]){o.depends[o.depends.length]=d;return 1;}return 0;};t.getTaskDepends=function(o){var h,m,r=[];if(!t.isTask(o))return r;if(!o.depends.length)return r;for(h=0;h<o.depends.length;h++)r[h]=o.depends[h];return r;};t.returnDependency=function(v){var o,_p=t.o.p;if(t.isTask(v)){o=v;v=v.task_name;}else{o=t.getTaskByName(v);}if(t.isTask(o)&&o.task_state<t.o.data.e){o.task_state=t.o.data.e;}if(!_p.rd[v]){_p.rd[v]=1;t.UT(v);}return 1;};t.clearDependency=function(v){var o,_p=t.o.p;if(t.isTask(v)){o=v;v=v.task_name;}else{o=t.getTaskByName(v);}if(_p.rd[v]){_p.rd[v]=0;t.UT(v);}return 1;};t.UT=function(s){var a,o,i,h,m,_d=t.o.data;a=t.o.p.tasks;for(i=0;i<a.length;i++){o=a[i];if(typeof o!=$D.O||o.task_state==_d.f){continue;}m=0;for(h=0;h<o.depends.length;h++){if(o.depends[h]==s){o.depends[h]=0;}else if(o.depends[h]!=0){m=1;}}if(!m){o.depends=[];t.serveTaskTransaction(o);}}};t.isTaskComplete=function(o){if(t.isTask(o)&&o.task_state==t.o.data.f){return 1;}return 0;};t.serveTaskTransaction=function(o){if(t.isTask(o)&&t.o.s.sd){setTimeout("$E.registry.ObjectRegistry.getObject('"+t.i+"').ST('"+o.task_id+"')",t.o.s.sd);}else{t.ST(o);}};t.ST=function(o){if(typeof o==$D.S)o=t.getTask(o);if(t.isTask(o)){var z=_t.getPacket(o.transaction_id),_d=t.o.data;if(z){_t.serveTransaction(z,t.i);return 1;}else{_m.S("Task could not be executed as a transaction.","200.4");return 0;}}else{_m.S("Tasks:object is not a task. Auto-Destroyed tasks may also cause this message.","511.4");}};t.executeTaskHandler=function(o){var _d=t.o.data;if(t.isTask(o)){if(o.task_state==_d.c&&o.executed&&!o.handled){o.task_state=_d.d;t.serveTaskTransaction(o);return 1;}else{_m.S("Task handler "+o.task_name+"("+o.task_state+" / "+o.executed+" / "+o.handled+")cannot be served at this time.","511.4");}}else{_m.S("Task object cannot be executed.","511.4");}return 0;};t.executeTaskHandlerByName=function(n){return t.executeTaskHandler(t.getTaskByName(n));};t.executeTaskByName=function(n){t.executeTask(t.getTaskByName(n));};t.executeTask=function(o){var _d=t.o.data;if(t.isTask(o)){if(o.task_state!=_d.b){return 0;}o.task_state=_d.c;t.serveTaskTransaction(o);}else{_m.S("Task object cannot be executed.","511.4");}};t.importTaskFromXml=function(n,p,d,b){var r,i,a,at,h,ht,z,_c=t.o,x;if(typeof d!=$D.O){if(_c.s.etl){z=t.getTaskByName(t.o.s.etn);if(z)d=z.data;}}if(typeof d!=$D.O||d==null){return 0;}if(typeof n==$D.S){z=_x.selectSingleNode(d,_c.data.n+"task[@id='"+n+"']",d.documentElement);if(typeof z==$D.O&&z!=null){return t.importTaskFromXml(z,p,d,b);}else{_m.S("Task '"+n+"' does not exist","200.4");}}if(typeof n==$D.O&&n!=null&&typeof d==$D.O&&d!=null){if((r=n.getAttribute("rid"))!=null){z=_x.selectSingleNode(d,_c.data.n+"task[@id='"+r+"']",d.documentElement);if(typeof z==$D.O&&z!=null){if(n.getAttribute("auto-execute")=="1")b=1;t.importTaskFromXml(z,p,0,b);return 1;}else{_m.S("Task id "+r+" does not exist","200.4");}}else if((i=n.getAttribute("id"))!=null){a=n.getAttribute("action");at=n.getAttribute("action-type");h=n.getAttribute("handler");ht=n.getAttribute("handler-type");if(typeof p==$D.O){t.addTaskDependency(p,i);}p=t.addTask(i,at,a,ht,h);if(!t.isTask(p))return 0;z=_x.selectNodes(d,"task",n);for(x=0;x<z.length;x++){t.importTaskFromXml(z[x],p);}z=_x.selectNodes(d,"depends",n);for(x=0;x<z.length;x++){if(typeof z[x].getAttribute("rid")==$D.S){t.addTaskDependency(p,z[x].getAttribute("rid"));}}if(b){t.executeTask(p);}return 1;}else{_m.S("Task does not define an id or reference-id","200.4");}}return 0;};t.executeTaskLoader=function(n,at,a,ht,h){var i=t.addTaskLoader(n,at,a,ht,h);t.executeTask(i);};t.addTaskLoader=function(n,at,a,ht,h){t.o.s.etl=0;t.o.s.etn=n;return t.addTask(n,at,a,ht,h);};t.addTask=function(n,at,a,ht,h){var v,i,l,c,tid;c=t.o;i=c.s.til+(++$E.util.driver.ApplicationDriver.o.s.gc);if(typeof c.p.tasknames[n]==$D.N){return 0;}l=c.p.tasks.length;if(typeof h!=$D.S&&typeof h!=$D.F)h=0;if(!h)ht=0;v=_j.FN("task_object",n,at,a,ht,h,i,l,0);c.p.tasks[l]=v;c.p.tasknames[n]=l;c.p.taskindex[i]=l;tid=_t.openTransaction(i,t,{id:i,name:n});v.transaction_id=tid;return v;};t.doTransaction=function(s,p){var v,_d=t.o.data,_s=t.o.s;v=t.getTask(p.data.id);if(v){switch(v.task_state){case _d.b:break;case _d.c:if(!v.executed){v.executed=1;t.EA(v,0);}break;case _d.d:if(!v.handled){if(v.task_name==_s.etn){_s.etl=1;}if(!v.depends.length){v.handled=1;t.EA(v,1);}else{}}break;case _d.e:if(!v.depends.length){v.task_state=_d.f;t.serveTaskTransaction(v);}break;case _d.f:if(!v.depends.length&&v.executed&&v.handled){t.returnDependency(v.task_name);}else{_m.S("Task "+v.task_name+" was completed without an action,handler,or with dependencies","200.4");}return 1;break;case _d.g:return 1;break;default:_m.S("Task "+v.task_name+" in state "+v.task_state+" will not be handled.","200.4");break;}}else{_m.S("Invalid task reference for "+p.data.id,"200.4");}return 0;};t.EA=function(o,z){var x,y,_d=t.o.data,_s=t.o.s,d,n,z,r;x=(z?o.handler:o.action);y=(z?o.handler_type:o.action_type);if(t.isTask(o)){switch(y){case _d.l:if(o.task_state==_d.d)o.task_state=_d.e;if(o.task_state<=_d.c)o.task_state=_d.d;_m.publish(x,{service:t,task:o});t.serveTaskTransaction(o);break;case _d.h:_x.getXml(x,t.HLX,1,o.task_id);break;case _d.i:t.executeTaskByName(x);t.serveTaskTransaction(o);return 1;break;case _d.j:t.importTaskFromXml(x,o);if(o.task_state==_d.d)o.task_state=_d.e;if(o.task_state<=_d.c)o.task_state=_d.d;t.executeTaskByName(x);t.serveTaskTransaction(o);return 1;break;case _d.m:if(x=="#cdata"){try{if(_s.etl){d=t.getTaskByName(_s.etn).data;z=_x.selectSingleNode(d,_d.n+"task[@id='"+o.task_name+"']",d.documentElement);if(typeof z==$D.O&&z!=null){n=_x.getCDATAValue(z);eval(n);t.serveTaskTransaction(o);return 1;}else{_m.S("Null task id pointer","200.4");return 0;}}else{_m.S("Cannot execute #cdata task action without xml document","200.4");return 0;}}catch(e){_m.S("Error executing #cdata action:"+(e.description?e.description:e.message),"200.4");return 0;}}break;case _d.k:try{z=eval(x);r=1;if(typeof z==$D.F){r=z(o.task_name,t);}if(r){if(o.task_state==_d.d)o.task_state=_d.e;if(o.task_state<=_d.c)o.task_state=_d.d;}t.serveTaskTransaction(o);}catch(e){_m.S("Error executing function action:"+(e.description?e.description:e.message),"200.4");return 0;}break;default:if(o.task_state==_d.d)o.task_state=_d.e;if(o.task_state<=_d.c)o.task_state=_d.d;t.serveTaskTransaction(o);break;}}else{_m.S("Invalid task reference","200.4");}return 0;};t.startTransaction=function(s,p){var v,_d=t.o.data;v=t.getTask(p.data.id);if(v){v.task_state=_d.b;}else{_m.S("Invalid task id "+p.data.id,"200.4");}return 1;};t.endTransaction=function(s,p){var v=t.getTask(p.data.id);if(v.ad){v.task_state=t.o.data.g;t.clearTask(v);}return 1;};t.HLX=function(n,x){var i=x.id,c=t.o,b,_d,a,z;_d=c.data;b=t.getTask(i);if(b){if(typeof x.xdom!=$D.U){b.data=x.xdom;}else{_m.S("Null XML Response","512.5",1);}b.task_state=_d.d;t.serveTaskTransaction(b);}else{_m.S("Invalid task identifier in xml handler","200.4")}};t._handle_window_load=function(){t.o.s.wl=1;t.returnDependency("dom_event_window_load");};_j.IM(t,"base_object","task_service","0.1a");_j.object.IOA(t,"task");_j.registry.ObjectRegistry.addObject(t);_t.register(t);_m.subscribe(t,"dom_event_window_load","_handle_window_load");_m.subscribe(t,"destroy","HWD",window);}}
$E.task.TaskService=new $E.task.TaskServiceImpl();$EP("$E.engine");$E.engine={EngineService:null,EngineServiceImpl:
function(){var t=this,_j=$E,_x=$E.xml,_m=$E.message.MessageService;t.o={s:{pn:"engine_loader",pa:"[nothing]",pat:"default",ph:"engine_service_initialized",pht:"event",dn:"engine",da:"[nothing]",dat:"default",dh:"engine_started",dht:"event",eac:0,ic:0,il:"swc.ocj.engine",al:1,pt:"load_engine_config",pd:0},p:{ts:new $E.task.TaskServiceImpl(),ws:$E.wires.wire.newInstance()}};t.getWireService=function(){return t.o.p.ws;};t.getTaskService=function(){return t.o.p.ts;};t.setAutoLoad=function(b){t.o.s.al=(b?1:0);};t.setConfigurationTaskName=function(s){t.o.s.pt=s;};t.setDefaultConfiguration=function(s){t.o.s.pd=s;};t.setPrimaryEngineAction=function(s){t.o.s.pa=s;};t.setPrimaryEngineActionType=function(s){t.o.s.pat=s;};t.setPrimaryEngineHandler=function(s){t.o.s.ph=s;};t.setPrimaryEngineHandlerType=function(s){t.o.s.pht=s;};t.clearEngine=function(i){var _p=t.o.p,o,b,h;if(typeof i==$D.S)o=t.getEngine(i);if(typeof i==$D.O)o=i;if(t.isEngine(o)){b=o.eo;for(h=b.length-1;h>=0;h--){_j.registry.ObjectRegistry.sendDestroyTo(b[h].object);}o.eo=[];o.en=[];o.ei=[];if(o.engine_element){_x.removeChildren(o.engine_element);o.engine_element.parentNode.removeChild(o.engine_element);}_p.engines[o.engine_index]=null;_p.engineindex[o.engine_id]=null;_p.enginenames[o.engine_name]=null;}else{_m.S("Invalid engine reference '"+i+"'","200.4");}};t.clearEngines=function(){var _p=t.o.p,a,i,o,h,b,_t;a=_p.engines;_t=_p.ts;for(i=a.length-1;i>=0;i--){t.clearEngine(a[i]);}_p.engines=[];_p.engineindex=[];_p.enginenames=[];_t.clearTasks();};t.getPrimaryEngine=function(){return t.getEngineByName(t.o.s.pn);};t.handle_window_load=function(){if(t.o.s.al)t.loadEngines();};t.loadEngines=function(b){var _p=t.o.p,o,m=[],e,i,v,_s=t.o.s,s="p",x,_t,a,at,h,ht,l,n,z,c,p,q,pn;_t=_p.ts;x=_t.addTaskLoader;if(document.body==null){_m.S("Engine unable to initialize due to unexpected DOM.","200.5",1);return 0;}q=document.getElementsByTagName("engine");for(i=0;i<q.length;i++){m[m.length]=q[i];}p=_x.queryNodes(document.body,"div",null,"is-engine","1");for(i=0;i<p.length;i++){m[m.length]=p[i];}if(!b&&!m.length&&!_p.engines.length)return t.loadEngines(1);if(b){m=[1];}for(i=0;i<m.length;i++){if(!b)e=m[i];c=++_s.ic;if(_p.engines.length>0){s="d";x=_t.addTask;n=_s[s+"n"]+"_"+c;}else{n=_s[s+"n"];}z=_s.il+"_"+c;if(!b){if(typeof e.getAttribute("name")==$D.S){n=e.getAttribute("name");}else{e.setAttribute("name",n);}if(typeof e.getAttribute("engine-id")==$D.S){z=e.getAttribute("engine-id");}else{e.setAttribute("engine-id",z);}}if(t.getEngineByName(n)){continue;}if(!b&&typeof e.getAttribute("engine-action")==$D.S){a=e.getAttribute("engine-action");}else{a=_s[s+"a"];}if(!b&&typeof e.getAttribute("engine-action-type")==$D.S){at=e.getAttribute("engine-action-type");}else{at=_s[s+"at"];}if(!b&&typeof e.getAttribute("engine-handler")==$D.S){h=e.getAttribute("engine-handler");}else{h=_s[s+"h"];}if(!b&&typeof e.getAttribute("engine-handler-type")==$D.S){ht=e.getAttribute("engine-handler-type");}else{ht=_s[s+"ht"];}if(!b&&typeof e.getAttribute("engine-config-task")==$D.S){_s.pt=e.getAttribute("engine-config-task");}o=x(n,at,a,ht,h);l=_p.engines.length;v=$E.FN("engine_object",(b?0:e),z,n,o,l);if(!l)v.is_primary=1;else{_t.addTaskDependency(o,_s.pn);_t.addTaskDependency(o,_s.pt);}_p.engines[l]=v;_p.enginenames[n]=l;_p.engineindex[z]=l;_t.executeTask(o);}};t.applyConfiguration=function(o,c){var v,_s=t.o.s,s,_t=t.o.p.ts,_p=t.o.p,i,a;s=_s.pd;v=_t.getTaskByName(_s.pt);if(t.isEngine(o)){a=o.eo;for(i=a.length-1;i>=0;i--){_j.registry.ObjectRegistry.sendDestroyTo(a[i].object);}o.eo=[];o.en=[];o.ei=[];if(o.engine_element)_x.removeChildren(o.engine_element);o.config_name=0;if(_t.isTaskComplete(v)&&typeof v.data==$D.O){if((o.engine_element&&o.engine_element.getAttribute("engine-config"))||typeof c==$D.S){s=(typeof c==$D.S)?c:o.engine_element.getAttribute("engine-config");}if(!s){return 0;}o.config_name=c;t.PC(o,v,s);_m.publish("onengineconfigload",o);}}else{_m.S("Invalid engine reference for applyConfiguration","200.4");}};t.PC=function(o,v,s,p,x,b){var a,i,n,q,d,r,m,u,g,j,y,z,f,b,c,h,k,l,e=0,w,br,cx,cxv,cxp,ab,nr;if(typeof p==$D.U)p=_x.selectSingleNode(v.data,"configuration[@id='"+s+"']",v.data.documentElement);if(p){a=p.childNodes;for(i=0;i<a.length;i++){n=a[i];br=1;ab=0;cx=0;if(n.nodeType==1){q=n.nodeName;d=_x.selectSingleNode(v.data,"object-definitions/definition[@id='"+q+"' or matdef[@rid='"+q+"']]",v.data.documentElement);if(d){y=_x.selectSingleNode(v.data,"implementation",d);g=0;k=0;j=[];if(y){z=_x.selectSingleNode(v.data,"package",y);k=(y.getAttribute("use-parent")=="1"?1:0);cx=(y.getAttribute("context-switch")=="1"?1:0);cxp=y.getAttribute("context-path");if(cxp)cxp=t.PO(o,v,cxp,n,x,b,p);br=(y.getAttribute("no-recursion")=="1"?0:1);ab=(y.getAttribute("abstract")=="1"?1:0);if(z&&(u=z.getAttribute("pid"))&&ValidatePackage(u)){g=GetPackage(u);if(g&&(u=z.getAttribute("mid"))){if(typeof g[u]==$D.F)g=g[u]();}}}y=_x.selectSingleNode(v.data,"constructor[@name]",y);if(y){f=y.getAttribute("name");z=_x.selectNodes(v.data,"param",y);for(h=0;h<z.length;h++){m=z[h];u=0;if(m.getAttribute("value")){r=m.getAttribute("value");if(r.match(/^ora:/i)){u=t.PO(o,v,r,n,x,b,p);}else{u=r;}}j[j.length]=u;}}nr=n.getAttribute("aid");nr=(typeof nr==$D.S&&nr.length?nr:0);if(nr){n.setAttribute("id",nr+(++t.o.s.eac));}try{if(!ab){if(typeof g==$D.O&&typeof g[f]==$D.F){w=g[f].apply(0,j);}else if(k&&typeof x[f]==$D.F){w=x[f].apply(x,j);}else{_m.S("Unexpected implementation with g="+g+" and f="+f,"200.4");}}else{w=x;}}catch(e){alert((e.description?e.description:e.message));}if(k){e=w;w=x;}l=o.eo.length;q=n.getAttribute("rid");q=(typeof q==$D.S&&q.length?q:0);if(w!=null&&typeof w==$D.O&&_j.registry.ObjectRegistry.isRegistered(w)&&typeof o.ei[w.i]!=$D.N){o.eo[l]={object:w,config:s,rid:q};o.ei[w.i]=l;if(q&&typeof o.en[q]!=$D.N){o.en[q]=l;}}if(cx&&w){if(!w.documentElement){_x.setInnerXHTML(n,w,0,v.data);}else{if(o.dp)cxp=o.dp;nr=(cxp?_x.selectSingleNode(w,cxp,w.documentElement):w.documentElement);if(!nr)nr=w.documentElement;_x.setInnerXHTML(n,nr,0,v.data);}w=x;}if(br)t.PC(o,v,s,n,w,e);if(w&&w.t&&w.t.match(/^xhtml_component$/)){w.post_init();}}else{if(typeof x==$D.U)x=o;if(typeof x==$D.O&&x!=null&&typeof x.getContainer==$D.F){_x.setInnerXHTML(x.getContainer(),n,true);}}}else if(n.nodeType==3){if(n.nodeValue.replace(/\s/g,"").length&&typeof x==$D.O&&typeof x.getContainer==$D.F){_x.setInnerXHTML(x.getContainer(),n,1);}}}}else{_m.S("Page config for "+s+" not found.","200.4");}};t.PO=function(o,v,r,e,x,b,q){var z=0,a,n,p,d,f,c,up,i;r=r.replace(/^ora:/i,"");if(r.match(/(\S*)_parent$/i)){r=r.match(/(\S*)_parent$/i)[1];up=1;}if(r.match(/(\S*)_attr$/i)){a=r.match(/(\S*)_attr$/i)[1];r="attr";}if(r.match(/integer_(\S*)$/i)){a=r.match(/integer_(\S*)$/i)[1];r="integer";}if(r.match(/xpath-node-value:(\S*)/i)){a=r.match(/xpath-node-value:(\S*)/i)[1];r="xpath-node-value";}if(r.match(/xpath-node-value-list:(\S*)/i)){a=r.match(/xpath-node-value-list:(\S*)/i)[1];r="xpath-node-value-list";}switch(r){case "node_context":z=e;break;case "element_context":z=q;break;case "bool_true":z=1;break;case "data_source":z=o.ds;break;case "parent_reference":z=b;break;case "xpath-node-value-list":f=_x.selectNodes(v.data,a,e);p=[];for(c=0;c<f.length;c++){d=f[c];if(d.getAttribute("value")){p[p.length]=t.PO(o,v,d.getAttribute("value"),e,x,b,q);}}z=p;break;case "xpath-node-value":n=_x.selectSingleNode(v.data,a,e);if(n){z=n.nodeValue;}break;case "params_array":a=_x.selectNodes(v.data,"params/param",e);p=[];for(c=0;c<a.length;c++){d=a[c];if(d.getAttribute("value")){p[p.length]=d.getAttribute("value");}}z=p;break;case "integer":z=parseInt(a);if(isNaN(z))z=0;break;case "attr":if(a){if(up){z=e.parentNode.getAttribute(a);}else{z=e.getAttribute(a);}}break;case "engine_object":z=o;break;case "engine_element":z=o[r];break;case "parent_element":if(typeof x==$D.U)x=o;if(typeof x.getContainer==$D.F){z=x.getContainer();}break;case "engine_id":z=o.engine_id;break;default:z=r;break;}if(typeof z==$D.S&&z.match(/\?/)&&z.match(/%ora:/)){up=z.substring(z.lastIndexOf("?")+1,z.length).split("&");for(c=0;c<up.length;c++){d=up[c];if(!d.match(/%ora:/))continue;n=new RegExp(d.match(/%ora:\S*%/));a=d.match(/%ora:(\S*)%/i)[1];if(a.match(/data_variant_\d*/)){i=parseInt(a.match(/data_variant_(\d*)/)[1]);if(isNaN(i))i=-1;a="data_variant";}r=0;switch(a){case "eid":r=o.engine_id;break;case "data_variant":if(i>=0){r=o.getDataVariant(i);}break;case "data_source":r=o.ds;break;}z=z.replace(n,r);}}return z;};t.HES=function(s,v){var e;if(typeof v==$D.O&&typeof v.task==$D.O&&(e=t.getEngineByName(v.task.task_name))){if(e.is_primary){_m.S("Engine "+e.engine_id+" is the primary engine and should not be handled by this event.","200.5",1);}t.applyConfiguration(e);_j.util.EH(e.engine_element,"engine-onload");}else{_m.S("Invalid engine reference for engine_started","200.4");}};t.HEI=function(){var _p=t.o.p,e;if(_p.engines.length){e=_p.engines[0].engine_element;t.applyConfiguration(_p.engines[0]);_j.util.EH(e,"engine-onload");}return 1;};$E.IM(t,"base_object","engine_service","0.0.141.1205.2003");_j.object.IOA(t,"engine");_m.subscribe(t,"dom_event_window_load","handle_window_load");_m.subscribe(t,"engine_started","HES");_m.subscribe(t,"engine_service_initialized","HEI");$E.registry.ObjectRegistry.addObject(t);}};$E.engine.EngineService=new $E.engine.EngineServiceImpl();$EP("$E.appcomp");$E.appcomp.ApplicationComponent={o:{s:{c:"acid",g:"accfgid",k:"appcomp_path",r:"acrid",p:"participant-id"}},bindComponent:
function(o,i,c,p){var _a=$E.appcomp.ApplicationComponent,z,q=o,r;r=_a.o.s.r;if(typeof q==$D.S){q=$E.registry.ObjectRegistry.getObject(o);if(q!=null&&typeof q.getContainer==$D.F)q=q.getContainer();}if(typeof q!=$D.O||q==null)return 0;if(typeof q[r]==$D.S)return 0;z=_a.newInstance(0,0,o,0,p);z.setBindingEnabled(true);z.loadComponent(i,c);q[r]=z.i;return z;},newInstance:
function(i,o,c,f,p){var n=$E.FN("base_object","application_component","0.0.97.1205.2003");if(typeof o==$D.F)f=o;if(typeof o!=$D.O)o=0;if(typeof i!=$D.S)i=0;if(typeof p!=$D.S)p=0;if(typeof c==$D.U)c=0;n.o={p:{},s:{c:0,n:0,e:c,i:1,p:"application-components",m:"application-component",a:0,h:f,b:0,eb:"change,focus,blur,mouseover,mouseout,click",t:1,tn:p,ti:0}};if(i&&1)n.i=i;n.sigterm=function(){this.destroy();};n.destroy=function(){var t=this;if(t.r<5){if(typeof t.component_destroy==$D.F)t.component_destroy();t.r=5;$E.registry.ObjectRegistry.removeObject(t);}};n.release=function(){this.r=2;};n.setBindingEnabled=function(b){this.o.s.b=b;};n.getBindingEnabled=function(){return this.o.s.b;};n.setContainerId=function(s){this.o.s.e=s;};n.getContainerId=function(s){return this.o.s.e;};n.getComponentName=function(){return this.o.s.n;};n.getContainer=function(){var o=this.o.s.e;if(!o)return 0;if(typeof o==$D.S)o=$E.registry.ObjectRegistry.getObject(o);if(o!=null&&typeof o.getContainer==$D.F)o=o.getContainer();return o;};n.loadComponent=function(l,c){var t=this,_s,_x=$E.xml,_p;_s=t.o.s,_p=t.o.p;if(typeof c!=$D.S||typeof l!=$D.S)return 0;_s.c=c;_s.n=l;_x.getXml(c,null,_s.a,(_s.a?t.i:c),!(_s.a));};n.init=function(o){var t=this,_s;_s=t.o.s;t.r=1;if(typeof o==$D.O)t.importNodeDefinition(o);};n.HLX=function(s,v){var t=this,o,_x=$E.xml,x,_s;_s=t.o.s;if(v.id==(_s.a?t.i:_s.c)&&t.r<4){x=v.xdom;o=_x.selectSingleNode(x,"/"+_s.p+"/"+_s.m+"[@id='"+_s.n+"']",x.documentElement);if(o!=null)t.importNodeDefinition(o);else $E.message.MessageService.S("Invalid component definition for '"+_s.n+"'","200.4",1);}};n.importNodeDefinition=function(x){var i,t=this,_s,p;_s=t.o.s;t.r=3;if(typeof x!=$D.O||x==null){return 0;}i=x.getAttribute("id");p=x.getAttribute($E.appcomp.ApplicationComponent.o.s.p);return n.importComponentDefinition($E.xml.getCDATAValue(x),i,p);};n.importComponentDefinition=function(s,i,pn){var t=this,_s;_s=t.o.s;if(typeof s!=$D.S)return 0;if(typeof t.component_destroy==$D.F)t.component_destroy();t.r=3;if(i)_s.n=i;else _s.n=$E.GG();if(pn)_s.tn=pn;else if(!_s.tn)_s.tn=_s.n;s='{'+s+'}';$E.merge(t,_s.n,s);var a,l,h,o=_s.e,ph;if(_s.b&&_s.eb&&o){$E.dom.event.addEventBuffer(t);if(typeof o==$D.S)o=$E.registry.ObjectRegistry.getObject(o);if(o){if(typeof o.getContainer==$D.F)o=o.getContainer();a=_s.eb.split(",");for(l=0;l<a.length;l++){h='_handle_'+a[l];ph='_prehandle_'+a[l];if(typeof t[ph]==$D.F){$E.dom.event.removeEventListener(o,a[l],t[ph]);t[ph]=null;}if(typeof t[h]==$D.F){t.createHandler(a[l],0,0,1);$E.dom.event.addEventListener(o,a[l],t[ph]);}}}}if(typeof t.component_init==$D.F)t.component_init();t.r=4;var _t=$E.transaction.TransactionService,p;if(_s.t&&_t.canRegister(t)){_t.register(t);p=_t.getPacketByName(_s.tn);if(p){_s.ti=p.packet_id;p.setBlockStartTransaction(false);_t.addTransactionParticipant(t,p);}else{_s.ti=_t.openTransaction(_s.tn,t,{type:0,src:0,data:0});}}if(typeof _s.h==$D.F)_s.h("onloadappcomp",t);};n.getPacket=function(n){var _t=$E.transaction.TransactionService;if(n)return _t.getPacketByName(n);else return _t.getPacket(this.o.s.ti);};n.serveTransaction=function(v,r,b,n){var _t=$E.transaction.TransactionService,p,t=this;p=t.getPacket(n);if(p){p.data.type=v;p.data.src=r;_t.serveTransaction(p,t.i,(!b));return 1;}return 0;};n.doTransaction=function(s,p){var t=this,q,qh;if(typeof t._handle_transaction==$D.F)t._handle_transaction(s,p);q=p.data.type;qh='_handle_'+q;if(q&&typeof t[qh]==$D.F)t[qh](s,p);return 0;};n.startTransaction=function(s,p){var	t=this;if(typeof t._handle_begin_transaction==$D.F)t._handle_begin_transaction(s,p);return 1;};n.endTransaction=function(s,p){var t=this;if(typeof t._handle_end_transaction==$D.F)t._handle_end_transaction(s,p);return 1;};if($E.registry.ObjectRegistry.addObject(n)){$E.message.MessageService.subscribe(n,"onloadxml","HLX");n.init(o);}else{$E.message.MessageService.S("Could not add application component to registry","200.4");}return n;}}
$EP("$E.util.url");$E.util.url={qualifyToHost:
function(u){var _u=$E.util.url.newInstance(document.URL,0);return _u.qualify(u);},newInstance:
function(v,b){var n=$E.FN("base_object","url_composite","0.0.2.1205.2003");if(b)v=$E.util.url.qualifyToHost(v);n.o={s:{ov:0,r:0,d:0,p:0,f:0,q:0,x:(b?1:0)}};n.getFile=function(){return this.o.s.f;};n.getQuery=function(){return this.o.s.q;};n.getDomain=function(){return this.o.s.d;};n.getPath=function(){return this.o.s.p;};n.getProtocol=function(){return this.o.s.r;};n.qualify=function(u){var f=u,_s,t=this;_s=t.o.s;if(!u.match(/\/\//)){if(!u.match(/^\//)||u.match(/^\.\//)){if(u.match(/^\.\//))u=u.substring(2,u.length);f=_s.r+"://"+_s.d+_s.p+u;}else{if(u.match(/^\//)){f=_s.r+"://"+_s.d+u;}else{}}}return f;};n._init=function(o){var _s,t=this,u,v,m;_s=t.o.s;u=_s.ov=o;if(u.match(/\?/)){i=u.indexOf("?");_s.q=u.substring(i+1,u.length);u=u.substring(0,i);}if(u.match(/\/\//)){i=u.indexOf("//");v=u.substring(0,i+2);u=u.substring(i+2,u.length);if(v.match(/:/)){m=v.indexOf(":");_s.r=v.substring(0,m);}else{_s.r="http";}}if(!u.match(/\//)){if(!_s.r)_s.r="http";_s.d=u;u="";}i=u.indexOf("/");if(i>-1){_s.d=u.substring(0,i);u=u.substring(i,u.length);}if(!_s.r)_s.r="http";if(u.length){i=u.lastIndexOf("/");if(i>-1){v=u.substring(0,i+1);_s.p=v;u=u.substring(i+1,u.length);}}if(u.length){_s.f=u;}};n._init(v);return n;}}
$EP("$E.snt");$E.snt={SimpleTransferService:0,SimpleTransferServiceImpl:
function(){var t=this,_m=$E.message.MessageService,_x=$E.xml;t.o={p:{codes:[],cn:[],rpc:[],rqc:[],new_userdata:[],uud:[],rud:[],dud:[],userdata:[],af:[],ac:[]},s:{u:0,i:0,s:0,n:0,l:0,z:0},data:{A:"param",B:"user-data",C:"codes",D:"code",E:"transfer",F:"request",G:"response",H:"code-name",I:"code",J:"name",K:"id",L:"value",M:"switch",N:"group-name",O:"mimetype",P:"description"}};t.getSessionId=function(){return t.o.s.i;};t.getSecurityId=function(){return t.o.s.s;};t.getFlags=function(){return t.o.p.af;};t.getFlag=function(s){return(typeof t.o.p.af[s]==$D.O&&t.o.p.af[s].value?1:0);};t.getIsLoggedIn=function(){return t.o.s.l;};t.getIsSynchronized=function(){return t.o.s.z;};t.getCanLogin=function(){return(t.o.s.z&&!t.o.s.l);};t.getCanLogout=function(){return(t.o.s.z&&t.o.s.l);};t.getCodeByName=function(n){var c=t.o.p;if(typeof c.cn[n]==$D.N)return c.codes[c.cn[n]];return 0;};t.isCode=function(o){var _p=t.o.p;if(typeof o==$D.O&&o!=null&&typeof _p.cn[o.code_name]==$D.N&&typeof _p.codes[_p.cn[o.code_name]]==$D.O){return 1;}return 0;};t.setServiceUrl=function(u){u=$E.util.url.qualifyToHost(u);t.o.s.u=u;};t.deleteUserData=function(n,l){var _p=t.o.p;if(typeof l==$D.U)l=0;if(typeof n!=$D.S||n.length==0){_m.S("Invalid user data item '"+n+"'","200.4");return 0;}_p.dud[_p.dud.length]={n:n,l:l};};t.removeUserData=function(h){if(!t.o.s.i){_m.S("Invalid session id","200.4");return 0;}if(!t.o.p.dud.length){_m.S("No user data delete requests were added","200.4");return 0;}return t.request("deluserdata","Get Data for Account",h);};t.getUserDataArray=function(){return t.o.p.userdata;};t.getUserData=function(n,l){var _p=t.o.p;if(typeof l==$D.U)l=0;if((typeof n!=$D.S&&typeof n!=$D.N)||(typeof n==$D.S&&n.length==0)||(typeof n==$D.N&&n<=0)){_m.S("Invalid user data item '"+n+"'","200.4");return 0;}_p.rud[_p.rud.length]={n:n,l:l};return 1;};t.requestUserData=function(h){if(!t.o.s.i){_m.S("Invalid session id","200.4");return 0;}if(!t.o.p.rud.length){_m.S("No user data requests were added","200.4");return 0;}return t.request("getuserdata","Get Data for Account",h);};t.requestUserDataList=function(l,f,v,h){var _p=t.o.p;if(typeof l==$D.U)l=0;if(!t.o.s.i){_m.S("Invalid session id","200.4");return 0;}return t.request("getuserdatalist","Get Data for Account",h,{l:l,f:f,v:v});};t.clearNewRequests=function(){t.o.p.nud=[];};t.changeLargeUserData=function(n,d,v,m,g){return t.modifyLargeUserData(n,d,v,m,g,1);};t.addLargeUserData=function(n,d,v,m,g){return t.modifyLargeUserData(n,d,v,m,g,0);};t.modifyLargeUserData=function(n,d,v,m,g,b){var _p=t.o.p,a;if(b)a=_p.uud;else a=_p.nud;if(typeof g==$D.U)g="private";if(typeof n!=$D.S||n.length==0||typeof v!=$D.S||v.length==0||typeof d!=$D.S||d.length==0||typeof m!=$D.S||m.length==0){_m.S("Invalid user data values","200.4",1);return 0;}a[a.length]={n:n,v:v,l:1,d:d,m:m,g:g};return 1;};t.addUserData=function(n,v){var _p=t.o.p;if(typeof n!=$D.S||n.length==0||typeof v!=$D.S||v.length==0){_m.S("Invalid user data item '"+n+"'='"+v+"'","200.4");return 0;}_p.nud[_p.nud.length]={n:n,v:v,l:0,d:0,m:0,g:0};return 1;};t.updateUserData=function(h,b){if(!t.o.s.i){_m.S("Invalid session id","200.4");return 0;}if((!b&&!t.o.p.nud.length)||(b&&!t.o.p.uud.length)){_m.S("No new user data items were added","200.4");return 0;}return t.request((b?"updateuserdata":"adduserdata"),"Add Data to Account",h);};t.login=function(u,p,h){var _s=t.o.s;if(_s.n==u&&_s.i){_s.i=0;_s.l=0;}else if(_s.i){_m.S("You must log out of the current account before logging in to another.","200.3",1);return 0;}_s.n=u;return t.request("login","basic login",h,{u:u,p:p});};t.logout=function(h){var _s=t.o.s;if(_s.i){return t.request("logout","basic logout",h);}else{_m.S("Invalid session id","200.4");}return 0;};t.request=function(c,n,h,v){var _d=t.o.data,o,l,_p=t.o.p,_s=t.o.s,x,y,e,b=0;y=c.toLowerCase();if(!_s.u){_m.S("Invalid service url.","200.4");return 0;}if(typeof h!=$D.F){_m.S("Handler not specified.","200.4");}x=_x.newXmlDocument(_d.E);e=x.createElement(_d.F);x.documentElement.appendChild(e);if(typeof c==$D.S){if(typeof _p.cn[y]==$D.N){o=_p.codes[_p.cn[y]];e.setAttribute(_d.I,o.rno);b=o.code_name;}else{e.setAttribute(_d.H,c);b=c;c=0;}}o=$E.FN("service_object",n,c,b,h);l=_p.services.length;_p.services[l]=o;_p.serviceindex[o.service_id]=l;_p.servicenames[n]=l;t.H(o,x,e,v);_x.postXml(_s.u,x,t.HXR,1,o.service_id);return 1;};t.H=function(o,x,e,v){if(!t.isService(o)){_m.S("Webservice.H:object is not a service object.","200.4");}var u,p,m,_s=t.o.s,_d=t.o.data,i,_p=t.o.p,z,f,n;if(_s.i){t.M(x,e,"sessionid",_s.i);}if(_s.s){t.M(x,e,"securityid",_s.s);}switch(o.code_name){case "synchronize":_s.z=0;break;case "deluserdata":for(var i=0;i<_p.dud.length;i++){p=_p.dud[i];u=x.createElement(_d.B);u.setAttribute(_d.J,p.n);e.appendChild(u);if(p.l){u.setAttribute(_d.M,"1");}if(_p.userdata[p.n])_p.userdata[p.n]=0;}break;case "getuserdata":for(var i=0;i<_p.rud.length;i++){p=_p.rud[i];u=x.createElement(_d.B);if(typeof p.n==$D.S)u.setAttribute(_d.J,p.n);else if(typeof p.n==$D.N)u.setAttribute(_d.K,p.n);if(p.l){u.setAttribute(_d.M,"1");}e.appendChild(u);}break;case "updateuserdata":case "adduserdata":var a=(o.code_name=="adduserdata"?_p.nud:_p.uud);for(var i=0;i<a.length;i++){p=a[i];u=x.createElement(_d.B);u.setAttribute(_d.J,p.n);if(!p.l){u.setAttribute(_d.L,p.v);}else{u.setAttribute(_d.M,"1");u.setAttribute(_d.L,"#cdata");u.appendChild(x.createCDATASection(p.v));if(p.m)u.setAttribute(_d.O,p.m);if(p.g)u.setAttribute(_d.N,p.g);if(p.d)u.setAttribute(_d.P,p.d);}e.appendChild(u);_p.userdata[p.n]=p.v;}break;case "getuserdatalist":if(typeof v==$D.O){t.M(x,e,"use-large-table",v.l);if(v.f)t.M(x,e,"filter-name",v.f);if(v.v)t.M(x,e,"filter-value",v.v);}break;case "login":if(typeof v==$D.O){u=v.u;p=v.p;if(typeof u==$D.S&&u.length){t.M(x,e,"username",u);}if(typeof p==$D.S&&p.length){t.M(x,e,"password",p);}}break;default:break;}};t.M=function(x,p,n,v){var _d=t.o.data,o;o=x.createElement(_d.A);o.setAttribute(_d.J,n);o.setAttribute(_d.L,v);p.appendChild(o);return o;};t.R=function(o){var _d=t.o.data,c,r,p,_p=t.o.p,n;if(t.isService(o)){x=o.service_xml;if(typeof x==$D.O&&x!=null&&x.documentElement!=null){r=_x.selectSingleNode(x,"/"+_d.E+"/"+_d.F);p=_x.selectSingleNode(x,"/"+_d.E+"/"+_d.G);if(typeof r==$D.O&&typeof p==$D.O&&r!=null&&p!=null){c=parseInt(r.getAttribute("code"));e=parseInt(p.getAttribute("code"));if(!isNaN(c)&&!isNaN(e)){if(typeof _p.rpc[e]==$D.N){z=_p.codes[_p.rpc[e]];t.Z(o,z,x,r,p,c,e);}else{t.Y(o,x,r,p,c,e);}}else{_m.S("Unexpected request/response codes in R","200.4");}}else{_m.S("Null request/response structure in R","200.4");}}else{_m.S("Null XML in R","200.4");}}else{_m.S("Webservice.R:object is not a service object.","200.4");}};t.P=function(o,c,r,p){var v,u,z;v=(r%2?0:1);u=(p%2?0:1);o.completed=1;z={snt:t,service:o,code:c,request:v,response:u};if(typeof o.handler==$D.F){try{o.handler("onservicecomplete",z);}catch(e){_m.S("Error Processing SNT Handler:"+(e.description?e.description:e.message),"200.4",1);}}_m.publish("onservicecomplete",z);};t.Z=function(o,z,x,r,p,c,e){var _s=t.o.s,v,u,a,i,z,y,w,_p=t.o.p,b,d;v=(c%2?0:1);u=(e%2?0:1);b=(_s.s)?1:0;_s.s=0;var s_id=_x.selectSingleNode(x,"param[@name='securityid']",p);if(s_id!=null){_s.s=s_id.getAttribute("value");}s_id=_x.selectSingleNode(x,"param[@name='sessionid']",p);if(s_id!=null){var tmp=s_id.getAttribute("value");if(!_s.i)_s.i=tmp;else if(_s.i!=tmp){_m.S("Security warning. Session ID has been changed and this client has refused the new id value. This error may be raised by repeatedly logging in to the same account from multiple clients. It is suggested that this session be terminated by logging off and restarted by logging back in.","200.4",1);}}if(b&&(!_s.i||!_s.s)){_p.af=[];_p.ac=[];_s.l=0;o.code_name="issessioninvalid";_m.S("Security warning. Session id or Security id was not transmitted. This warning may occur when you've logged out,your session has expired,or you've attempted to start multiple sessions.","200.4");}switch(z.code_name){case "isactionrestricted":if(!u){_m.S("Security Warning:Request code '"+(o.code_name.toUpperCase())+"' was made anonymously or from an account with insufficient management rights.","513.4",1);}break;case "reloadcodes":break;case "deluserdata":t.o.p.dud=[];break;case "updateuserdata":t.o.p.uud=[];break;case "adduserdata":t.o.p.nud=[];break;case "login":if(u)_s.l=1;break;case "getuserdatalist":d=[];t.I(x,p,"u-list",d);o.pd=d;break;case "getcontactinformation":_p.ac=[];t.I(x,p,"ci",_p.ac);break;case "getaccountflags":_p.af=[];t.I(x,p,"flag",_p.af,true);break;case "getuserdata":_p.rud=[];t.I(x,p,"user-data",_p.userdata);break;case "logout":_s.i=0;_s.s=0;_s.n=0;_s.l=0;break;case "synchronize":t.Y(o,x,r,p,c,e);return 1;break;default:break;}t.P(o,z,c,e);};t.I=function(d,p,z,a,b){var i,o,w,y,c=_x.selectNodes(d,z,p);for(i=0;i<c.length;i++){o=c[i];w=o.getAttribute("name");y=o.getAttribute("value");if(typeof w==$D.S&&w.length>0&&typeof y==$D.S&&y.length>0){if(y.match(/^#cdata$/))y=_x.getCDATAValue(o);if(b)y=(y=="1"||y=="true")?1:0;a[w]={value:y};if(o.nodeName.match(/^u-list$/)||o.nodeName.match(/^user-data$/)){a[w].name=w;a[w].mimetype=o.getAttribute("mimetype");a[w].group_id=o.getAttribute("group-id");a[w].group_name=o.getAttribute("group-name");a[w].description=o.getAttribute("description");if(o.getAttribute("id")){a[w].id=parseInt(o.getAttribute("id"));}}}}};t.Y=function(o,x,r,p,c,e){var a,i,_d=t.o.data,_p=t.o.p,y,z,w,q;switch(o.code_name){case "synchronize":a=_x.selectNodes(x,_d.C+"/"+_d.D,p);_p.codes=[];_p.cn=[];_p.rqc=[];_p.rpc=[];for(i=0;i<a.length;i++){var	rq,rp,ro,rno,po,pno,cn,cd=0,d;y=a[i];cn=y.getAttribute("name");rq=_x.selectSingleNode(x,"request",y);rp=_x.selectSingleNode(x,"response",y);d=_x.selectSingleNode(x,"description",y);if(d!=null){cd=_x.getInnerText(d);}if(cn==null||cn.length==0||rq==null||rp==null){_m.S("Invalid code syntax in XML","200.4");continue;}ro=parseInt(rq.getAttribute("ok"));rno=parseInt(rq.getAttribute("notok"));po=parseInt(rp.getAttribute("ok"));pno=parseInt(rp.getAttribute("notok"));if(isNaN(ro)||isNaN(rno)||isNaN(po)||isNaN(pno)){_m.S("Invalid code value in XML","200.4");continue;}w=$E.FN("code_object",cn,ro,rno,po,pno,cd);z=_p.codes.length;_p.codes[z]=w;_p.cn[w.code_name]=z;_p.rqc[w.ro]=z;_p.rqc[w.rno]=z;_p.rpc[w.po]=z;_p.rpc[w.pno]=z;}t.o.s.z=(a.length?1:0);break;default:_m.S("Unable to process code by name '"+o.code_name+"'","200.4");break;}q=t.getCodeByName(o.code_name);t.P(o,q,c,e);};t.HXR=function(s,v){var _p=t.o.p,o;o=t.getService(v.id);if(typeof v==$D.O&&!t.isService(o)){_m.S("Unexpected invocation of ocjs.H:"+v.id,"200.4");return 0;}if(typeof v.xdom==$D.O&&v.xdom!=null){o.service_state=4;o.service_xml=v.xdom;t.R(o);}else{_m.S("Webservice.H not ok for "+o.service_id,"200.4");}};$E.object.IOA(t,"service");$E.IM(t,"base_object","snt_service","0.2.65.1205.2003");$E.registry.ObjectRegistry.addObject(t);}};$E.snt.SimpleTransferService=new $E.snt.SimpleTransferServiceImpl();$EP("$E.xhtml");$E.xhtml.XHTMLComponent={newInstance:
function(hp,xn,cid,rid,cc,cn,cp){if(!xn)return null;if(!hp&&typeof xn==$D.O)hp=document;if(!cid)cid=0;if(!cc)cc=0;if(typeof cc==$D.S)cc=GetPackage(cc);var n=$E.FN("base_object","xhtml_component","0.0.38.1205.2003");n.o={p:{c:0,r:hp,cc:cc,a:0},s:{rid:rid,cid:cid,cn:cn,cp:cp}};n.getContainer=function(){return this.o.p.c;};n.getReferenceId=function(){return this.o.s.rid;};n.destroy=function(){var _p,t=this,_s;_p=t.o.p;_s=t.o.s;if(t.r==4){if(_p.cc&&_s.cid)_p.cc.synchronizeComponent(t);if(_p.a)_p.a.destroy();if(_p.r&&_p.r!=_p.c){_p.r.removeChild(_p.c);}$E.registry.ObjectRegistry.removeObject(t);}t.r=0;};n.init_component=function(){var t=this,o,p,_s=t.o.s,_p=t.o.p,_ac=$E.appcomp.ApplicationComponent,i,d,a,dc,dp;if(typeof hp==$D.O&&typeof xn==$D.O){o=$E.xml.setInnerXHTML(hp,xn,1,0,1);}else{o=hp;}if(_s.rid&&o&&!o.getAttribute("erid"))o.setAttribute("erid",_s.rid);t.o.p.c=o;i=(_s.cn?_s.cn:o.getAttribute(_ac.o.s.c));if(i){if(_s.cp){dp=_s.cp;}else{a=o.getAttribute(_ac.o.s.g);if(!a||a.length==0)a=_ac.o.s.k;dc=$E.util.driver.ApplicationDriver.getConfig();if(dc)dp=dc.getParam(a);}if(dp){_ac.bindComponent(t.i,i,dp);}else{$E.message.MessageService.S("Component binding to "+dp+" for "+i+" using "+a+" failed.","200.4");}}t.r=4;};n.post_init=function(){var _s=this.o.s,_p=this.o.p;if(_p.cc&&typeof _p.cc.addComponent==$D.F)_p.cc.addComponent(this,_s.rid);};$E.registry.ObjectRegistry.addObject(n);n.init_component();return n;}};$EP("$E.xhtml");$E.xhtml.validator={XHTMLValidator:0,XHTMLValidatorImpl:
function(){var t=this,_x=$E.xml,_m=$E.message.MessageService;t.o={p:{p:[]},s:{p:0,l:0,a:1}};t.getPatternsFilePath=function(){return t.o.s.p;};t.getPatternsLoaded=function(){return t.o.s.l;};t.P=function(d){if(!d||d.documentElement==null)return 0;var a=_x.selectNodes(d,"pattern",d.documentElement),pid,vt,vc,ed,mp,rp,an,e,i=0,y,ii,_p=t.o.p,_s=t.o.s,p;p=_p.p;_s.l=0;for(;i<a.length;i++){e=a[i];pid=e.getAttribute("id");vt=e.getAttribute("validation-type");vc=e.getAttribute("comparison");an=e.getAttribute("allow-null");if(typeof pid!=$D.S||!pid.length||typeof vt!=$D.S||!vt.length){alert("Invalid pattern id('"+pid+"')or validation-type('"+vt+"')");continue;}if(typeof p[pid]!=$D.U){alert("Pattern id '"+pid+"' is already defined.");continue;}mp=_x.getCDATAValue(_x.selectSingleNode(d,"match",e));if(!mp.length)mp=0;rp=_x.getInnerText(_x.selectSingleNode(d,"replace",e));ed=_x.getInnerText(_x.selectSingleNode(d,"error-description",e));if(!ed.length)ed=0;var v={id:pid,vt:vt,c:(typeof vc==$D.S&&vc.match(/^1|true$/i))?true:false,an:(typeof an==$D.S&&an.match(/^1|true$/i))?true:false,mp:mp,rp:rp,ed:ed,i:[]};ii=_x.selectNodes(d,"include[@rid]",e);for(y=0;y<ii.length;y++){v.i[v.i.length]=ii[y].getAttribute("rid");}p[pid]=v;if(!_s.l)_s.l=1;}};t.G=function(o){return t.Q(o,null,0);};t.S=function(o,v){return t.Q(o,1,v);};t.Q=function(o,q,v){var r;switch(o.type){case "textarea":case "password":case "text":if(!q)r=o.value;else r=o.value=v;break;default:return 0;break;}return r;};t.getValidationErrorText=function(o){var r,i,p,_p=t.o.p;if(typeof o!=$D.O&&typeof o!=$D.S){return "Invalid field reference";}if(typeof o==$D.S)i=o;else i=o.getAttribute("pattern-id");if(!i){return "Field doesn't define a validation pattern id";}p=_p.p[i];if(typeof p!=$D.O){return "Pattern id '"+i+"' is not a valid id.";}if(p.ed)r=p.ed;else r="Undefined error for "+i;return r;};t.getIsWebSafe=function(o){return t.validateField(o,"web-safe");};t.validateField=function(o,i){var r=0,ir=1,tir,pid=0,po,v,_p=t.o.p,c;if(typeof o!=$D.O){_m.S("Invalid field reference in validateField.","200.4",1);return 0;}if(typeof i==$D.S)pid=i;else pid=o.getAttribute("pattern-id");if(!pid){return 1;}po=_p.p[pid];if(typeof po!=$D.O){_m.S("Pattern id is invalid in validateField.","200.4",1);return 0;}for(c=0;c<po.i.length;c++){tir=t.validateField(o,po.i[c]);if(ir&&!tir)ir=0;}v=t.G(o);if(typeof v==$D.N&&v==0){return 1;}if(po.mp){try{re=new RegExp(po.mp);switch(po.vt){case "replace":r=1;if(typeof po.rp==$D.S){v=v.replace(re,po.rp);t.S(o,v);}break;case "bool":if((po.an&&v.length==0)||(v.match(re)!=null)==po.c){r=1;}break;}}catch(e){_m.S("Error in validator.validateField::"+(e.description?e.description:e.message),"200.4",1);}}if(po.vt=="none")r=1;if(r&&!ir)r=0;return r;};t.HLX=function(s,v){if(v.xdom){t.P(v.xdom);}else{_m.S("Null DOM pointer in validator.HLX","200.4");}};t._handle_load_config=function(s,v){var z;if(v&&(z=v.getParam("validation_patterns_file"))){t.load(z);}};t.load=function(p){var _s=t.o.s;_s.p=p;if(_s.a){_x.getXml(p,t.HLX,1,t.i,0);}};$E.IM(t,"base_object","xhtml_validator","0.0.25.1205.2003");$E.registry.ObjectRegistry.addObject(t);t.r=4;_m.subscribe(t,"application_config_loaded","_handle_load_config");}}
$E.xhtml.validator.XHTMLValidator=new $E.xhtml.validator.XHTMLValidatorImpl();$EP("$E.xhtml");$E.xhtml.form={XHTMLFormComponent:0,XHTMLFormComponentImpl:
function(){var t=this,_x=$E.xml,_m=$E.message.MessageService,_j=$E;t.o={p:{},s:{a:1,l:"ocj-xhtmlform"}};t.resetAll=function(){var _p=t.o.p;_p.forms=[];_p.formindex=[];_p.formnames=[];};t.resetForm=function(fi,q){return t.clearForm(fi,1,q);};t.clearForm=function(fi,b,q){var _p=t.o.p,f,o,i,a,y,z;if(typeof fi==$D.U)fi=t.o.s.l;f=t.getFormByName(fi);if(!f){return 0;}a=f.getElements();for(i=0;i<a.length;i++){o=a[i];if(o.e&&b){z=_j.registry.ObjectRegistry.getObject(o.oid);if(z){t.synchronizeComponent(z,1,0,q);}}else if(o.e){switch(o.t){case "text":case "password":case "textarea":o.e.value="";break;case "select-one":o.e.selectedIndex=-1;break;case "checkbox":o.e.checked=false;break;}}}return 1;};t.getElement=function(n,fi){var o=t.getXElement(n,fi);if(!o||!o.r)return 0;return o.e;};t.getXElement=function(n,fi){var _p=t.o.p,f;if(typeof fi==$D.U)fi=t.o.s.l;f=t.getFormByName(fi);if(f)return f.getElementByName(n);return 0;};t.getValue=function(n,fi){var o=t.getXElement(n,fi);if(o){if(o.r)t.synchronizeComponent(_j.registry.ObjectRegistry.getObject(o.oid),0,1);if(typeof o.v!=$D.O){return o.v;}else{return o.v.value;}}return 0;};t.setValue=function(n,v,fi){var o=t.getXElement(n,fi);if(o){o.v=v;if(o.r)t.synchronizeComponent(_j.registry.ObjectRegistry.getObject(o.oid),1,1);return 1;};return 0;};t.synchronizeComponent=function(x,b,l,q){if(!x)return 0;var o,fi,f,_s=t.o.s,z,y,i,a;if(!(fi=x.o.s.rid))fi=_s.l;if(!(f=t.getFormByName(fi))){_m.S("Invalid form reference '"+fi+"' in synchronizeComponent","200.4");return 0;}o=f.getElementByName(x.o.s.cid);if(o){if(b&q)o.v=o.d;switch(o.t){case "checkbox":if(!b)o.v=x.getContainer().checked;else x.getContainer().checked=o.v;break;case "password":case "text":case "textarea":if(!b)o.v=x.getContainer().value;else x.getContainer().value=o.v;break;case "select-one":if(!b){z=x.getContainer().selectedIndex;if(z>-1){y=x.getContainer().options[z];o.v={'i':z,'value':(y.value?y.value:y.text),'text':y.text};}}else{if(typeof o.v==$D.O&&typeof o.v.i==$D.N&&x.getContainer().options.length>o.v.i){x.getContainer().selectedIndex=o.v.i;}}break;default:break;}if(!b&&!l){if(_s.a)t.validate(o.n,0,fi);o.e=0;o.oid=0;o.r=0;}else{o.e=x.getContainer();o.oid=x.i;o.r=1;}}};t.addComponent=function(o,ri){var _p=t.o.p,i,v,tp=0,e,l,p,_s=this.o.s,f,_f;if(o&&o.t&&o.t.match(/xhtml_component/)&&o.o.s.cid){if(typeof ri!=$D.S)ri=_s.l;if(!(f=t.getFormByName(ri))){f={i:ri,o:{p:{}}};_j.object.IOA(f,"element");l=_p.forms.length;_p.forms[l]=f;_p.formindex[_s.l+"-"+l]=l;_p.formnames[ri]=l;}i=o.o.s.cid;if(!f.getElementByName(i)){e=o.getContainer();if(!(p=e.getAttribute("pattern-id"))){p=0;}if(e.type)tp=e.type;_f=f.o.p;l=_f.elements.length;v={t:tp,v:0,d:0,n:i,i:l,oid:o.i,vp:p,e:e,vd:0,f:ri,r:1};_f.elements[l]=v;_f.elementindex[o.i]=l;_f.elementnames[i]=l;t.synchronizeComponent(o,0,1);v.d=v.v;}else{t.synchronizeComponent(o,1);}}};t.validate=function(n,w,fi){var _s=this.o.s,v,_m=$E.message.MessageService,r,o;o=t.getXElement(n,fi);if(!o){_m.S("Invalid XElement reference '"+n+"'","200.4",1);return 0;}if(!o.r){return o.vd;}if((!w&&!o.vp)||!ValidatePackage("$E.xhtml.validator")){return 1;}if(typeof w!=$D.S)w=o.vp;v=$E.xhtml.validator.XHTMLValidator;if(!v.getPatternsLoaded()){return 0;}r=v.validateField(o.e,w);if(!r){_m.S("Validation Error:"+v.getValidationErrorText(w),"200.4");}o.vd=r;return r;};$E.IM(t,"base_object","xhtml_form","0.0.70.1205.2003");$E.registry.ObjectRegistry.addObject(t);t.r=4;_j.object.IOA(t,"form");}}
$E.xhtml.form.XHTMLFormComponent=new $E.xhtml.form.XHTMLFormComponentImpl();$EP("$E.template");$E.template.template={newInstance:
function(){var n=$E.FN("base_object","object_template","0.0.9.1205.2003");n.o={p:{},s:{til:"swc.ocjt.template",ts:0,ti:0}};n.sigterm=function(){this.destroy();};n.destroy=function(){var t=this;if(t.r<5){t.r=5;$E.registry.ObjectRegistry.removeObject(t);}};n.continueTransaction=function(){var _t=$E.transaction.TransactionService,p,t=this;p=_t.getPacket(t.o.s.ti);if(p){t.o.s.ts=1;return 1;}return 0;};n.doTransaction=function(s,p){var t=this;return t.o.s.ts;};n.startTransaction=function(s,p){var	t=this;if(!t.o.s.ti){t.o.s.ti=p.packet_id;return 1;}};n.endTransaction=function(s,p){var t=this;t.o.s.ti=0;t.o.s.ts=0;return 1;};$E.registry.ObjectRegistry.addObject(n);return n;}}

/*
	Map to internal package name
*/
$EP("org.cote.js");
org.cote.js = $E;

