adding orion plugin example
diff --git a/resources/orion/orion-plugin.js b/resources/orion/orion-plugin.js
new file mode 100644
index 0000000..2994d3f
--- /dev/null
+++ b/resources/orion/orion-plugin.js
@@ -0,0 +1,96 @@
+if(!window.OpenAjax){OpenAjax=new function(){var a=this.hub={};a.implementer="http://openajax.org";a.implVersion="2.0.3";a.specVersion="2.0";a.implExtraData={};var b={};a.libraries=b;a.registerLibrary=function(c,j,q,f){b[c]={prefix:c,namespaceURI:j,version:q,extraData:f};this.publish("org.openajax.hub.registerLibrary",b[c])};a.unregisterLibrary=function(c){this.publish("org.openajax.hub.unregisterLibrary",b[c]);delete b[c]}};OpenAjax.hub.Error={BadParameters:"OpenAjax.hub.Error.BadParameters",Disconnected:"OpenAjax.hub.Error.Disconnected",
+Duplicate:"OpenAjax.hub.Error.Duplicate",NoContainer:"OpenAjax.hub.Error.NoContainer",NoSubscription:"OpenAjax.hub.Error.NoSubscription",NotAllowed:"OpenAjax.hub.Error.NotAllowed",WrongProtocol:"OpenAjax.hub.Error.WrongProtocol"};OpenAjax.hub.SecurityAlert={LoadTimeout:"OpenAjax.hub.SecurityAlert.LoadTimeout",FramePhish:"OpenAjax.hub.SecurityAlert.FramePhish",ForgedMsg:"OpenAjax.hub.SecurityAlert.ForgedMsg"};OpenAjax.hub._debugger=function(){};OpenAjax.hub.ManagedHub=function(a){if(!a||!a.onPublish||
+!a.onSubscribe)throw Error(OpenAjax.hub.Error.BadParameters);this._p=a;this._onUnsubscribe=a.onUnsubscribe?a.onUnsubscribe:null;this._scope=a.scope||window;if(a.log){var b=this;this._log=function(c){try{a.log.call(b._scope,"ManagedHub: "+c)}catch(j){OpenAjax.hub._debugger()}}}else this._log=function(){};this._subscriptions={c:{},s:null};this._containers={};this._seq=0;this._active=true;this._isPublishing=false;this._pubQ=[]};OpenAjax.hub.ManagedHub.prototype.subscribeForClient=function(a,b,c){this._assertConn();
+if(this._invokeOnSubscribe(b,a))return this._subscribe(b,this._sendToClient,this,{c:a,sid:c});throw Error(OpenAjax.hub.Error.NotAllowed);};OpenAjax.hub.ManagedHub.prototype.unsubscribeForClient=function(a,b){this._unsubscribe(b);this._invokeOnUnsubscribe(a,b)};OpenAjax.hub.ManagedHub.prototype.publishForClient=function(a,b,c){this._assertConn();this._publish(b,c,a)};OpenAjax.hub.ManagedHub.prototype.disconnect=function(){this._active=false;for(var a in this._containers)this.removeContainer(this._containers[a])};
+OpenAjax.hub.ManagedHub.prototype.getContainer=function(a){return(a=this._containers[a])?a:null};OpenAjax.hub.ManagedHub.prototype.listContainers=function(){var a=[],b;for(b in this._containers)a.push(this._containers[b]);return a};OpenAjax.hub.ManagedHub.prototype.addContainer=function(a){this._assertConn();var b=a.getClientID();if(this._containers[b])throw Error(OpenAjax.hub.Error.Duplicate);this._containers[b]=a};OpenAjax.hub.ManagedHub.prototype.removeContainer=function(a){var b=a.getClientID();
+if(!this._containers[b])throw Error(OpenAjax.hub.Error.NoContainer);a.remove();delete this._containers[b]};OpenAjax.hub.ManagedHub.prototype.subscribe=function(a,b,c,j,q){this._assertConn();this._assertSubTopic(a);if(!b)throw Error(OpenAjax.hub.Error.BadParameters);if(this._invokeOnSubscribe(a,null)){c=c||window;var f=this;a=this._subscribe(a,function(o,l,d,g){if(f._invokeOnPublish(o,l,g,null))try{b.call(c,o,l,q)}catch(k){OpenAjax.hub._debugger();f._log("caught error from onData callback to Hub.subscribe(): "+
+k.message)}},c,q);this._invokeOnComplete(j,c,a,true);return a}else this._invokeOnComplete(j,c,null,false,OpenAjax.hub.Error.NotAllowed)};OpenAjax.hub.ManagedHub.prototype.publish=function(a,b){this._assertConn();this._assertPubTopic(a);this._publish(a,b,null)};OpenAjax.hub.ManagedHub.prototype.unsubscribe=function(a,b,c){this._assertConn();if(!a)throw Error(OpenAjax.hub.Error.BadParameters);this._unsubscribe(a);this._invokeOnUnsubscribe(null,a);this._invokeOnComplete(b,c,a,true)};OpenAjax.hub.ManagedHub.prototype.isConnected=
+function(){return this._active};OpenAjax.hub.ManagedHub.prototype.getScope=function(){return this._scope};OpenAjax.hub.ManagedHub.prototype.getSubscriberData=function(a){this._assertConn();a=a.split(".");var b=a.pop();if(a=this._getSubscriptionObject(this._subscriptions,a,0,b))return a.data;throw Error(OpenAjax.hub.Error.NoSubscription);};OpenAjax.hub.ManagedHub.prototype.getSubscriberScope=function(a){this._assertConn();a=a.split(".");var b=a.pop();if(a=this._getSubscriptionObject(this._subscriptions,
+a,0,b))return a.scope;throw Error(OpenAjax.hub.Error.NoSubscription);};OpenAjax.hub.ManagedHub.prototype.getParameters=function(){return this._p};OpenAjax.hub.ManagedHub.prototype._sendToClient=function(a,b,c,j){this.isConnected()&&this._invokeOnPublish(a,b,j,c.c)&&c.c.sendToClient(a,b,c.sid)};OpenAjax.hub.ManagedHub.prototype._assertConn=function(){if(!this.isConnected())throw Error(OpenAjax.hub.Error.Disconnected);};OpenAjax.hub.ManagedHub.prototype._assertPubTopic=function(a){if(!a||a===""||a.indexOf("*")!=
+-1||a.indexOf("..")!=-1||a.charAt(0)=="."||a.charAt(a.length-1)==".")throw Error(OpenAjax.hub.Error.BadParameters);};OpenAjax.hub.ManagedHub.prototype._assertSubTopic=function(a){if(!a)throw Error(OpenAjax.hub.Error.BadParameters);a=a.split(".");for(var b=a.length,c=0;c<b;c++){var j=a[c];if(j===""||j.indexOf("*")!=-1&&j!="*"&&j!="**")throw Error(OpenAjax.hub.Error.BadParameters);if(j=="**"&&c<b-1)throw Error(OpenAjax.hub.Error.BadParameters);}};OpenAjax.hub.ManagedHub.prototype._invokeOnComplete=
+function(a,b,c,j,q){if(a)try{b=b||window;a.call(b,c,j,q)}catch(f){OpenAjax.hub._debugger();this._log("caught error from onComplete callback: "+f.message)}};OpenAjax.hub.ManagedHub.prototype._invokeOnPublish=function(a,b,c,j){try{return this._p.onPublish.call(this._scope,a,b,c,j)}catch(q){OpenAjax.hub._debugger();this._log("caught error from onPublish callback to constructor: "+q.message)}return false};OpenAjax.hub.ManagedHub.prototype._invokeOnSubscribe=function(a,b){try{return this._p.onSubscribe.call(this._scope,
+a,b)}catch(c){OpenAjax.hub._debugger();this._log("caught error from onSubscribe callback to constructor: "+c.message)}return false};OpenAjax.hub.ManagedHub.prototype._invokeOnUnsubscribe=function(a,b){if(this._onUnsubscribe){var c=b.slice(0,b.lastIndexOf("."));try{this._onUnsubscribe.call(this._scope,c,a)}catch(j){OpenAjax.hub._debugger();this._log("caught error from onUnsubscribe callback to constructor: "+j.message)}}};OpenAjax.hub.ManagedHub.prototype._subscribe=function(a,b,c,j){var q=a+"."+this._seq;
+b={scope:c,cb:b,data:j,sid:this._seq++};this._recursiveSubscribe(this._subscriptions,a.split("."),0,b);return q};OpenAjax.hub.ManagedHub.prototype._recursiveSubscribe=function(a,b,c,j){var q=b[c];if(c==b.length){j.next=a.s;a.s=j}else{if(typeof a.c=="undefined")a.c={};if(typeof a.c[q]=="undefined")a.c[q]={c:{},s:null};this._recursiveSubscribe(a.c[q],b,c+1,j)}};OpenAjax.hub.ManagedHub.prototype._publish=function(a,b,c){if(this._isPublishing)this._pubQ.push({t:a,d:b,p:c});else for(this._safePublish(a,
+b,c);this._pubQ.length>0;){a=this._pubQ.shift();this._safePublish(a.t,a.d,a.p)}};OpenAjax.hub.ManagedHub.prototype._safePublish=function(a,b,c){this._isPublishing=true;this._recursivePublish(this._subscriptions,a.split("."),0,a,b,c);this._isPublishing=false};OpenAjax.hub.ManagedHub.prototype._recursivePublish=function(a,b,c,j,q,f){if(typeof a!="undefined"){if(c==b.length)a=a;else{this._recursivePublish(a.c[b[c]],b,c+1,j,q,f);this._recursivePublish(a.c["*"],b,c+1,j,q,f);a=a.c["**"]}if(typeof a!="undefined")for(a=
+a.s;a;){b=a.scope;c=a.cb;var o=a.data;if(typeof c=="string")c=b[c];c.call(b,j,q,o,f);a=a.next}}};OpenAjax.hub.ManagedHub.prototype._unsubscribe=function(a){a=a.split(".");var b=a.pop();if(!this._recursiveUnsubscribe(this._subscriptions,a,0,b))throw Error(OpenAjax.hub.Error.NoSubscription);};OpenAjax.hub.ManagedHub.prototype._recursiveUnsubscribe=function(a,b,c,j){if(typeof a=="undefined")return false;if(c<b.length){var q=a.c[b[c]];if(!q)return false;this._recursiveUnsubscribe(q,b,c+1,j);if(!q.s){for(var f in q.c)return true;
+delete a.c[b[c]]}}else{b=a.s;c=null;for(q=false;b;){if(j==b.sid){q=true;if(b==a.s)a.s=b.next;else c.next=b.next;break}c=b;b=b.next}if(!q)return false}return true};OpenAjax.hub.ManagedHub.prototype._getSubscriptionObject=function(a,b,c,j){if(typeof a!="undefined"){if(c<b.length)return this._getSubscriptionObject(a.c[b[c]],b,c+1,j);for(a=a.s;a;){if(j==a.sid)return a;a=a.next}}return null};OpenAjax.hub._hub=new OpenAjax.hub.ManagedHub({onSubscribe:function(){return true},onPublish:function(){return true}});
+OpenAjax.hub.subscribe=function(a,b,c,j){if(typeof b==="string"){c=c||window;b=c[b]||null}return OpenAjax.hub._hub.subscribe(a,b,c,null,j)};OpenAjax.hub.unsubscribe=function(a){return OpenAjax.hub._hub.unsubscribe(a)};OpenAjax.hub.publish=function(a,b){OpenAjax.hub._hub.publish(a,b)};OpenAjax.hub.registerLibrary("OpenAjax","http://openajax.org/hub","2.0",{})}if(typeof OpenAjax==="undefined")window.OpenAjax={};if(typeof OpenAjax.hub==="undefined")window.OpenAjax.hub={};
+(function(){function a(){if(!o){b("unload",function(){f=true},false);o=true}}function b(d,g,k){if(window.addEventListener)window.addEventListener(d,g,k);else window.attachEvent&&window.attachEvent("on"+d,g)}function c(d,g,k){window.removeEventListener?window.removeEventListener(d,g,k):window.detachEvent("on"+d,g)}function j(){if(!l){var d=window.postMessage?"PM":window.ActiveXObject?"NIX":"FIM";l=new OpenAjax.hub.IframeContainer["_"+d];l.type=d}return l}function q(d,g,k,s){if(!OpenAjax.hub.IframeContainer._prng){var t=
+(new Date).getTime()+Math.random()+document.cookie;OpenAjax.hub.IframeContainer._prng=OpenAjax._smash.crypto.newPRNG(t)}if((d=d.IframeContainer||d.IframeHubClient)&&d.seed)try{var e=d.seed.call(g);OpenAjax.hub.IframeContainer._prng.addSeed(e)}catch(r){OpenAjax.hub._debugger();k("caught error from 'seed' callback: "+r.message)}return OpenAjax.hub.IframeContainer._prng.nextRandomB64Str(s||d&&d.tokenLength||6)}OpenAjax.hub.IframeContainer=function(d,g,k){function s(n,w){y.sendMsg(u,{m:n,i:u,r:"..",t:v,
+p:w})}function t(){if(C&&F){B=true;clearTimeout(E);document.getElementById(u).style.visibility="visible";s("con_ack",null);if(k.Container.onConnect)try{k.Container.onConnect.call(x,p)}catch(n){OpenAjax.hub._debugger();D("caught error from onConnect callback to constructor: "+n.message)}}}function e(){if(B){B=false;document.getElementById(u).style.visibility="hidden";for(var n in z)d.unsubscribeForClient(p,z[n]);z={}}}function r(){B&&!f&&h(OpenAjax.hub.SecurityAlert.FramePhish)}function h(n){try{k.Container.onSecurityAlert.call(x,
+p,n)}catch(w){OpenAjax.hub._debugger();D("caught error from onSecurityAlert callback to constructor: "+w.message)}}function m(){E=setTimeout(function(){h(OpenAjax.hub.SecurityAlert.LoadTimeout);p.receiveMsg=function(){}},H)}if(!d||!g||!k||!k.Container||!k.Container.onSecurityAlert||!k.IframeContainer||!k.IframeContainer.parent||!k.IframeContainer.uri||!k.IframeContainer.tunnelURI)throw Error(OpenAjax.hub.Error.BadParameters);var p=this,x=k.Container.scope||window,B=false,F=false,C=false,z={},I,v,
+u,y,H=k.IframeContainer.timeout||15E3,E,D=k.Container.log?function(n){try{k.Container.log.call(x,"IframeContainer::"+g+": "+n)}catch(w){OpenAjax.hub._debugger()}}:function(){};this._init=function(){d.addContainer(this);y=j();for(var n=g;OpenAjax.hub.IframeContainer._containers[n];)n+="_"+(32767*Math.random()|0).toString(16);OpenAjax.hub.IframeContainer._containers[n]=this;u=n;v=q(k,x,D,y.type==="FIM"?6:null);n={receiver:this,receiverId:u,securityToken:v,uri:k.IframeContainer.uri,tunnelURI:k.IframeContainer.tunnelURI,
+log:D};if(g!==u)n.name=g;y.addReceiver(n);n=document.createElement("iframe");n.id=u;n.name=u;var w=k.IframeContainer.iframeAttrs;if(w)for(var A in w)switch(A){case "id":case "name":D("Ignoring 'id' or 'name' property in 'iframeAttrs' -- these attributes on the iframe are used for internal purposes.");break;case "style":for(var G in w.style)n.style[G]=w.style[G];break;default:n[A]=w[A]}n.style.visibility="hidden";n.src='javascript:"<html></html>"';k.IframeContainer.parent.appendChild(n);n.src=y.getURI();
+k.IframeContainer.parent=null;y.postAdd(u,document.getElementById(u));m()};this.sendToClient=function(n,w,A){s("pub",{t:n,d:w,s:A})};this.remove=function(){e();y.removeReceiver(u);clearTimeout(E);J(u)};this.isConnected=function(){return B};this.getClientID=function(){return g};this.getPartnerOrigin=function(){if(B)return I;return null};this.getParameters=function(){return k};this.getHub=function(){return d};this.getIframe=function(){return document.getElementById(u)};this.transportReady=function(n,
+w,A,G){if(A)I=G.partnerOrigin;else G.securityAlert&&h(G.securityAlert)};this.receiveMsg=function(n){switch(n.m){case "pub":d.publishForClient(this,n.p.t,n.p.d);break;case "sub":var w="";try{z[n.p.s]=d.subscribeForClient(this,n.p.t,n.p.s)}catch(A){w=A.message}s("sub_ack",{s:n.p.s,e:w});break;case "uns":d.unsubscribeForClient(this,z[n.p.s]);delete z[n.p.s];s("uns_ack",{s:n.p.s});break;case "con":F=true;t();break;case "dis":m();e();s("dis_ack",null);if(k.Container.onDisconnect)try{k.Container.onDisconnect.call(x,
+this)}catch(G){OpenAjax.hub._debugger();D("caught error from onDisconnect callback to constructor: "+G.message)}}};this.securityAlert=function(n){h(n)};var J=function(){return navigator.appName==="Microsoft Internet Explorer"?function(n){var w=document.getElementById(n);w.onreadystatechange=function(){if(w.readyState=="complete"){w.onreadystatechange=null;w.outerHTML="";w=null}};w.src=""}:function(n){n=document.getElementById(n);n.parentNode.removeChild(n)}}();this._tunnelLoaded=function(n){n.onunload=
+r;C=true;a();t()};this._init()};OpenAjax.hub.IframeHubClient=function(d){function g(){if(!h)throw Error(OpenAjax.hub.Error.Disconnected);}function k(v,u){I.sendMsg("..",{m:v,i:B,t:F,p:u})}function s(v){try{d.HubClient.onSecurityAlert.call(e,t,v)}catch(u){OpenAjax.hub._debugger();z("caught error from onSecurityAlert callback to constructor: "+u.message)}}if(!d||!d.HubClient||!d.HubClient.onSecurityAlert)throw Error(OpenAjax.hub.Error.BadParameters);var t=this,e=d.HubClient.scope||window,r=false,h=
+false,m={},p=0,x,B,F,C,z=d.HubClient.log?function(v){try{d.HubClient.log.call(e,"IframeHubClient::"+x+": "+v)}catch(u){OpenAjax.hub._debugger()}}:function(){},I;this._init=function(){I=j();F=q(d,e,z,I.type==="FIM"?6:null);x=I.addReceiver({receiver:this,receiverId:"..",securityToken:F,log:z});if(!x)throw Error(OpenAjax.hub.Error.WrongProtocol);};this.connect=function(v,u){u=u||window;if(h)throw Error(OpenAjax.hub.Error.Duplicate);if(v)this._connectCallback={func:v,scope:u};if(r)k("con",null);else this._connectPending=
+true};this.disconnect=function(v,u){u=u||window;if(!h)throw Error(OpenAjax.hub.Error.Disconnected);h=false;if(v)this._disconnectCallback={func:v,scope:u};k("dis",null)};this.getPartnerOrigin=function(){if(h)return C;return null};this.getClientID=function(){return x};this.subscribe=function(v,u,y,H,E){g();if(!v)throw Error(OpenAjax.hub.Error.BadParameters);for(var D=v.split("."),J=D.length,n=0;n<J;n++){var w=D[n];if(w===""||w.indexOf("*")!=-1&&w!="*"&&w!="**")throw Error(OpenAjax.hub.Error.BadParameters);
+if(w=="**"&&n<J-1)throw Error(OpenAjax.hub.Error.BadParameters);}if(!u)throw Error(OpenAjax.hub.Error.BadParameters);y=y||window;D=""+p++;m[D]={cb:u,sc:y,d:E,oc:H};k("sub",{t:v,s:D});return D};this.publish=function(v,u){g();if(!v||v===""||v.indexOf("*")!=-1||v.indexOf("..")!=-1||v.charAt(0)=="."||v.charAt(v.length-1)==".")throw Error(OpenAjax.hub.Error.BadParameters);k("pub",{t:v,d:u})};this.unsubscribe=function(v,u,y){g();if(!v)throw Error(OpenAjax.hub.Error.BadParameters);if(!m[v]||m[v].uns)throw Error(OpenAjax.hub.Error.NoSubscription);
+y=y||window;m[v].uns={cb:u,sc:y};k("uns",{s:v})};this.isConnected=function(){return h};this.getScope=function(){return e};this.getSubscriberData=function(v){g();if(m[v])return m[v].d;throw Error(OpenAjax.hub.Error.NoSubscription);};this.getSubscriberScope=function(v){g();if(m[v])return m[v].sc;throw Error(OpenAjax.hub.Error.NoSubscription);};this.getParameters=function(){return d};this.transportReady=function(v,u,y,H){if(y){B=v;C=H.partnerOrigin;r=true;if(this._connectPending){delete this._connectPending;
+k("con",null)}}else H.securityAlert&&s(H.securityAlert)};this.receiveMsg=function(v){var u,y;switch(v.m){case "pub":u=v.p.s;if(m[u]&&!m[u].uns)try{m[u].cb.call(m[u].sc,v.p.t,v.p.d,m[u].d)}catch(H){OpenAjax.hub._debugger();z("caught error from onData callback to subscribe(): "+H.message)}break;case "sub_ack":u=v.p.s;if(y=m[u].oc)try{delete m[u].oc;y.call(m[u].sc,u,v.p.e==="",v.p.e)}catch(E){OpenAjax.hub._debugger();z("caught error from onComplete callback to subscribe(): "+E.message)}break;case "uns_ack":u=
+v.p.s;if(m[u]){if(y=m[u].uns.cb)try{y.call(m[u].uns.sc,u,true)}catch(D){OpenAjax.hub._debugger();z("caught error from onComplete callback to unsubscribe(): "+D.message)}delete m[u]}break;case "con_ack":h=true;if(this._connectCallback){try{this._connectCallback.func.call(this._connectCallback.scope,this,true)}catch(J){OpenAjax.hub._debugger();z("caught error from onComplete callback to connect(): "+J.message)}delete this._connectCallback}break;case "dis_ack":if(this._disconnectCallback){try{this._disconnectCallback.func.call(this._disconnectCallback.scope,
+this,true)}catch(n){OpenAjax.hub._debugger();z("caught error from onComplete callback to disconnect(): "+n.message)}delete this._disconnectCallback}}};this.securityAlert=function(v){s(v)};this._init()};OpenAjax.hub.IframeContainer._containers={};OpenAjax.hub.IframeContainer._tunnelLoaded=function(){var d=j().tunnelLoaded();window.parent.parent.OpenAjax.hub.IframeContainer._containers[d]._tunnelLoaded(window)};OpenAjax.hub.IframeContainer._queryURLParam=function(d){if(d=RegExp("[\\?&]"+d+"=([^&#]*)").exec(window.location.search))return decodeURIComponent(d[1].replace(/\+/g,
+"%20"));return null};OpenAjax.hub.IframeContainer._createTunnelIframe=function(d){var g=document.createElement("iframe");g.src=d;document.body.appendChild(g);g.style.position="absolute";g.style.left=g.style.top="-10px";g.style.height=g.style.width="1px";g.style.visibility="hidden"};OpenAjax.hub.IframeContainer._getTargetWin=function(d){if(typeof d==="undefined"||d==="..")return window.parent;d=String(d);var g=window.frames[d];if(g)return g;if((g=document.getElementById(d))&&g.contentWindow)return g.contentWindow;
+return null};var f=false,o=false,l;OpenAjax.hub.IframeContainer._PM=function(){function d(){function h(p){if(p.data=="postmessage.test"){m=true;if(typeof p.origin==="undefined")t+="d"}}t="";var m=false;b("message",h,false);window.postMessage("postmessage.test","*");if(m)t+="s";c("message",h,false)}function g(){e=t.indexOf("s")===-1?function(h,m,p){h.postMessage(m,p)}:function(h,m,p){setTimeout(function(){h.postMessage(m,p)},0)}}function k(h){if(t.indexOf("d")!==-1)return/^.+:\/\/([^:]+).*/.exec(h)[1];
+return h}var s={},t,e,r;b("message",function(h){try{var m=JSON.parse(h.data),p=m.r||m.i;if(typeof p!=="undefined")if(s[p])s[p].m!==(h.origin||h.domain)?s[p].r.securityAlert(OpenAjax.hub.SecurityAlert.ForgedMsg):s[p].r.receiveMsg(m);else typeof m.m!=="undefined"&&typeof m.p!=="undefined"&&s[".."].r.securityAlert(OpenAjax.hub.SecurityAlert.ForgedMsg)}catch(x){}},false);this.addReceiver=function(h){var m;s[h.receiverId]={r:h.receiver};if(h.receiverId===".."){var p=OpenAjax.hub.IframeContainer._queryURLParam("oahpv");
+if(!p||p!=="openajax-2.0.2")return null;var x=OpenAjax.hub.IframeContainer._queryURLParam("oahu"),B=OpenAjax.hub.IframeContainer._queryURLParam("oahi"),F=OpenAjax.hub.IframeContainer._queryURLParam("oahn");p=OpenAjax.hub.IframeContainer._queryURLParam("oaht");if(!B||!p||!x)return null;t=OpenAjax.hub.IframeContainer._queryURLParam("oahpm");g();var C=/^([a-zA-Z]+:\/\/[^\/?#]+).*/.exec(x)[1];s[".."].o=C;s[".."].m=k(C);var z="oahi="+encodeURIComponent(B)+"&oaht="+p;x=x.split("#");x[0]=x[0]+(x[0].indexOf("?")!=
+-1?"&":"?")+z;x=x.length===1?x[0]:x[0]+"#"+x[1];OpenAjax.hub.IframeContainer._createTunnelIframe(x);m={partnerOrigin:/^([a-zA-Z]+:\/\/[^:]+).*/.exec(C)[1],securityToken:p};setTimeout(function(){h.receiver.transportReady(B,F,true,m)},0);return F||B}if(typeof t==="undefined"){d();g()}C=/^([a-zA-Z]+:\/\/[^\/?#]+).*/.exec(h.uri)[1];s[h.receiverId].o=C;s[h.receiverId].m=k(C);m={partnerOrigin:/^([a-zA-Z]+:\/\/[^:]+).*/.exec(C)[1]};setTimeout(function(){h.receiver.transportReady(h.receiverId,h.name,true,
+m)},0);z="oahpv="+encodeURIComponent("openajax-2.0.2")+"&oahi="+encodeURIComponent(h.receiverId)+(h.name?"&oahn="+encodeURIComponent(h.name):"")+"&oaht="+h.securityToken+"&oahu="+encodeURIComponent(h.tunnelURI)+"&oahpm="+t;x=h.uri.split("#");x[0]=x[0]+(x[0].indexOf("?")!=-1?"&":"?")+z;r=x.length===1?x[0]:x[0]+"#"+x[1];return null};this.getURI=function(){return r};this.postAdd=function(){};this.sendMsg=function(h,m){if(s[h]){var p=OpenAjax.hub.IframeContainer._getTargetWin(h);e(p,JSON.stringify(m),
+s[h].o)}return true};this.tunnelLoaded=function(){return OpenAjax.hub.IframeContainer._queryURLParam("oahi")};this.removeReceiver=function(h){delete s[h]}}})();
+OpenAjax.hub.IframeContainer._FIM=function(){function a(o,l){this.messageReceived=function(d){var g={i:o},k=new f.SECommMessage;k.deserialize(d);switch(k.type){case f.SECommMessage.PUBLISH:case f.SECommMessage.DISTRIBUTE:g.m="pub";if(k.additionalHeader){g.p={t:k.topic,d:k.payload};if(k.additionalHeader.f==="J")g.p.d=JSON.parse(k.payload);if(k.type===f.SECommMessage.DISTRIBUTE)g.p.s=k.additionalHeader.s}break;case f.SECommMessage.SUBSCRIBE:g.m="sub";if(k.additionalHeader)g.p={t:k.topic,s:k.additionalHeader.subId};
+break;case f.SECommMessage.SUBSCRIBE_ACK:g.m="sub_ack";if(k.additionalHeader)g.p={s:k.additionalHeader.subId,e:k.additionalHeader.isOk?"":k.additionalHeader.err};break;case f.SECommMessage.UNSUBSCRIBE:g.m="uns";if(k.additionalHeader)g.p={s:k.additionalHeader.subId};break;case f.SECommMessage.UNSUBSCRIBE_ACK:g.m="uns_ack";if(k.additionalHeader)g.p={s:k.additionalHeader.subId};break;case f.SECommMessage.CONNECT:g.m="con";break;case f.SECommMessage.CONNECT_ACK:g.m="con_ack";break;case f.SECommMessage.DISCONNECT:g.m=
+"dis";break;case f.SECommMessage.DISCONNECT_ACK:g.m="dis_ack"}b[o].r.receiveMsg(g)};this.initializationFinished=function(d,g,k,s,t,e,r){t=j[o];var h=b[o],m={partnerOrigin:/^([a-zA-Z]+:\/\/[^\/?#:]+).*/.exec(k)[1]};if(o==="..")m.debug=r;else{if(s!==h.tok||k!==h.uri){this.handleSecurityError(f.SecurityErrors.TOKEN_VERIFICATION_FAILED);return false}l("Tunnel commLib initialization finished. Processing outgoing queue. Security token: "+s);t.lib=e}for(t.initialized=true;t.queueOut.length>0;)t.lib.send(t.queueOut.shift());
+h.r.transportReady(d,g,true,m);return true};this.handleSecurityError=function(){b[o].r.securityAlert(OpenAjax.hub.SecurityAlert.ForgedMsg)};this.log=function(d){l(d)}}var b={},c={},j={},q;OpenAjax.hub.IframeContainer._FIM.instances=c;this.addReceiver=function(o){b[o.receiverId]={r:o.receiver};j[o.receiverId]={initialized:false,queueOut:[],lib:null};if(o.receiverId===".."){var l=window.location.href.split("#");if(l[1]){var d=l[1].split(":",3),g=d[0];if(g!==f._protocolID)o=null;else{l=l[0]+"#"+l[1].substring(g.length+
+1);window.location.replace(l);f._clientSecurityToken=o.securityToken;c[".."]=new a("..",o.log);j[".."].lib=new f.CommLib(true,c);o=decodeURIComponent(d[2])}}else o=null;return o}c[o.receiverId]=new a(o.receiverId,o.log);b[o.receiverId].tok=o.securityToken;b[o.receiverId].uri=o.uri;d=o.name||o.receiverId;q=o.uri+"#"+f._protocolID+":100"+o.securityToken+o.securityToken+"000"+encodeURIComponent(o.receiverId)+":"+encodeURIComponent(d)+":"+encodeURIComponent(o.tunnelURI);return null};this.getURI=function(){return q};
+this.postAdd=function(){return true};this.sendMsg=function(o,l){var d=new f.SECommMessage;switch(l.m){case "con":d.type=f.SECommMessage.CONNECT;d.payload=window.location.href.split("#")[0];break;case "con_ack":d.type=f.SECommMessage.CONNECT_ACK;break;case "dis":d.type=f.SECommMessage.DISCONNECT;break;case "dis_ack":d.type=f.SECommMessage.DISCONNECT_ACK;break;case "pub":if(l.p.s){d.type=f.SECommMessage.DISTRIBUTE;d.additionalHeader={s:l.p.s}}else{d.type=f.SECommMessage.PUBLISH;d.additionalHeader={}}d.topic=
+l.p.t;if(typeof l.p.d==="string"){d.additionalHeader.f="S";d.payload=l.p.d}else{d.additionalHeader.f="J";d.payload=JSON.stringify(l.p.d)}break;case "sub":d.type=f.SECommMessage.SUBSCRIBE;d.topic=l.p.t;d.additionalHeader={subId:l.p.s};break;case "sub_ack":d.type=f.SECommMessage.SUBSCRIBE_ACK;d.additionalHeader={subId:l.p.s,isOk:l.p.e==="",err:l.p.e};break;case "uns":d.type=f.SECommMessage.UNSUBSCRIBE;d.additionalHeader={subId:l.p.s};break;case "uns_ack":d.type=f.SECommMessage.UNSUBSCRIBE_ACK;d.additionalHeader=
+{subId:l.p.s}}var g=j[o];g.initialized?g.lib.send(d.serialize()):g.queueOut.push(d.serialize());return true};this.tunnelLoaded=function(){new f.CommLib(false,window.parent.parent.OpenAjax.hub.IframeContainer._FIM.instances);var o=window.location.href.split("#")[1];return decodeURIComponent(o.substring(f._securityTokenOverhead+6).split(":")[0])};this.removeReceiver=function(o){delete b[o];delete j[o];delete c[o]};if(typeof OpenAjax._smash=="undefined")OpenAjax._smash={};var f=OpenAjax._smash;f._protocolID=
+"openajax-2.0.2";f._securityTokenLength=6;f._securityTokenOverhead=null;f._computeOtherTokenConstants=function(){f._securityTokenOverhead=2*f._securityTokenLength};f._computeOtherTokenConstants();f.SecurityErrors={INVALID_TOKEN:0,TOKEN_VERIFICATION_FAILED:1,TUNNEL_UNLOAD:2,COMPONENT_LOAD:3};f.SECommMessage=function(){this.payload=this.additionalHeader=this.topic=this.type=null;this.serialize=function(){var o="y="+this.type;if(this.topic!=null){var l=encodeURIComponent(this.topic);o+="&t="+l}if(this.additionalHeader!=
+null){l=encodeURIComponent(JSON.stringify(this.additionalHeader));o+="&h="+l}if(this.payload!=null){l=encodeURIComponent(this.payload);o+="&p="+l}return o};this.deserialize=function(o){o=o.split("&");for(var l=0;l<o.length;l++){var d=o[l].split("=");switch(d[0]){case "y":this.type=d[1];break;case "t":this.topic=decodeURIComponent(d[1]);break;case "h":d=decodeURIComponent(d[1]);this.additionalHeader=JSON.parse(d);break;case "p":this.payload=decodeURIComponent(d[1])}}}};f.SECommMessage.CONNECT="con";
+f.SECommMessage.CONNECT_ACK="cac";f.SECommMessage.DISCONNECT="xcon";f.SECommMessage.DISCONNECT_ACK="xac";f.SECommMessage.PUBLISH="pub";f.SECommMessage.DISTRIBUTE="dis";f.SECommMessage.SUBSCRIBE="sub";f.SECommMessage.UNSUBSCRIBE="uns";f.SECommMessage.SUBSCRIBE_ACK="sac";f.SECommMessage.UNSUBSCRIBE_ACK="uac";f.SECommMessage.ERROR="err";f.CommLib=function(o,l){function d(){if(p.type==k)return true;if(p.msn==r.ackMsn&&r.ack==1)return true;g("Waiting for ACK : "+p.msn);return false}function g(n){if(E){for(;D.length>
+0;)E.log(D.shift());E.log(n)}else D.push(n)}var k="2",s=this,t=0,e=null,r=null,h=null,m=null,p=null,x=null,B=null,F=[],C=0,z="",I=null,v=null,u=null,y=null,H=null,E=null,D=[],J=false;this.send=function(n){if(x==null)g("Trying to send without proper initialization. Message will be discarded. "+n);else{g("Sending: "+n);var w=3994-f._securityTokenOverhead-x.length;for(n=n;n.length>0;){var A=n.substr(0,w);n=n.substr(w);n==0?F.push({type:"4",payload:A}):F.push({type:"3",payload:A})}}};I=setInterval(function(){var n;
+a:{n=window.location.href.split("#");if(n.length==2){n=n[1];if(n!=""&&n!=e){e=n;n=true;break a}}n=false}if(n){n=e.substr(0,1);var w=e.substr(1,2),A=3,G=e.substr(A,f._securityTokenLength);A+=f._securityTokenLength;var K=e.substr(A,f._securityTokenLength);A+=f._securityTokenLength;var L=e.substr(A,1);A+=1;var M=e.substr(A,2);A+=2;A=e.substr(A);g("In : Type: "+n+" msn: "+w+" tokenParent: "+G+" tokenChild: "+K+" ack: "+L+" msn: "+M+" payload: "+A);r={type:n,msn:w,tokenParent:G,tokenChild:K,ack:L,ackMsn:M,
+payload:A};if(r.type!="1"&&(r.tokenParent!=v||r.tokenChild!=u)){g("Security token error: Invalid security token received. The message will be discarded.");n=f.SecurityErrors.INVALID_TOKEN;clearInterval(I);E.handleSecurityError(n);n=false}else n=true;if(n){t=1;r.type!="1"&&o&&p.type=="1"&&r.ack=="1"&&p.msn==r.ackMsn&&E.initializationFinished(y,H,x,v,u,null,J);switch(r.type){case "1":n=r.payload.split(":");y=decodeURIComponent(n[0]);H=decodeURIComponent(n[1]);x=decodeURIComponent(n[2]);v=r.tokenParent;
+u=r.tokenChild;if(o){u=f._clientSecurityToken;w=document.createElement("iframe");G=encodeURIComponent(window.location.href.split("#")[0]);G=encodeURIComponent(y)+":"+encodeURIComponent(H)+":"+G;w.src=x+"#100"+v+u+"100"+G;w.name="3827816c-f3b1-11db-8314-0800200c9a66";w.id="3827816c-f3b1-11db-8314-0800200c9a66";document.body.appendChild(w);w.style.position="absolute";w.style.left=w.style.top="-10px";w.style.height=w.style.width="1px";w.style.visibility="hidden";t=0;B=window.frames["3827816c-f3b1-11db-8314-0800200c9a66"];
+p={type:"1",msn:"00",tokenParent:v,tokenChild:u,ack:"0",ackMsn:"00",payload:G};E=l[".."];J=n[3]&&n[3]==="debug"}else{B=window.parent;E=l[y];E.initializationFinished(y,H,x,v,u,s)||(t=0);p={type:"1",msn:"00",tokenParent:v,tokenChild:u,ack:"0",ackMsn:"00",payload:encodeURIComponent(y)+":"+encodeURIComponent(H)+":"+encodeURIComponent(window.location.href.split("#")[0])}}B==null&&g("Init failed.");break;case k:t=0;break;case "3":z+=r.payload;break;case "4":z+=r.payload;g("Received: "+z);E.messageReceived(z);
+z=""}h=r}}if(d()){F.length==0&&t==1&&F.push({type:k,payload:""});if(F.length!=0){m=F.shift();m.tokenParent=v;m.tokenChild=u;n=m;C++;if(C==100)C=0;w=C<10?"0"+C:""+C;n.msn=w;m.ack="1";m.ackMsn=h.msn;t=0;B.location.replace(x+"#"+m.type+m.msn+m.tokenParent+m.tokenChild+m.ack+m.ackMsn+m.payload);p=m;g("Out: Type: "+m.type+" msn: "+m.msn+" tokenParent: "+m.tokenParent+" tokenChild: "+m.tokenChild+" ack: "+m.ack+" msn: "+m.ackMsn+" payload: "+m.payload)}}},100)}};
+OpenAjax.hub.IframeContainer._NIX=function(){function a(){var e=l[".."].nix_channel;if(!e)if(++d>f)c("..",false,"nix");else{if(!e&&window.opener&&"GetAuthToken"in window.opener){e=window.opener;var r=b("..");if(e.GetAuthToken()==r){e.CreateChannel(window[q]("..",r),r);l[".."].nix_channel=e;window.opener=null;c("..",true,"nix");return}}window.setTimeout(function(){a()},o)}}function b(e){if(!l[e].authToken&&e==="..")l[".."].authToken=OpenAjax.hub.IframeContainer._queryURLParam("oaht");return l[e].authToken}
+function c(e,r,h,m){if(l[e]){var p=l[e],x=e===".."?OpenAjax.hub.IframeContainer._queryURLParam("oahi"):e;if(r){p["ready_"+h]=true;if(p.ready_nix&&p.ready_fim){B={partnerOrigin:l[e].partnerOrigin};p.r.transportReady(x,null,true,B)}}else{var B;if(m)B={securityAlert:m};p.r.transportReady(x,null,false,B)}}}function j(){var e=window.location.href.split("#");if(e.length===2){clearInterval(t);t=null;e[1]===l[".."].childAuthToken?c("..",true,"fim"):c("..",false,"fim","OpenAjax.hub.SecurityAlert.FramePhish")}}
+var q="GRPC____NIXVBS_get_wrapper",f=10,o=500,l={},d=0,g;if(typeof window[q]!=="unknown"){window.GRPC____NIXVBS_handle_message=function(e){window.setTimeout(function(){var r=JSON.parse(e),h=r.r||r.i;if(l[h])b(h)!==r.t?l[h].r.securityAlert(OpenAjax.hub.SecurityAlert.ForgedMsg):l[h].r.receiveMsg(r)},0)};window.GRPC____NIXVBS_create_channel=function(e,r,h){if(b(e)===h){l[e].nix_channel=r;c(e,true,"nix")}};var k="Class GRPC____NIXVBS_wrapper\n Private m_Intended\nPrivate m_Auth\nPublic Sub SetIntendedName(name)\n If isEmpty(m_Intended) Then\nm_Intended = name\nEnd If\nEnd Sub\nPublic Sub SetAuth(auth)\n If isEmpty(m_Auth) Then\nm_Auth = auth\nEnd If\nEnd Sub\nPublic Sub SendMessage(data)\n GRPC____NIXVBS_handle_message(data)\nEnd Sub\nPublic Function GetAuthToken()\n GetAuthToken = m_Auth\nEnd Function\nPublic Sub CreateChannel(channel, auth)\n Call GRPC____NIXVBS_create_channel(m_Intended, channel, auth)\nEnd Sub\nEnd Class\nFunction "+
+q+"(name, auth)\nDim wrap\nSet wrap = New GRPC____NIXVBS_wrapper\nwrap.SetIntendedName name\nwrap.SetAuth auth\nSet "+q+" = wrap\nEnd Function";try{window.execScript(k,"vbscript")}catch(s){throw Error("Failed to create NIX VBScript object");}}this.addReceiver=function(e){l[e.receiverId]={r:e.receiver};if(e.receiverId===".."){var r;r=OpenAjax.hub.IframeContainer._queryURLParam("oahpv");if(!r||r!=="openajax-2.0.2")r=null;else{a();r=OpenAjax.hub.IframeContainer._queryURLParam("oahi");var h=OpenAjax.hub.IframeContainer._queryURLParam("oahn"),
+m=b(".."),p=e.securityToken;e=OpenAjax.hub.IframeContainer._queryURLParam("oahu");if(!r||!m||!e)r=null;else{l[".."].childAuthToken=p;l[".."].partnerOrigin=/^([a-zA-Z]+:\/\/[^\/?#:]+).*/.exec(e)[1];m="oahi="+encodeURIComponent(r)+"&oaht1="+m+"&oaht2="+p+"&oahu="+encodeURIComponent(window.location.href);e=e.split("#");e[0]=e[0]+(e[0].indexOf("?")!=-1?"&":"?")+m;OpenAjax.hub.IframeContainer._createTunnelIframe(e.length===1?e[0]:e[0]+"#"+e[1]);t=setInterval(j,100);r=h||r}}return r}l[e.receiverId].authToken=
+e.securityToken;r="oahpv="+encodeURIComponent("openajax-2.0.2")+"&oahi="+encodeURIComponent(e.receiverId)+(e.name?"&oahn="+encodeURIComponent(e.name):"")+"&oaht="+e.securityToken+"&oahu="+encodeURIComponent(e.tunnelURI);h=e.uri.split("#");h[0]=h[0]+(h[0].indexOf("?")!=-1?"&":"?")+r;g=h.length===1?h[0]:h[0]+"#"+h[1];return null};this.getURI=function(){return g};this.postAdd=function(e){try{var r=window[q](e,l[e].authToken);OpenAjax.hub.IframeContainer._getTargetWin(e).opener=r}catch(h){return false}return true};
+this.sendMsg=function(e,r){if(e==="..")r.t=l[e].authToken;try{l[e]&&l[e].nix_channel.SendMessage(JSON.stringify(r))}catch(h){return false}return true};this.tunnelLoaded=function(){var e=OpenAjax.hub.IframeContainer._queryURLParam("oahi"),r=OpenAjax.hub.IframeContainer._queryURLParam("oaht1"),h=OpenAjax.hub.IframeContainer._queryURLParam("oaht2"),m=OpenAjax.hub.IframeContainer._queryURLParam("oahu");window.parent.parent.OpenAjax.hub.IframeContainer._NIX._receiveTunnelMsg(e,r,h,m);return e};this.removeReceiver=
+function(e){delete l[e];if(e==="..")if(t){clearInterval(t);t=null}};OpenAjax.hub.IframeContainer._NIX._receiveTunnelMsg=function(e,r,h,m){if(l[e].authToken!==r)c(e,false,"fim","OpenAjax.hub.SecurityAlert.FramePhish");else{document.getElementById(e).src=m+"#"+h;l[e].partnerOrigin=/^([a-zA-Z]+:\/\/[^\/?#:]+).*/.exec(m)[1];c(e,true,"fim")}};var t};if(typeof OpenAjax._smash=="undefined")OpenAjax._smash={};
+OpenAjax._smash.crypto={strToWA:function(a,b){for(var c=[],j=(1<<b)-1,q=0;q<a.length*b;q+=b)c[q>>5]|=(a.charCodeAt(q/b)&j)<<32-b-q%32;return c},hmac_sha1:function(a,b,c){for(var j=Array(16),q=Array(16),f=0;f<16;f++){j[f]=a[f]^909522486;q[f]=a[f]^1549556828}a=this.sha1(j.concat(this.strToWA(b,c)),512+b.length*c);return this.sha1(q.concat(a),672)},newPRNG:function(a){function b(o){o=c.hmac_sha1(j,o,8);for(var l=0;l<5;l++)q[l]^=o[l]}var c=this;if(typeof a!="string"||a.length<12)alert("WARNING: Seed length too short ...");
+var j=[43417,15926,18182,33130,9585,30800,49772,40144,47678,55453,4659,38181,65340,6787,54417,65301],q=[],f=0;b(a);return{addSeed:function(o){b(o)},nextRandomOctets:function(o){for(var l=[];o>0;){f+=1;var d=c.hmac_sha1(q,f.toString(16),8);for(i=0;i<20&o>0;i++,o--)l.push((d[i>>2]>>i%4)%256)}return l},nextRandomB64Str:function(o){for(var l=this.nextRandomOctets(o),d="",g=0;g<o;g++)d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".charAt(l[g]&63);return d}}},sha1:function(){var a=
+function(b,c){var j=(b&65535)+(c&65535);return(b>>16)+(c>>16)+(j>>16)<<16|j&65535};return function(b,c){b[c>>5]|=128<<24-c%32;b[(c+64>>9<<4)+15]=c;for(var j=Array(80),q=1732584193,f=-271733879,o=-1732584194,l=271733878,d=-1009589776,g=0;g<b.length;g+=16){for(var k=q,s=f,t=o,e=l,r=d,h=0;h<80;h++){j[h]=h<16?b[g+h]:(j[h-3]^j[h-8]^j[h-14]^j[h-16])<<1|(j[h-3]^j[h-8]^j[h-14]^j[h-16])>>>31;var m=k<<5|k>>>27,p;p=h<20?s&t|~s&e:h<40?s^t^e:h<60?s&t|s&e|t&e:s^t^e;m=a(a(m,p),a(a(r,j[h]),h<20?1518500249:h<40?1859775393:
+h<60?-1894007588:-899497514));r=e;e=t;t=s<<30|s>>>2;s=k;k=m}q=a(k,q);f=a(s,f);o=a(t,o);l=a(e,l);d=a(r,d)}return[q,f,o,l,d]}}()};this.JSON||(JSON={});
+(function(){function a(g){return g<10?"0"+g:g}function b(g){q.lastIndex=0;return q.test(g)?'"'+g.replace(q,function(k){var s=l[k];return typeof s==="string"?s:"\\u"+("0000"+k.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+g+'"'}function c(g,k){var s,t,e,r,h=f,m,p=k[g];if(p&&typeof p==="object"&&typeof p.toJSON==="function")p=p.toJSON(g);if(typeof d==="function")p=d.call(k,g,p);switch(typeof p){case "string":return b(p);case "number":return isFinite(p)?String(p):"null";case "boolean":case "null":return String(p);
+case "object":if(!p)return"null";f+=o;m=[];if(Object.prototype.toString.apply(p)==="[object Array]"){r=p.length;for(s=0;s<r;s+=1)m[s]=c(s,p)||"null";e=m.length===0?"[]":f?"[\n"+f+m.join(",\n"+f)+"\n"+h+"]":"["+m.join(",")+"]";f=h;return e}if(d&&typeof d==="object"){r=d.length;for(s=0;s<r;s+=1){t=d[s];if(typeof t==="string")if(e=c(t,p))m.push(b(t)+(f?": ":":")+e)}}else for(t in p)if(Object.hasOwnProperty.call(p,t))if(e=c(t,p))m.push(b(t)+(f?": ":":")+e);e=m.length===0?"{}":f?"{\n"+f+m.join(",\n"+f)+
+"\n"+h+"}":"{"+m.join(",")+"}";f=h;return e}}if(typeof Date.prototype.toJSON!=="function"){Date.prototype.toJSON=function(){return this.getUTCFullYear()+"-"+a(this.getUTCMonth()+1)+"-"+a(this.getUTCDate())+"T"+a(this.getUTCHours())+":"+a(this.getUTCMinutes())+":"+a(this.getUTCSeconds())+"Z"};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()}}var j=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
+q=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,f,o,l={"\u0008":"\\b","\t":"\\t","\n":"\\n","\u000c":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},d;if(typeof JSON.stringify!=="function")JSON.stringify=function(g,k,s){var t;o=f="";if(typeof s==="number")for(t=0;t<s;t+=1)o+=" ";else if(typeof s==="string")o=s;if((d=k)&&typeof k!=="function"&&(typeof k!=="object"||typeof k.length!=="number"))throw Error("JSON.stringify");return c("",
+{"":g})};if(typeof JSON.parse!=="function")JSON.parse=function(g,k){function s(e,r){var h,m,p=e[r];if(p&&typeof p==="object")for(h in p)if(Object.hasOwnProperty.call(p,h)){m=s(p,h);if(m!==undefined)p[h]=m;else delete p[h]}return k.call(e,r,p)}var t;j.lastIndex=0;if(j.test(g))g=g.replace(j,function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)});if(/^[\],:{}\s]*$/.test(g.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
+"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){t=eval("("+g+")");return typeof k==="function"?s({"":t},""):t}throw new SyntaxError("JSON.parse");}})();
+OpenAjax.hub.InlineContainer=function(a,b,c){if(!a||!b||!c||!c.Container||!c.Container.onSecurityAlert)throw Error(OpenAjax.hub.Error.BadParameters);this._params=c;this._hub=a;this._id=b;this._onSecurityAlert=c.Container.onSecurityAlert;this._onConnect=c.Container.onConnect?c.Container.onConnect:null;this._onDisconnect=c.Container.onDisconnect?c.Container.onDisconnect:null;this._scope=c.Container.scope||window;if(c.Container.log){var j=this;this._log=function(q){try{c.Container.log.call(j._scope,
+"InlineContainer::"+b+": "+q)}catch(f){OpenAjax.hub._debugger()}}}else this._log=function(){};this._connected=false;this._subs=[];this._subIndex=0;a.addContainer(this)};OpenAjax.hub.InlineContainer.prototype.getHub=function(){return this._hub};OpenAjax.hub.InlineContainer.prototype.sendToClient=function(a,b,c){if(this.isConnected()){c=this._subs[c];try{c.cb.call(c.sc,a,b,c.d)}catch(j){OpenAjax.hub._debugger();this._client._log("caught error from onData callback to HubClient.subscribe(): "+j.message)}}};
+OpenAjax.hub.InlineContainer.prototype.remove=function(){this.isConnected()&&this._disconnect()};OpenAjax.hub.InlineContainer.prototype.isConnected=function(){return this._connected};OpenAjax.hub.InlineContainer.prototype.getClientID=function(){return this._id};OpenAjax.hub.InlineContainer.prototype.getPartnerOrigin=function(){if(this._connected)return window.location.protocol+"//"+window.location.hostname;return null};OpenAjax.hub.InlineContainer.prototype.getParameters=function(){return this._params};
+OpenAjax.hub.InlineContainer.prototype.connect=function(a,b,c){if(this._connected)throw Error(OpenAjax.hub.Error.Duplicate);this._connected=true;this._client=a;if(this._onConnect)try{this._onConnect.call(this._scope,this)}catch(j){OpenAjax.hub._debugger();this._log("caught error from onConnect callback to constructor: "+j.message)}this._invokeOnComplete(b,c,a,true)};
+OpenAjax.hub.InlineContainer.prototype.disconnect=function(a,b,c){if(!this._connected)throw Error(OpenAjax.hub.Error.Disconnected);this._disconnect();if(this._onDisconnect)try{this._onDisconnect.call(this._scope,this)}catch(j){OpenAjax.hub._debugger();this._log("caught error from onDisconnect callback to constructor: "+j.message)}this._invokeOnComplete(b,c,a,true)};
+OpenAjax.hub.InlineContainer.prototype.subscribe=function(a,b,c,j,q){this._assertConn();this._assertSubTopic(a);if(!b)throw Error(OpenAjax.hub.Error.BadParameters);var f=""+this._subIndex++,o=false,l=null;try{var d=this._hub.subscribeForClient(this,a,f);o=true}catch(g){f=null;l=g.message}c=c||window;if(o)this._subs[f]={h:d,cb:b,sc:c,d:q};this._invokeOnComplete(j,c,f,o,l);return f};
+OpenAjax.hub.InlineContainer.prototype.publish=function(a,b){this._assertConn();this._assertPubTopic(a);this._hub.publishForClient(this,a,b)};OpenAjax.hub.InlineContainer.prototype.unsubscribe=function(a,b,c){this._assertConn();if(typeof a==="undefined"||a==null)throw Error(OpenAjax.hub.Error.BadParameters);var j=this._subs[a];if(!j)throw Error(OpenAjax.hub.Error.NoSubscription);this._hub.unsubscribeForClient(this,j.h);delete this._subs[a];this._invokeOnComplete(b,c,a,true)};
+OpenAjax.hub.InlineContainer.prototype.getSubscriberData=function(a){this._assertConn();return this._getSubscription(a).d};OpenAjax.hub.InlineContainer.prototype.getSubscriberScope=function(a){this._assertConn();return this._getSubscription(a).sc};OpenAjax.hub.InlineContainer.prototype._invokeOnComplete=function(a,b,c,j,q){if(a)try{b=b||window;a.call(b,c,j,q)}catch(f){OpenAjax.hub._debugger();this._client._log("caught error from onComplete callback: "+f.message)}};
+OpenAjax.hub.InlineContainer.prototype._disconnect=function(){for(var a in this._subs)this._hub.unsubscribeForClient(this,this._subs[a].h);this._subs=[];this._subIndex=0;this._connected=false};OpenAjax.hub.InlineContainer.prototype._assertConn=function(){if(!this._connected)throw Error(OpenAjax.hub.Error.Disconnected);};
+OpenAjax.hub.InlineContainer.prototype._assertPubTopic=function(a){if(a==null||a==""||a.indexOf("*")!=-1||a.indexOf("..")!=-1||a.charAt(0)=="."||a.charAt(a.length-1)==".")throw Error(OpenAjax.hub.Error.BadParameters);};
+OpenAjax.hub.InlineContainer.prototype._assertSubTopic=function(a){if(!a)throw Error(OpenAjax.hub.Error.BadParameters);a=a.split(".");for(var b=a.length,c=0;c<b;c++){var j=a[c];if(j==""||j.indexOf("*")!=-1&&j!="*"&&j!="**")throw Error(OpenAjax.hub.Error.BadParameters);if(j=="**"&&c<b-1)throw Error(OpenAjax.hub.Error.BadParameters);}};OpenAjax.hub.InlineContainer.prototype._getSubscription=function(a){if(a=this._subs[a])return a;throw Error(OpenAjax.hub.Error.NoSubscription);};
+OpenAjax.hub.InlineHubClient=function(a){if(!a||!a.HubClient||!a.HubClient.onSecurityAlert||!a.InlineHubClient||!a.InlineHubClient.container)throw Error(OpenAjax.hub.Error.BadParameters);this._params=a;this._onSecurityAlert=a.HubClient.onSecurityAlert;this._scope=a.HubClient.scope||window;this._container=a.InlineHubClient.container;if(a.HubClient.log){var b=this;this._log=function(c){try{a.HubClient.log.call(b._scope,"InlineHubClient::"+b._container.getClientID()+": "+c)}catch(j){OpenAjax.hub._debugger()}}}else this._log=
+function(){}};OpenAjax.hub.InlineHubClient.prototype.connect=function(a,b){this._container.connect(this,a,b)};OpenAjax.hub.InlineHubClient.prototype.disconnect=function(a,b){this._container.disconnect(this,a,b)};OpenAjax.hub.InlineHubClient.prototype.getPartnerOrigin=function(){return this._container.getPartnerOrigin()};OpenAjax.hub.InlineHubClient.prototype.getClientID=function(){return this._container.getClientID()};
+OpenAjax.hub.InlineHubClient.prototype.subscribe=function(a,b,c,j,q){return this._container.subscribe(a,b,c,j,q)};OpenAjax.hub.InlineHubClient.prototype.publish=function(a,b){this._container.publish(a,b)};OpenAjax.hub.InlineHubClient.prototype.unsubscribe=function(a,b,c){this._container.unsubscribe(a,b,c)};OpenAjax.hub.InlineHubClient.prototype.isConnected=function(){return this._container.isConnected()};OpenAjax.hub.InlineHubClient.prototype.getScope=function(){return this._scope};
+OpenAjax.hub.InlineHubClient.prototype.getSubscriberData=function(a){return this._container.getSubscriberData(a)};OpenAjax.hub.InlineHubClient.prototype.getSubscriberScope=function(a){return this._container.getSubscriberScope(a)};OpenAjax.hub.InlineHubClient.prototype.getParameters=function(){return this._params};var eclipse=eclipse||{};
+eclipse.ServiceProvider=function(a,b){this.dispatchEvent=function(c){b.dispatchEvent.apply(b,[a,c].concat(Array.prototype.slice.call(arguments,1)))};this.unregister=function(){b.unregisterServiceProvider(a)}};
+eclipse.PluginProvider=function(){function a(l){j.publish("orion.plugin.response",l)}function b(){for(var l=[],d=0;d<q.length;d++)q[d]&&l.push({id:""+d,serviceType:{id:q[d].type,interfaces:q[d].methods,properties:q[d].properties}});return{services:l}}function c(l,d){try{if(d.type==="metadata")a({type:"metadata",id:d.id,result:b(),error:null});else{var g=q[0].implementation,k={type:"service",id:d.id,result:null,err:null},s=g[d.msgData.method].apply(g,d.msgData.params);if(s&&typeof s.then==="function")s.then(function(e){k.result=
+e;a(k)},function(e){k.error=e;a(k)});else{k.result=s;a(k)}}}catch(t){k.error=t;a(k)}}var j,q=[],f=false,o={dispatchEvent:function(l,d){if(!f)throw Error("Cannot dispatchEvent. Plugin Provider not connected");var g={serviceId:l,method:"dispatchEvent",params:[d].concat(Array.prototype.slice.call(arguments,2))};a(g)},unregisterServiceProvider:function(){if(f)throw Error("Cannot unregister. Plugin Provider is connected");q=[]}};this.registerServiceProvider=function(l,d,g){if(f)throw Error("Cannot register. Plugin Provider is connected");
+if(q.length==1)throw Error("Implementation restriction. There can be only one");var k,s=[];for(k in d)typeof d[k]==="function"&&s.push(k);k=q.length;q[k]={type:l,methods:s,implementation:d,properties:g||{}};return new eclipse.ServiceProvider(k,o)};this.connect=function(){if(!j){j=new OpenAjax.hub.IframeHubClient({HubClient:{onSecurityAlert:function(){}}});j.connect(function(l,d){if(d){j.subscribe("orion.plugin.request["+j.getClientID()+"]",c);var g={pluginURL:j.getClientID(),pluginData:b()};j.publish("orion.plugin.load",
+g);f=true}})}};this.disconnect=function(){if(j){var l=j;j=null;l.disconnect(function(){f=false})}}};
\ No newline at end of file
diff --git a/resources/orion/upper-plugin-example.html b/resources/orion/upper-plugin-example.html
new file mode 100644
index 0000000..7e8e6ff
--- /dev/null
+++ b/resources/orion/upper-plugin-example.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+<head>
+	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+	<script type="text/javascript" src="orion-plugin.js"></script>
+	<script>
+		window.onload = function() {
+			var provider = new eclipse.PluginProvider();
+			provider.registerServiceProvider("editorAction", {
+				info : function() {
+					return {
+						name : "UPPERCASE",
+						img : "/favicon.ico",
+						key : [ "u", true ]
+					};
+				},
+				run : function(text) {
+					return text.toUpperCase();
+				}
+			});
+			provider.connect();
+		};
+	</script>
+</head>
+<body>
+</body>
+</html>
\ No newline at end of file