var OpenAjax=OpenAjax||{};
if(!OpenAjax.hub){
OpenAjax.hub=function(){
var _1={};
var _2="org.openajax.hub.";
return {implementer:"http://openajax.org",implVersion:"2.0.4",specVersion:"2.0",implExtraData:{},libraries:_1,registerLibrary:function(_3,_4,_5,_6){
_1[_3]={prefix:_3,namespaceURI:_4,version:_5,extraData:_6};
this.publish(_2+"registerLibrary",_1[_3]);
},unregisterLibrary:function(_7){
this.publish(_2+"unregisterLibrary",_1[_7]);
delete _1[_7];
}};
}();
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",IncompatBrowser:"OpenAjax.hub.Error.IncompatBrowser"};
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(_8){
if(!_8||!_8.onPublish||!_8.onSubscribe){
throw new Error(OpenAjax.hub.Error.BadParameters);
}
this._p=_8;
this._onUnsubscribe=_8.onUnsubscribe?_8.onUnsubscribe:null;
this._scope=_8.scope||window;
if(_8.log){
var _9=this;
this._log=function(_a){
try{
_8.log.call(_9._scope,"ManagedHub: "+_a);
}
catch(e){
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(_b,_c,_d){
this._assertConn();
if(this._invokeOnSubscribe(_c,_b)){
return this._subscribe(_c,this._sendToClient,this,{c:_b,sid:_d});
}
throw new Error(OpenAjax.hub.Error.NotAllowed);
};
OpenAjax.hub.ManagedHub.prototype.unsubscribeForClient=function(_e,_f){
this._unsubscribe(_f);
this._invokeOnUnsubscribe(_e,_f);
};
OpenAjax.hub.ManagedHub.prototype.publishForClient=function(_10,_11,_12){
this._assertConn();
this._publish(_11,_12,_10);
};
OpenAjax.hub.ManagedHub.prototype.disconnect=function(){
this._active=false;
for(var c in this._containers){
this.removeContainer(this._containers[c]);
}
};
OpenAjax.hub.ManagedHub.prototype.getContainer=function(_13){
var _14=this._containers[_13];
return _14?_14:null;
};
OpenAjax.hub.ManagedHub.prototype.listContainers=function(){
var res=[];
for(var c in this._containers){
res.push(this._containers[c]);
}
return res;
};
OpenAjax.hub.ManagedHub.prototype.addContainer=function(_15){
this._assertConn();
var _16=_15.getClientID();
if(this._containers[_16]){
throw new Error(OpenAjax.hub.Error.Duplicate);
}
this._containers[_16]=_15;
};
OpenAjax.hub.ManagedHub.prototype.removeContainer=function(_17){
var _18=_17.getClientID();
if(!this._containers[_18]){
throw new Error(OpenAjax.hub.Error.NoContainer);
}
_17.remove();
delete this._containers[_18];
};
OpenAjax.hub.ManagedHub.prototype.subscribe=function(_19,_1a,_1b,_1c,_1d){
this._assertConn();
this._assertSubTopic(_19);
if(!_1a){
throw new Error(OpenAjax.hub.Error.BadParameters);
}
_1b=_1b||window;
if(!this._invokeOnSubscribe(_19,null)){
this._invokeOnComplete(_1c,_1b,null,false,OpenAjax.hub.Error.NotAllowed);
return;
}
var _1e=this;
function _1f(_20,_21,sd,_22){
if(_1e._invokeOnPublish(_20,_21,_22,null)){
try{
_1a.call(_1b,_20,_21,_1d);
}
catch(e){
OpenAjax.hub._debugger();
_1e._log("caught error from onData callback to Hub.subscribe(): "+e.message);
}
}
};
var _23=this._subscribe(_19,_1f,_1b,_1d);
this._invokeOnComplete(_1c,_1b,_23,true);
return _23;
};
OpenAjax.hub.ManagedHub.prototype.publish=function(_24,_25){
this._assertConn();
this._assertPubTopic(_24);
this._publish(_24,_25,null);
};
OpenAjax.hub.ManagedHub.prototype.unsubscribe=function(_26,_27,_28){
this._assertConn();
if(!_26){
throw new Error(OpenAjax.hub.Error.BadParameters);
}
this._unsubscribe(_26);
this._invokeOnUnsubscribe(null,_26);
this._invokeOnComplete(_27,_28,_26,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(_29){
this._assertConn();
var _2a=_29.split(".");
var sid=_2a.pop();
var sub=this._getSubscriptionObject(this._subscriptions,_2a,0,sid);
if(sub){
return sub.data;
}
throw new Error(OpenAjax.hub.Error.NoSubscription);
};
OpenAjax.hub.ManagedHub.prototype.getSubscriberScope=function(_2b){
this._assertConn();
var _2c=_2b.split(".");
var sid=_2c.pop();
var sub=this._getSubscriptionObject(this._subscriptions,_2c,0,sid);
if(sub){
return sub.scope;
}
throw new Error(OpenAjax.hub.Error.NoSubscription);
};
OpenAjax.hub.ManagedHub.prototype.getParameters=function(){
return this._p;
};
OpenAjax.hub.ManagedHub.prototype._sendToClient=function(_2d,_2e,sd,_2f){
if(!this.isConnected()){
return;
}
if(this._invokeOnPublish(_2d,_2e,_2f,sd.c)){
sd.c.sendToClient(_2d,_2e,sd.sid);
}
};
OpenAjax.hub.ManagedHub.prototype._assertConn=function(){
if(!this.isConnected()){
throw new Error(OpenAjax.hub.Error.Disconnected);
}
};
OpenAjax.hub.ManagedHub.prototype._assertPubTopic=function(_30){
if(!_30||_30===""||(_30.indexOf("*")!=-1)||(_30.indexOf("..")!=-1)||(_30.charAt(0)==".")||(_30.charAt(_30.length-1)==".")){
throw new Error(OpenAjax.hub.Error.BadParameters);
}
};
OpenAjax.hub.ManagedHub.prototype._assertSubTopic=function(_31){
if(!_31){
throw new Error(OpenAjax.hub.Error.BadParameters);
}
var _32=_31.split(".");
var len=_32.length;
for(var i=0;i<len;i++){
var p=_32[i];
if((p==="")||((p.indexOf("*")!=-1)&&(p!="*")&&(p!="**"))){
throw new Error(OpenAjax.hub.Error.BadParameters);
}
if((p=="**")&&(i<len-1)){
throw new Error(OpenAjax.hub.Error.BadParameters);
}
}
};
OpenAjax.hub.ManagedHub.prototype._invokeOnComplete=function(_33,_34,_35,_36,_37){
if(_33){
try{
_34=_34||window;
_33.call(_34,_35,_36,_37);
}
catch(e){
OpenAjax.hub._debugger();
this._log("caught error from onComplete callback: "+e.message);
}
}
};
OpenAjax.hub.ManagedHub.prototype._invokeOnPublish=function(_38,_39,_3a,_3b){
try{
return this._p.onPublish.call(this._scope,_38,_39,_3a,_3b);
}
catch(e){
OpenAjax.hub._debugger();
this._log("caught error from onPublish callback to constructor: "+e.message);
}
return false;
};
OpenAjax.hub.ManagedHub.prototype._invokeOnSubscribe=function(_3c,_3d){
try{
return this._p.onSubscribe.call(this._scope,_3c,_3d);
}
catch(e){
OpenAjax.hub._debugger();
this._log("caught error from onSubscribe callback to constructor: "+e.message);
}
return false;
};
OpenAjax.hub.ManagedHub.prototype._invokeOnUnsubscribe=function(_3e,_3f){
if(this._onUnsubscribe){
var _40=_3f.slice(0,_3f.lastIndexOf("."));
try{
this._onUnsubscribe.call(this._scope,_40,_3e);
}
catch(e){
OpenAjax.hub._debugger();
this._log("caught error from onUnsubscribe callback to constructor: "+e.message);
}
}
};
OpenAjax.hub.ManagedHub.prototype._subscribe=function(_41,_42,_43,_44){
var _45=_41+"."+this._seq;
var sub={scope:_43,cb:_42,data:_44,sid:this._seq++};
var _46=_41.split(".");
this._recursiveSubscribe(this._subscriptions,_46,0,sub);
return _45;
};
OpenAjax.hub.ManagedHub.prototype._recursiveSubscribe=function(_47,_48,_49,sub){
var _4a=_48[_49];
if(_49==_48.length){
sub.next=_47.s;
_47.s=sub;
}else{
if(typeof _47.c=="undefined"){
_47.c={};
}
if(typeof _47.c[_4a]=="undefined"){
_47.c[_4a]={c:{},s:null};
this._recursiveSubscribe(_47.c[_4a],_48,_49+1,sub);
}else{
this._recursiveSubscribe(_47.c[_4a],_48,_49+1,sub);
}
}
};
OpenAjax.hub.ManagedHub.prototype._publish=function(_4b,_4c,_4d){
if(this._isPublishing){
this._pubQ.push({t:_4b,d:_4c,p:_4d});
return;
}
this._safePublish(_4b,_4c,_4d);
while(this._pubQ.length>0){
var pub=this._pubQ.shift();
this._safePublish(pub.t,pub.d,pub.p);
}
};
OpenAjax.hub.ManagedHub.prototype._safePublish=function(_4e,_4f,_50){
this._isPublishing=true;
var _51=_4e.split(".");
this._recursivePublish(this._subscriptions,_51,0,_4e,_4f,_50);
this._isPublishing=false;
};
OpenAjax.hub.ManagedHub.prototype._recursivePublish=function(_52,_53,_54,_55,msg,_56){
if(typeof _52!="undefined"){
var _57;
if(_54==_53.length){
_57=_52;
}else{
this._recursivePublish(_52.c[_53[_54]],_53,_54+1,_55,msg,_56);
this._recursivePublish(_52.c["*"],_53,_54+1,_55,msg,_56);
_57=_52.c["**"];
}
if(typeof _57!="undefined"){
var sub=_57.s;
while(sub){
var sc=sub.scope;
var cb=sub.cb;
var d=sub.data;
if(typeof cb=="string"){
cb=sc[cb];
}
cb.call(sc,_55,msg,d,_56);
sub=sub.next;
}
}
}
};
OpenAjax.hub.ManagedHub.prototype._unsubscribe=function(_58){
var _59=_58.split(".");
var sid=_59.pop();
if(!this._recursiveUnsubscribe(this._subscriptions,_59,0,sid)){
throw new Error(OpenAjax.hub.Error.NoSubscription);
}
};
OpenAjax.hub.ManagedHub.prototype._recursiveUnsubscribe=function(_5a,_5b,_5c,sid){
if(typeof _5a=="undefined"){
return false;
}
if(_5c<_5b.length){
var _5d=_5a.c[_5b[_5c]];
if(!_5d){
return false;
}
this._recursiveUnsubscribe(_5d,_5b,_5c+1,sid);
if(!_5d.s){
for(var x in _5d.c){
return true;
}
delete _5a.c[_5b[_5c]];
}
}else{
var sub=_5a.s;
var _5e=null;
var _5f=false;
while(sub){
if(sid==sub.sid){
_5f=true;
if(sub==_5a.s){
_5a.s=sub.next;
}else{
_5e.next=sub.next;
}
break;
}
_5e=sub;
sub=sub.next;
}
if(!_5f){
return false;
}
}
return true;
};
OpenAjax.hub.ManagedHub.prototype._getSubscriptionObject=function(_60,_61,_62,sid){
if(typeof _60!="undefined"){
if(_62<_61.length){
var _63=_60.c[_61[_62]];
return this._getSubscriptionObject(_63,_61,_62+1,sid);
}
var sub=_60.s;
while(sub){
if(sid==sub.sid){
return sub;
}
sub=sub.next;
}
}
return null;
};
OpenAjax.hub._hub=new OpenAjax.hub.ManagedHub({onSubscribe:function(_64,_65){
return true;
},onPublish:function(_66,_67,_68,_69){
return true;
}});
OpenAjax.hub.subscribe=function(_6a,_6b,_6c,_6d){
if(typeof _6b==="string"){
_6c=_6c||window;
_6b=_6c[_6b]||null;
}
return OpenAjax.hub._hub.subscribe(_6a,_6b,_6c,null,_6d);
};
OpenAjax.hub.unsubscribe=function(_6e){
return OpenAjax.hub._hub.unsubscribe(_6e);
};
OpenAjax.hub.publish=function(_6f,_70){
OpenAjax.hub._hub.publish(_6f,_70);
};
OpenAjax.hub.registerLibrary("OpenAjax","http://openajax.org/hub","2.0",{});
}
OpenAjax.hub.InlineContainer=function(hub,_71,_72){
if(!hub||!_71||!_72||!_72.Container||!_72.Container.onSecurityAlert){
throw new Error(OpenAjax.hub.Error.BadParameters);
}
var _73=_72.Container.scope||window;
var _74=false;
var _75=[];
var _76=0;
var _77=null;
if(_72.Container.log){
var log=function(msg){
try{
_72.Container.log.call(_73,"InlineContainer::"+_71+": "+msg);
}
catch(e){
OpenAjax.hub._debugger();
}
};
}else{
log=function(){
};
}
this._init=function(){
hub.addContainer(this);
};
this.getHub=function(){
return hub;
};
this.sendToClient=function(_78,_79,_7a){
if(_74){
var sub=_75[_7a];
try{
sub.cb.call(sub.sc,_78,_79,sub.d);
}
catch(e){
OpenAjax.hub._debugger();
_77._log("caught error from onData callback to HubClient.subscribe(): "+e.message);
}
}
};
this.remove=function(){
if(_74){
_7b();
}
};
this.isConnected=function(){
return _74;
};
this.getClientID=function(){
return _71;
};
this.getPartnerOrigin=function(){
if(_74){
return window.location.protocol+"//"+window.location.hostname;
}
return null;
};
this.getParameters=function(){
return _72;
};
this.connect=function(_7c,_7d,_7e){
if(_74){
throw new Error(OpenAjax.hub.Error.Duplicate);
}
_74=true;
_77=_7c;
if(_72.Container.onConnect){
try{
_72.Container.onConnect.call(_73,this);
}
catch(e){
OpenAjax.hub._debugger();
log("caught error from onConnect callback to constructor: "+e.message);
}
}
_7f(_7d,_7e,_7c,true);
};
this.disconnect=function(_80,_81,_82){
if(!_74){
throw new Error(OpenAjax.hub.Error.Disconnected);
}
_7b();
if(_72.Container.onDisconnect){
try{
_72.Container.onDisconnect.call(_73,this);
}
catch(e){
OpenAjax.hub._debugger();
log("caught error from onDisconnect callback to constructor: "+e.message);
}
}
_7f(_81,_82,_80,true);
};
this.subscribe=function(_83,_84,_85,_86,_87){
_88();
_89(_83);
if(!_84){
throw new Error(OpenAjax.hub.Error.BadParameters);
}
var _8a=""+_76++;
var _8b=false;
var msg=null;
try{
var _8c=hub.subscribeForClient(this,_83,_8a);
_8b=true;
}
catch(e){
_8a=null;
msg=e.message;
}
_85=_85||window;
if(_8b){
_75[_8a]={h:_8c,cb:_84,sc:_85,d:_87};
}
_7f(_86,_85,_8a,_8b,msg);
return _8a;
};
this.publish=function(_8d,_8e){
_88();
_8f(_8d);
hub.publishForClient(this,_8d,_8e);
};
this.unsubscribe=function(_90,_91,_92){
_88();
if(typeof _90==="undefined"||_90===null){
throw new Error(OpenAjax.hub.Error.BadParameters);
}
var sub=_75[_90];
if(!sub){
throw new Error(OpenAjax.hub.Error.NoSubscription);
}
hub.unsubscribeForClient(this,sub.h);
delete _75[_90];
_7f(_91,_92,_90,true);
};
this.getSubscriberData=function(_93){
_88();
return _94(_93).d;
};
this.getSubscriberScope=function(_95){
_88();
return _94(_95).sc;
};
function _7f(_96,_97,_98,_99,_9a){
if(_96){
try{
_97=_97||window;
_96.call(_97,_98,_99,_9a);
}
catch(e){
OpenAjax.hub._debugger();
_77._log("caught error from onComplete callback: "+e.message);
}
}
};
function _7b(){
for(var _9b in _75){
hub.unsubscribeForClient(this,_75[_9b].h);
}
_75=[];
_76=0;
_74=false;
};
function _88(){
if(!_74){
throw new Error(OpenAjax.hub.Error.Disconnected);
}
};
function _8f(_9c){
if((_9c==null)||(_9c==="")||(_9c.indexOf("*")!=-1)||(_9c.indexOf("..")!=-1)||(_9c.charAt(0)==".")||(_9c.charAt(_9c.length-1)==".")){
throw new Error(OpenAjax.hub.Error.BadParameters);
}
};
function _89(_9d){
if(!_9d){
throw new Error(OpenAjax.hub.Error.BadParameters);
}
var _9e=_9d.split(".");
var len=_9e.length;
for(var i=0;i<len;i++){
var p=_9e[i];
if((p==="")||((p.indexOf("*")!=-1)&&(p!="*")&&(p!="**"))){
throw new Error(OpenAjax.hub.Error.BadParameters);
}
if((p=="**")&&(i<len-1)){
throw new Error(OpenAjax.hub.Error.BadParameters);
}
}
};
function _94(_9f){
var sub=_75[_9f];
if(sub){
return sub;
}
throw new Error(OpenAjax.hub.Error.NoSubscription);
};
this._init();
};
OpenAjax.hub.InlineHubClient=function(_a0){
if(!_a0||!_a0.HubClient||!_a0.HubClient.onSecurityAlert||!_a0.InlineHubClient||!_a0.InlineHubClient.container){
throw new Error(OpenAjax.hub.Error.BadParameters);
}
var _a1=_a0.InlineHubClient.container;
var _a2=_a0.HubClient.scope||window;
if(_a0.HubClient.log){
var log=function(msg){
try{
_a0.HubClient.log.call(_a2,"InlineHubClient::"+_a1.getClientID()+": "+msg);
}
catch(e){
OpenAjax.hub._debugger();
}
};
}else{
log=function(){
};
}
this._log=log;
this.connect=function(_a3,_a4){
_a1.connect(this,_a3,_a4);
};
this.disconnect=function(_a5,_a6){
_a1.disconnect(this,_a5,_a6);
};
this.getPartnerOrigin=function(){
return _a1.getPartnerOrigin();
};
this.getClientID=function(){
return _a1.getClientID();
};
this.subscribe=function(_a7,_a8,_a9,_aa,_ab){
return _a1.subscribe(_a7,_a8,_a9,_aa,_ab);
};
this.publish=function(_ac,_ad){
_a1.publish(_ac,_ad);
};
this.unsubscribe=function(_ae,_af,_b0){
_a1.unsubscribe(_ae,_af,_b0);
};
this.isConnected=function(){
return _a1.isConnected();
};
this.getScope=function(){
return _a2;
};
this.getSubscriberData=function(_b1){
return _a1.getSubscriberData(_b1);
};
this.getSubscriberScope=function(_b2){
return _a1.getSubscriberScope(_b2);
};
this.getParameters=function(){
return _a0;
};
};
var OpenAjax=OpenAjax||{};
OpenAjax.hub=OpenAjax.hub||{};
OpenAjax.gadgets=typeof OpenAjax.gadgets==="object"?OpenAjax.gadgets:typeof gadgets==="object"?gadgets:{};
OpenAjax.gadgets.rpctx=OpenAjax.gadgets.rpctx||{};
(function(){
if(typeof gadgets==="undefined"){
if(typeof oaaConfig==="undefined"){
var _b3=document.getElementsByTagName("script");
var _b4=/openajax(?:managedhub-(?:all|core).*|-mashup)\.js$/i;
for(var i=_b3.length-1;i>=0;i--){
var src=_b3[i].getAttribute("src");
if(!src){
continue;
}
var m=src.match(_b4);
if(m){
var _b5=_b3[i].getAttribute("oaaConfig");
if(_b5){
try{
oaaConfig=eval("({ "+_b5+" })");
}
catch(e){
}
}
break;
}
}
}
if(typeof oaaConfig!=="undefined"&&oaaConfig.gadgetsGlobal){
gadgets=OpenAjax.gadgets;
}
}
})();
if(!OpenAjax.hub.IframeContainer){
(function(){
OpenAjax.hub.IframeContainer=function(hub,_b6,_b7){
_b8(arguments);
var _b9=this;
var _ba=_b7.Container.scope||window;
var _bb=false;
var _bc={};
var _bd;
var _be;
var _bf=_b7.IframeContainer.timeout||15000;
var _c0;
if(_b7.Container.log){
var log=function(msg){
try{
_b7.Container.log.call(_ba,"IframeContainer::"+_b6+": "+msg);
}
catch(e){
OpenAjax.hub._debugger();
}
};
}else{
log=function(){
};
}
this._init=function(){
hub.addContainer(this);
_be=OpenAjax.hub.IframeContainer._rpcRouter.add(_b6,this);
_bd=_113(_b7,_ba,log);
var _c1=null;
var _c2=OpenAjax.gadgets.rpc.getRelayChannel();
if(_b7.IframeContainer.tunnelURI){
if(_c2!=="wpm"&&_c2!=="nix"){
throw new Error(OpenAjax.hub.Error.IncompatBrowser);
}
}else{
log("WARNING: Parameter 'IframeContaienr.tunnelURI' not specified. Connection will not be fully secure.");
if(_c2==="rmr"){
_c1=OpenAjax.gadgets.rpc.getOrigin(_b7.IframeContainer.uri)+"/robots.txt";
}
}
_c3();
OpenAjax.gadgets.rpc.setupReceiver(_be,_c1);
_c4();
};
this.sendToClient=function(_c5,_c6,_c7){
OpenAjax.gadgets.rpc.call(_be,"openajax.pubsub",null,"pub",_c5,_c6,_c7);
};
this.remove=function(){
_c8();
clearTimeout(_c0);
OpenAjax.gadgets.rpc.removeReceiver(_be);
var _c9=document.getElementById(_be);
_c9.parentNode.removeChild(_c9);
OpenAjax.hub.IframeContainer._rpcRouter.remove(_be);
};
this.isConnected=function(){
return _bb;
};
this.getClientID=function(){
return _b6;
};
this.getPartnerOrigin=function(){
if(_bb){
var _ca=OpenAjax.gadgets.rpc.getReceiverOrigin(_be);
if(_ca){
return (/^([a-zA-Z]+:\/\/[^:]+).*/.exec(_ca)[1]);
}
}
return null;
};
this.getParameters=function(){
return _b7;
};
this.getHub=function(){
return hub;
};
this.getIframe=function(){
return document.getElementById(_be);
};
function _b8(_cb){
var hub=_cb[0],_b6=_cb[1],_b7=_cb[2];
if(!hub||!_b6||!_b7||!_b7.Container||!_b7.Container.onSecurityAlert||!_b7.IframeContainer||!_b7.IframeContainer.parent||!_b7.IframeContainer.uri){
throw new Error(OpenAjax.hub.Error.BadParameters);
}
};
this._handleIncomingRPC=function(_cc,_cd,_ce){
switch(_cc){
case "pub":
hub.publishForClient(_b9,_cd,_ce);
break;
case "sub":
var _cf="";
try{
_bc[_ce]=hub.subscribeForClient(_b9,_cd,_ce);
}
catch(e){
_cf=e.message;
}
return _cf;
case "uns":
var _d0=_bc[_ce];
hub.unsubscribeForClient(_b9,_d0);
delete _bc[_ce];
return _ce;
case "con":
_d1();
return true;
case "dis":
_c4();
_c8();
if(_b7.Container.onDisconnect){
try{
_b7.Container.onDisconnect.call(_ba,_b9);
}
catch(e){
OpenAjax.hub._debugger();
log("caught error from onDisconnect callback to constructor: "+e.message);
}
}
return true;
}
};
this._onSecurityAlert=function(_d2){
_d3(_112[_d2]);
};
function _c3(){
var _d4=document.createElement("span");
_b7.IframeContainer.parent.appendChild(_d4);
var _d5="<iframe id=\""+_be+"\" name=\""+_be+"\" src=\"javascript:'<html></html>'\"";
var _d6="";
var _d7=_b7.IframeContainer.iframeAttrs;
if(_d7){
for(var _d8 in _d7){
switch(_d8){
case "style":
for(var _d9 in _d7.style){
_d6+=_d9+":"+_d7.style[_d9]+";";
}
break;
case "className":
_d5+=" class=\""+_d7[_d8]+"\"";
break;
default:
_d5+=" "+_d8+"=\""+_d7[_d8]+"\"";
}
}
}
_d6+="visibility:hidden;";
_d5+=" style=\""+_d6+"\"></iframe>";
_d4.innerHTML=_d5;
var _da=_b7.IframeContainer.tunnelURI;
document.getElementById(_be).src=_b7.IframeContainer.uri+"#rpctoken="+_bd+(_da?"&parent="+encodeURIComponent(_da)+"&forcesecure=true":"&oaaParent="+encodeURIComponent(OpenAjax.gadgets.rpc.getOrigin(window.location.href)));
};
function _d1(){
function _db(_dc){
if(_dc){
_bb=true;
clearTimeout(_c0);
document.getElementById(_be).style.visibility="visible";
if(_b7.Container.onConnect){
try{
_b7.Container.onConnect.call(_ba,_b9);
}
catch(e){
OpenAjax.hub._debugger();
log("caught error from onConnect callback to constructor: "+e.message);
}
}
}
};
OpenAjax.gadgets.rpc.call(_be,"openajax.pubsub",_db,"cmd","con");
};
function _c8(){
if(_bb){
_bb=false;
document.getElementById(_be).style.visibility="hidden";
for(var s in _bc){
hub.unsubscribeForClient(_b9,_bc[s]);
}
_bc={};
}
};
function _d3(_dd){
try{
_b7.Container.onSecurityAlert.call(_ba,_b9,_dd);
}
catch(e){
OpenAjax.hub._debugger();
log("caught error from onSecurityAlert callback to constructor: "+e.message);
}
};
function _c4(){
_c0=setTimeout(function(){
_d3(OpenAjax.hub.SecurityAlert.LoadTimeout);
_b9._handleIncomingRPC=function(){
};
},_bf);
};
this._init();
};
OpenAjax.hub.IframeHubClient=function(_de){
if(!_de||!_de.HubClient||!_de.HubClient.onSecurityAlert){
throw new Error(OpenAjax.hub.Error.BadParameters);
}
var _df=this;
var _e0=_de.HubClient.scope||window;
var _e1=false;
var _e2={};
var _e3=0;
var _e4;
if(_de.HubClient.log){
var log=function(msg){
try{
_de.HubClient.log.call(_e0,"IframeHubClient::"+_e4+": "+msg);
}
catch(e){
OpenAjax.hub._debugger();
}
};
}else{
log=function(){
};
}
this._init=function(){
var _e5=OpenAjax.gadgets.util.getUrlParameters();
if(!_e5.parent){
var _e6=_e5.oaaParent+"/robots.txt";
OpenAjax.gadgets.rpc.setupReceiver("..",_e6);
}
if(_de.IframeHubClient&&_de.IframeHubClient.requireParentVerifiable&&OpenAjax.gadgets.rpc.getReceiverOrigin("..")===null){
OpenAjax.gadgets.rpc.removeReceiver("..");
throw new Error(OpenAjax.hub.Error.IncompatBrowser);
}
OpenAjax.hub.IframeContainer._rpcRouter.add("..",this);
var _e7=OpenAjax.gadgets.rpc.RPC_ID;
if(!_e7){
throw new Error(OpenAjax.hub.Error.WrongProtocol);
}
_e4=_e7.substr(_e7.indexOf("_")+1);
};
this.connect=function(_e8,_e9){
if(_e1){
throw new Error(OpenAjax.hub.Error.Duplicate);
}
function _ea(_eb){
if(_eb){
_e1=true;
if(_e8){
try{
_e8.call(_e9||window,_df,true);
}
catch(e){
OpenAjax.hub._debugger();
log("caught error from onComplete callback to connect(): "+e.message);
}
}
}
};
OpenAjax.gadgets.rpc.call("..","openajax.pubsub",_ea,"con");
};
this.disconnect=function(_ec,_ed){
if(!_e1){
throw new Error(OpenAjax.hub.Error.Disconnected);
}
_e1=false;
var _ee=null;
if(_ec){
_ee=function(_ef){
try{
_ec.call(_ed||window,_df,true);
}
catch(e){
OpenAjax.hub._debugger();
log("caught error from onComplete callback to disconnect(): "+e.message);
}
};
}
OpenAjax.gadgets.rpc.call("..","openajax.pubsub",_ee,"dis");
};
this.getPartnerOrigin=function(){
if(_e1){
var _f0=OpenAjax.gadgets.rpc.getReceiverOrigin("..");
if(_f0){
return (/^([a-zA-Z]+:\/\/[^:]+).*/.exec(_f0)[1]);
}
}
return null;
};
this.getClientID=function(){
return _e4;
};
this.subscribe=function(_f1,_f2,_f3,_f4,_f5){
_f6();
_f7(_f1);
if(!_f2){
throw new Error(OpenAjax.hub.Error.BadParameters);
}
_f3=_f3||window;
var _f8=""+_e3++;
_e2[_f8]={cb:_f2,sc:_f3,d:_f5};
function _f9(_fa){
if(_fa!==""){
delete _e2[_f8];
}
if(_f4){
try{
_f4.call(_f3,_f8,_fa==="",_fa);
}
catch(e){
OpenAjax.hub._debugger();
log("caught error from onComplete callback to subscribe(): "+e.message);
}
}
};
OpenAjax.gadgets.rpc.call("..","openajax.pubsub",_f9,"sub",_f1,_f8);
return _f8;
};
this.publish=function(_fb,_fc){
_f6();
_fd(_fb);
OpenAjax.gadgets.rpc.call("..","openajax.pubsub",null,"pub",_fb,_fc);
};
this.unsubscribe=function(_fe,_ff,_100){
_f6();
if(!_fe){
throw new Error(OpenAjax.hub.Error.BadParameters);
}
if(!_e2[_fe]||_e2[_fe].uns){
throw new Error(OpenAjax.hub.Error.NoSubscription);
}
_e2[_fe].uns=true;
function _101(_102){
delete _e2[_fe];
if(_ff){
try{
_ff.call(_100||window,_fe,true);
}
catch(e){
OpenAjax.hub._debugger();
log("caught error from onComplete callback to unsubscribe(): "+e.message);
}
}
};
OpenAjax.gadgets.rpc.call("..","openajax.pubsub",_101,"uns",null,_fe);
};
this.isConnected=function(){
return _e1;
};
this.getScope=function(){
return _e0;
};
this.getSubscriberData=function(_103){
_f6();
if(_e2[_103]){
return _e2[_103].d;
}
throw new Error(OpenAjax.hub.Error.NoSubscription);
};
this.getSubscriberScope=function(_104){
_f6();
if(_e2[_104]){
return _e2[_104].sc;
}
throw new Error(OpenAjax.hub.Error.NoSubscription);
};
this.getParameters=function(){
return _de;
};
this._handleIncomingRPC=function(_105,_106,data,_107){
if(_105==="pub"){
if(_e2[_107]&&!_e2[_107].uns){
try{
_e2[_107].cb.call(_e2[_107].sc,_106,data,_e2[_107].d);
}
catch(e){
OpenAjax.hub._debugger();
log("caught error from onData callback to subscribe(): "+e.message);
}
}
}
if(_106==="con"){
return true;
}
return false;
};
function _f6(){
if(!_e1){
throw new Error(OpenAjax.hub.Error.Disconnected);
}
};
function _f7(_108){
if(!_108){
throw new Error(OpenAjax.hub.Error.BadParameters);
}
var path=_108.split(".");
var len=path.length;
for(var i=0;i<len;i++){
var p=path[i];
if((p==="")||((p.indexOf("*")!=-1)&&(p!="*")&&(p!="**"))){
throw new Error(OpenAjax.hub.Error.BadParameters);
}
if((p=="**")&&(i<len-1)){
throw new Error(OpenAjax.hub.Error.BadParameters);
}
}
};
function _fd(_109){
if(!_109||_109===""||(_109.indexOf("*")!=-1)||(_109.indexOf("..")!=-1)||(_109.charAt(0)==".")||(_109.charAt(_109.length-1)==".")){
throw new Error(OpenAjax.hub.Error.BadParameters);
}
};
this._init();
};
OpenAjax.hub.IframeContainer._rpcRouter=function(){
var _10a={};
function _10b(){
var r=_10a[this.f];
if(r){
return r._handleIncomingRPC.apply(r,arguments);
}
};
function _10c(_10d,_10e){
var r=_10a[_10d];
if(r){
r._onSecurityAlert.call(r,_10e);
}
};
return {add:function(id,_10f){
function _110(id,_111){
if(id===".."){
if(!_10a[".."]){
_10a[".."]=_111;
}
return;
}
do{
newID=((32767*Math.random())|0).toString(16)+"_"+id;
}while(_10a[newID]);
_10a[newID]=_111;
return newID;
};
OpenAjax.gadgets.rpc.register("openajax.pubsub",_10b);
OpenAjax.gadgets.rpc.config({securityCallback:_10c});
_112[OpenAjax.gadgets.rpc.SEC_ERROR_LOAD_TIMEOUT]=OpenAjax.hub.SecurityAlert.LoadTimeout;
_112[OpenAjax.gadgets.rpc.SEC_ERROR_FRAME_PHISH]=OpenAjax.hub.SecurityAlert.FramePhish;
_112[OpenAjax.gadgets.rpc.SEC_ERROR_FORGED_MSG]=OpenAjax.hub.SecurityAlert.ForgedMsg;
this.add=_110;
return _110(id,_10f);
},remove:function(id){
delete _10a[id];
}};
}();
var _112={};
function _113(_114,_115,log){
if(!OpenAjax.hub.IframeContainer._prng){
var seed=new Date().getTime()+Math.random()+document.cookie;
OpenAjax.hub.IframeContainer._prng=OpenAjax._smash.crypto.newPRNG(seed);
}
var p=_114.IframeContainer||_114.IframeHubClient;
if(p&&p.seed){
try{
var _116=p.seed.call(_115);
OpenAjax.hub.IframeContainer._prng.addSeed(_116);
}
catch(e){
OpenAjax.hub._debugger();
log("caught error from 'seed' callback: "+e.message);
}
}
var _117=(p&&p.tokenLength)||6;
return OpenAjax.hub.IframeContainer._prng.nextRandomB64Str(_117);
};
})();
}
if(typeof OpenAjax._smash=="undefined"){
OpenAjax._smash={};
}
OpenAjax._smash.crypto={"strToWA":function(str,_118){
var bin=Array();
var mask=(1<<_118)-1;
for(var i=0;i<str.length*_118;i+=_118){
bin[i>>5]|=(str.charCodeAt(i/_118)&mask)<<(32-_118-i%32);
}
return bin;
},"hmac_sha1":function(_119,_11a,_11b){
var ipad=Array(16),opad=Array(16);
for(var i=0;i<16;i++){
ipad[i]=_119[i]^909522486;
opad[i]=_119[i]^1549556828;
}
var hash=this.sha1(ipad.concat(this.strToWA(_11a,_11b)),512+_11a.length*_11b);
return this.sha1(opad.concat(hash),512+160);
},"newPRNG":function(_11c){
var that=this;
if((typeof _11c!="string")||(_11c.length<12)){
alert("WARNING: Seed length too short ...");
}
var _11d=[43417,15926,18182,33130,9585,30800,49772,40144,47678,55453,4659,38181,65340,6787,54417,65301];
var _11e=[];
var _11f=0;
function _120(_121){
return that.hmac_sha1(_11d,_121,8);
};
function _122(_123){
var _124=_120(_123);
for(var i=0;i<5;i++){
_11e[i]^=_124[i];
}
};
_122(_11c);
return {"addSeed":function(seed){
_122(seed);
},"nextRandomOctets":function(len){
var _125=[];
while(len>0){
_11f+=1;
var _126=that.hmac_sha1(_11e,(_11f).toString(16),8);
for(var i=0;(i<20)&(len>0);i++,len--){
_125.push((_126[i>>2]>>(i%4))%256);
}
}
return _125;
},"nextRandomB64Str":function(len){
var _127="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";
var _128=this.nextRandomOctets(len);
var _129="";
for(var i=0;i<len;i++){
_129+=_127.charAt(_128[i]&63);
}
return _129;
}};
},"sha1":function(){
var _12a=function(x,y){
var lsw=(x&65535)+(y&65535);
var msw=(x>>16)+(y>>16)+(lsw>>16);
return (msw<<16)|(lsw&65535);
};
var rol=function(num,cnt){
return (num<<cnt)|(num>>>(32-cnt));
};
function _12b(t,b,c,d){
if(t<20){
return (b&c)|((~b)&d);
}
if(t<40){
return b^c^d;
}
if(t<60){
return (b&c)|(b&d)|(c&d);
}
return b^c^d;
};
function _12c(t){
return (t<20)?1518500249:(t<40)?1859775393:(t<60)?-1894007588:-899497514;
};
return function(_12d,_12e){
_12d[_12e>>5]|=128<<(24-_12e%32);
_12d[((_12e+64>>9)<<4)+15]=_12e;
var W=Array(80);
var H0=1732584193;
var H1=-271733879;
var H2=-1732584194;
var H3=271733878;
var H4=-1009589776;
for(var i=0;i<_12d.length;i+=16){
var a=H0;
var b=H1;
var c=H2;
var d=H3;
var e=H4;
for(var j=0;j<80;j++){
W[j]=((j<16)?_12d[i+j]:rol(W[j-3]^W[j-8]^W[j-14]^W[j-16],1));
var T=_12a(_12a(rol(a,5),_12b(j,b,c,d)),_12a(_12a(e,W[j]),_12c(j)));
e=d;
d=c;
c=rol(b,30);
b=a;
a=T;
}
H0=_12a(a,H0);
H1=_12a(b,H1);
H2=_12a(c,H2);
H3=_12a(d,H3);
H4=_12a(e,H4);
}
return Array(H0,H1,H2,H3,H4);
};
}()};
if(!this.JSON){
JSON={};
}
(function(){
function f(n){
return n<10?"0"+n:n;
};
if(typeof Date.prototype.toJSON!=="function"){
Date.prototype.toJSON=function(key){
return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z";
};
String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(key){
return this.valueOf();
};
}
var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,_12f=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,_130,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","\"":"\\\"","\\":"\\\\"},rep;
function _131(_132){
_12f.lastIndex=0;
return _12f.test(_132)?"\""+_132.replace(_12f,function(a){
var c=meta[a];
return typeof c==="string"?c:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4);
})+"\"":"\""+_132+"\"";
};
function str(key,_133){
var i,k,v,_134,mind=gap,_135,_136=_133[key];
if(_136&&typeof _136==="object"&&typeof _136.toJSON==="function"){
_136=_136.toJSON(key);
}
if(typeof rep==="function"){
_136=rep.call(_133,key,_136);
}
switch(typeof _136){
case "string":
return _131(_136);
case "number":
return isFinite(_136)?String(_136):"null";
case "boolean":
case "null":
return String(_136);
case "object":
if(!_136){
return "null";
}
gap+=_130;
_135=[];
if(Object.prototype.toString.apply(_136)==="[object Array]"){
_134=_136.length;
for(i=0;i<_134;i+=1){
_135[i]=str(i,_136)||"null";
}
v=_135.length===0?"[]":gap?"[\n"+gap+_135.join(",\n"+gap)+"\n"+mind+"]":"["+_135.join(",")+"]";
gap=mind;
return v;
}
if(rep&&typeof rep==="object"){
_134=rep.length;
for(i=0;i<_134;i+=1){
k=rep[i];
if(typeof k==="string"){
v=str(k,_136);
if(v){
_135.push(_131(k)+(gap?": ":":")+v);
}
}
}
}else{
for(k in _136){
if(Object.hasOwnProperty.call(_136,k)){
v=str(k,_136);
if(v){
_135.push(_131(k)+(gap?": ":":")+v);
}
}
}
}
v=_135.length===0?"{}":gap?"{\n"+gap+_135.join(",\n"+gap)+"\n"+mind+"}":"{"+_135.join(",")+"}";
gap=mind;
return v;
}
};
if(typeof JSON.stringify!=="function"){
JSON.stringify=function(_137,_138,_139){
var i;
gap="";
_130="";
if(typeof _139==="number"){
for(i=0;i<_139;i+=1){
_130+=" ";
}
}else{
if(typeof _139==="string"){
_130=_139;
}
}
rep=_138;
if(_138&&typeof _138!=="function"&&(typeof _138!=="object"||typeof _138.length!=="number")){
throw new Error("JSON.stringify");
}
return str("",{"":_137});
};
}
if(typeof JSON.parse!=="function"){
JSON.parse=function(text,_13a){
var j;
function walk(_13b,key){
var k,v,_13c=_13b[key];
if(_13c&&typeof _13c==="object"){
for(k in _13c){
if(Object.hasOwnProperty.call(_13c,k)){
v=walk(_13c,k);
if(v!==undefined){
_13c[k]=v;
}else{
delete _13c[k];
}
}
}
}
return _13a.call(_13b,key,_13c);
};
cx.lastIndex=0;
if(cx.test(text)){
text=text.replace(cx,function(a){
return "\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4);
});
}
if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){
j=eval("("+text+")");
return typeof _13a==="function"?walk({"":j},""):j;
}
throw new SyntaxError("JSON.parse");
};
}
})();
OpenAjax.gadgets.util=function(){
function _13d(url){
var _13e;
var _13f=url.indexOf("?");
var _140=url.indexOf("#");
if(_140===-1){
_13e=url.substr(_13f+1);
}else{
_13e=[url.substr(_13f+1,_140-_13f-1),"&",url.substr(_140+1)].join("");
}
return _13e.split("&");
};
var _141=null;
var _142=[];
return {getUrlParameters:function(_143){
if(_141!==null&&typeof _143==="undefined"){
return _141;
}
var _144={};
var _145=_13d(_143||document.location.href);
var _146=window.decodeURIComponent?decodeURIComponent:unescape;
for(var i=0,j=_145.length;i<j;++i){
var pos=_145[i].indexOf("=");
if(pos===-1){
continue;
}
var _147=_145[i].substring(0,pos);
var _148=_145[i].substring(pos+1);
_148=_148.replace(/\+/g," ");
_144[_147]=_146(_148);
}
if(typeof _143==="undefined"){
_141=_144;
}
return _144;
},registerOnLoadHandler:function(_149){
_142.push(_149);
},runOnLoadHandlers:function(){
for(var i=0,j=_142.length;i<j;++i){
_142[i]();
}
},"attachBrowserEvent":function(elem,_14a,_14b,_14c){
if(elem.addEventListener){
elem.addEventListener(_14a,_14b,_14c);
}else{
if(elem.attachEvent){
elem.attachEvent("on"+_14a,_14b);
}
}
},"removeBrowserEvent":function(elem,_14d,_14e,_14f){
if(elem.removeEventListener){
elem.removeEventListener(_14d,_14e,_14f);
}else{
if(elem.detachEvent){
elem.detachEvent("on"+_14d,_14e);
}
}
}};
}();
OpenAjax.gadgets.util.getUrlParameters();
OpenAjax.gadgets.json=OpenAjax.gadgets.json||{};
if(!OpenAjax.gadgets.json.stringify){
OpenAjax.gadgets.json={parse:function(str){
try{
if (str==="postmessage.test"){return false;}
return window.JSON.parse(str);
}
catch(e){
return false;
}
},stringify:function(obj){
try{
return window.JSON.stringify(obj);
}
catch(e){
return null;
}
}};
}
OpenAjax.gadgets.log=function(_150){
OpenAjax.gadgets.log.logAtLevel(OpenAjax.gadgets.log.INFO,_150);
};
OpenAjax.gadgets.warn=function(_151){
OpenAjax.gadgets.log.logAtLevel(OpenAjax.gadgets.log.WARNING,_151);
};
OpenAjax.gadgets.error=function(_152){
OpenAjax.gadgets.log.logAtLevel(OpenAjax.gadgets.log.ERROR,_152);
};
OpenAjax.gadgets.setLogLevel=function(_153){
OpenAjax.gadgets.log.logLevelThreshold_=_153;
};
OpenAjax.gadgets.log.logAtLevel=function(_154,_155){
if(_154<OpenAjax.gadgets.log.logLevelThreshold_||!OpenAjax.gadgets.log._console){
return;
}
var _157=OpenAjax.gadgets.log._console;
if(_154==OpenAjax.gadgets.log.WARNING&&_157.warn){
_157.warn(_155);
}else{
if(_154==OpenAjax.gadgets.log.ERROR&&_157.error){
_157.error(_155);
}else{
if(_157.log){
_157.log(_155);
}
}
}
};
OpenAjax.gadgets.log.INFO=1;
OpenAjax.gadgets.log.WARNING=2;
OpenAjax.gadgets.log.ERROR=3;
OpenAjax.gadgets.log.NONE=4;
OpenAjax.gadgets.log.logLevelThreshold_=OpenAjax.gadgets.log.INFO;
OpenAjax.gadgets.log._console=window.console?window.console:window.opera?window.opera.postError:undefined;
(function(){
if(!window.__isgadget){
var _158=false;
function _159(){
if(!_158){
_158=true;
OpenAjax.gadgets.util.runOnLoadHandlers();
OpenAjax.gadgets.util.registerOnLoadHandler=function(_15a){
setTimeout(_15a,0);
};
if(window.detachEvent){
window.detachEvent("onload",_159);
}
}
};
if(window.addEventListener){
document.addEventListener("DOMContentLoaded",_159,false);
window.addEventListener("load",_159,false);
}else{
if(window.attachEvent){
window.attachEvent("onload",_159);
}
}
}
})();
OpenAjax.gadgets.rpctx=OpenAjax.gadgets.rpctx||{};
if(!OpenAjax.gadgets.rpctx.frameElement){
OpenAjax.gadgets.rpctx.frameElement=function(){
var _15b="__g2c_rpc";
var _15c="__c2g_rpc";
var _15d;
var _15e;
function _15f(_160,from,rpc){
try{
if(from!==".."){
var fe=window.frameElement;
if(typeof fe[_15b]==="function"){
if(typeof fe[_15b][_15c]!=="function"){
fe[_15b][_15c]=function(args){
_15d(OpenAjax.gadgets.json.parse(args));
};
}
fe[_15b](OpenAjax.gadgets.json.stringify(rpc));
return;
}
}else{
var _161=document.getElementById(_160);
if(typeof _161[_15b]==="function"&&typeof _161[_15b][_15c]==="function"){
_161[_15b][_15c](OpenAjax.gadgets.json.stringify(rpc));
return;
}
}
}
catch(e){
}
return true;
};
return {getCode:function(){
return "fe";
},isParentVerifiable:function(){
return false;
},init:function(_162,_163){
_15d=_162;
_15e=_163;
return true;
},setup:function(_164,_165){
if(_164!==".."){
try{
var _166=document.getElementById(_164);
_166[_15b]=function(args){
_15d(OpenAjax.gadgets.json.parse(args));
};
}
catch(e){
return false;
}
}
if(_164===".."){
_15e("..",true);
var _167=function(){
window.setTimeout(function(){
OpenAjax.gadgets.rpc.call(_164,OpenAjax.gadgets.rpc.ACK);
},500);
};
OpenAjax.gadgets.util.registerOnLoadHandler(_167);
}
return true;
},call:function(_168,from,rpc){
_15f(_168,from,rpc);
}};
}();
}
OpenAjax.gadgets.rpctx=OpenAjax.gadgets.rpctx||{};
if(!OpenAjax.gadgets.rpctx.ifpc){
OpenAjax.gadgets.rpctx.ifpc=function(){
var _169=[];
var _16a=0;
var _16b;
function _16c(args){
var _16d=[];
for(var i=0,j=args.length;i<j;++i){
_16d.push(encodeURIComponent(OpenAjax.gadgets.json.stringify(args[i])));
}
return _16d.join("&");
};
function _16e(src){
var _16f;
for(var i=_169.length-1;i>=0;--i){
var ifr=_169[i];
try{
if(ifr&&(ifr.recyclable||ifr.readyState==="complete")){
ifr.parentNode.removeChild(ifr);
if(window.ActiveXObject){
_169[i]=ifr=null;
_169.splice(i,1);
}else{
ifr.recyclable=false;
_16f=ifr;
break;
}
}
}
catch(e){
}
}
if(!_16f){
_16f=document.createElement("iframe");
_16f.style.border=_16f.style.width=_16f.style.height="0px";
_16f.style.visibility="hidden";
_16f.style.position="absolute";
_16f.onload=function(){
this.recyclable=true;
};
_169.push(_16f);
}
_16f.src=src;
window.setTimeout(function(){
document.body.appendChild(_16f);
},0);
};
return {getCode:function(){
return "ifpc";
},isParentVerifiable:function(){
return true;
},init:function(_170,_171){
_16b=_171;
_16b("..",true);
return true;
},setup:function(_172,_173){
_16b(_172,true);
return true;
},call:function(_174,from,rpc){
var _175=OpenAjax.gadgets.rpc.getRelayUrl(_174);
++_16a;
if(!_175){
OpenAjax.gadgets.warn("No relay file assigned for IFPC");
return;
}
var src=null;
if(rpc.l){
var _176=rpc.a;
src=[_175,"#",_16c([from,_16a,1,0,_16c([from,rpc.s,"","",from].concat(_176))])].join("");
}else{
src=[_175,"#",_174,"&",from,"@",_16a,"&1&0&",encodeURIComponent(OpenAjax.gadgets.json.stringify(rpc))].join("");
}
_16e(src);
return true;
}};
}();
}
OpenAjax.gadgets.rpctx=OpenAjax.gadgets.rpctx||{};
if(!OpenAjax.gadgets.rpctx.nix){
OpenAjax.gadgets.rpctx.nix=function(){
var _177="GRPC____NIXVBS_wrapper";
var _178="GRPC____NIXVBS_get_wrapper";
var _179="GRPC____NIXVBS_handle_message";
var _17a="GRPC____NIXVBS_create_channel";
var _17b=10;
var _17c=500;
var _17d={};
var _17e={};
var _17f;
var _180=0;
function _181(){
var _182=_17d[".."];
if(_182){
return;
}
if(++_180>_17b){
OpenAjax.gadgets.warn("Nix transport setup failed, falling back...");
_17f("..",false);
return;
}
if(!_182&&window.opener&&"GetAuthToken" in window.opener){
_182=window.opener;
if(_182.GetAuthToken()==OpenAjax.gadgets.rpc.getAuthToken("..")){
var _183=OpenAjax.gadgets.rpc.getAuthToken("..");
_182.CreateChannel(window[_178]("..",_183),_183);
_17d[".."]=_182;
window.opener=null;
_17f("..",true);
return;
}
}
window.setTimeout(function(){
_181();
},_17c);
};
function _184(){
var loc=window.location.href;
var idx=loc.indexOf("#");
if(idx==-1){
return loc;
}
return loc.substring(0,idx);
};
function _185(_186){
var _187=(2147483647*Math.random())|0;
var data=[_184(),_187];
OpenAjax.gadgets.rpc._createRelayIframe(_186,data);
var hash=window.location.href.split("#")[1]||"";
function _188(){
var _189=window.location.href.split("#")[1]||"";
if(_189!==hash){
clearInterval(_18a);
var _18b=OpenAjax.gadgets.util.getUrlParameters(window.location.href);
if(_18b.childtoken==_187){
_181();
return;
}
_17f("..",false);
}
};
var _18a=setInterval(_188,100);
};
return {getCode:function(){
return "nix";
},isParentVerifiable:function(_18c){
if(_18c){
return _17e[_18c];
}
return false;
},init:function(_18d,_18e){
_17f=_18e;
if(typeof window[_178]!=="unknown"){
window[_179]=function(data){
window.setTimeout(function(){
_18d(OpenAjax.gadgets.json.parse(data));
},0);
};
window[_17a]=function(name,_18f,_190){
if(OpenAjax.gadgets.rpc.getAuthToken(name)===_190){
_17d[name]=_18f;
_17f(name,true);
}
};
var _191="Class "+_177+"\n "+"Private m_Intended\n"+"Private m_Auth\n"+"Public Sub SetIntendedName(name)\n "+"If isEmpty(m_Intended) Then\n"+"m_Intended = name\n"+"End If\n"+"End Sub\n"+"Public Sub SetAuth(auth)\n "+"If isEmpty(m_Auth) Then\n"+"m_Auth = auth\n"+"End If\n"+"End Sub\n"+"Public Sub SendMessage(data)\n "+_179+"(data)\n"+"End Sub\n"+"Public Function GetAuthToken()\n "+"GetAuthToken = m_Auth\n"+"End Function\n"+"Public Sub CreateChannel(channel, auth)\n "+"Call "+_17a+"(m_Intended, channel, auth)\n"+"End Sub\n"+"End Class\n"+"Function "+_178+"(name, auth)\n"+"Dim wrap\n"+"Set wrap = New "+_177+"\n"+"wrap.SetIntendedName name\n"+"wrap.SetAuth auth\n"+"Set "+_178+" = wrap\n"+"End Function";
try{
window.execScript(_191,"vbscript");
}
catch(e){
return false;
}
}
return true;
},setup:function(_192,_193,_194){
_17e[_192]=!!_194;
if(_192===".."){
if(_194){
_185(_193);
}else{
_181();
}
return true;
}
try{
var _195=document.getElementById(_192);
var _196=window[_178](_192,_193);
_195.contentWindow.opener=_196;
}
catch(e){
return false;
}
return true;
},call:function(_197,from,rpc){
try{
if(_17d[_197]){
_17d[_197].SendMessage(OpenAjax.gadgets.json.stringify(rpc));
}
}
catch(e){
return false;
}
return true;
},relayOnload:function(_198,data){
var src=data[0]+"#childtoken="+data[1];
var _199=document.getElementById(_198);
_199.src=src;
}};
}();
}
OpenAjax.gadgets.rpctx=OpenAjax.gadgets.rpctx||{};
if(!OpenAjax.gadgets.rpctx.rmr){
OpenAjax.gadgets.rpctx.rmr=function(){
var _19a=500;
var _19b=10;
var _19c={};
var _19d;
var _19e;
function _19f(_1a0,_1a1,data,_1a2){
var _1a3=function(){
document.body.appendChild(_1a0);
_1a0.src="about:blank";
if(_1a2){
_1a0.onload=function(){
_1b8(_1a2);
};
}
_1a0.src=_1a1+"#"+data;
};
if(document.body){
_1a3();
}else{
OpenAjax.gadgets.util.registerOnLoadHandler(function(){
_1a3();
});
}
};
function _1a4(_1a5){
if(typeof _19c[_1a5]==="object"){
return;
}
var _1a6=document.createElement("iframe");
var _1a7=_1a6.style;
_1a7.position="absolute";
_1a7.top="0px";
_1a7.border="0";
_1a7.opacity="0";
_1a7.width="10px";
_1a7.height="1px";
_1a6.id="rmrtransport-"+_1a5;
_1a6.name=_1a6.id;
var _1a8=OpenAjax.gadgets.rpc.getRelayUrl(_1a5);
if(!_1a8){
_1a8=OpenAjax.gadgets.rpc.getOrigin(OpenAjax.gadgets.util.getUrlParameters()["parent"])+"/robots.txt";
}
_19c[_1a5]={frame:_1a6,receiveWindow:null,relayUri:_1a8,searchCounter:0,width:10,waiting:true,queue:[],sendId:0,recvId:0};
if(_1a5!==".."){
_19f(_1a6,_1a8,_1a9(_1a5));
}
_1aa(_1a5);
};
function _1aa(_1ab){
var _1ac=null;
_19c[_1ab].searchCounter++;
try{
var _1ad=OpenAjax.gadgets.rpc._getTargetWin(_1ab);
if(_1ab===".."){
_1ac=_1ad.frames["rmrtransport-"+OpenAjax.gadgets.rpc.RPC_ID];
}else{
_1ac=_1ad.frames["rmrtransport-.."];
}
}
catch(e){
}
var _1ae=false;
if(_1ac){
_1ae=_1af(_1ab,_1ac);
}
if(!_1ae){
if(_19c[_1ab].searchCounter>_19b){
return;
}
window.setTimeout(function(){
_1aa(_1ab);
},_19a);
}
};
function _1b0(_1b1,_1b2,from,rpc){
var _1b3=null;
if(from!==".."){
_1b3=_19c[".."];
}else{
_1b3=_19c[_1b1];
}
if(_1b3){
if(_1b2!==OpenAjax.gadgets.rpc.ACK){
_1b3.queue.push(rpc);
}
if(_1b3.waiting||(_1b3.queue.length===0&&!(_1b2===OpenAjax.gadgets.rpc.ACK&&rpc&&rpc.ackAlone===true))){
return true;
}
if(_1b3.queue.length>0){
_1b3.waiting=true;
}
var url=_1b3.relayUri+"#"+_1a9(_1b1);
try{
_1b3.frame.contentWindow.location=url;
var _1b4=_1b3.width==10?20:10;
_1b3.frame.style.width=_1b4+"px";
_1b3.width=_1b4;
}
catch(e){
return false;
}
}
return true;
};
function _1a9(_1b5){
var _1b6=_19c[_1b5];
var _1b7={id:_1b6.sendId};
if(_1b6){
_1b7.d=Array.prototype.slice.call(_1b6.queue,0);
_1b7.d.push({s:OpenAjax.gadgets.rpc.ACK,id:_1b6.recvId});
}
return OpenAjax.gadgets.json.stringify(_1b7);
};
function _1b8(_1b9){
var _1ba=_19c[_1b9];
var data=_1ba.receiveWindow.location.hash.substring(1);
var _1bb=OpenAjax.gadgets.json.parse(decodeURIComponent(data))||{};
var _1bc=_1bb.d||[];
var _1bd=false;
var _1be=false;
var _1bf=0;
var _1c0=(_1ba.recvId-_1bb.id);
for(var i=0;i<_1bc.length;++i){
var rpc=_1bc[i];
if(rpc.s===OpenAjax.gadgets.rpc.ACK){
_19e(_1b9,true);
if(_1ba.waiting){
_1be=true;
}
_1ba.waiting=false;
var _1c1=Math.max(0,rpc.id-_1ba.sendId);
_1ba.queue.splice(0,_1c1);
_1ba.sendId=Math.max(_1ba.sendId,rpc.id||0);
continue;
}
_1bd=true;
if(++_1bf<=_1c0){
continue;
}
++_1ba.recvId;
_19d(rpc);
}
if(_1bd||(_1be&&_1ba.queue.length>0)){
var from=(_1b9==="..")?OpenAjax.gadgets.rpc.RPC_ID:"..";
_1b0(_1b9,OpenAjax.gadgets.rpc.ACK,from,{ackAlone:_1bd});
}
};
function _1af(_1c2,_1c3){
var _1c4=_19c[_1c2];
try{
var _1c5=false;
_1c5="document" in _1c3;
if(!_1c5){
return false;
}
_1c5=typeof _1c3["document"]=="object";
if(!_1c5){
return false;
}
var loc=_1c3.location.href;
if(loc==="about:blank"){
return false;
}
}
catch(ex){
return false;
}
_1c4.receiveWindow=_1c3;
function _1c6(){
_1b8(_1c2);
};
if(typeof _1c3.attachEvent==="undefined"){
_1c3.onresize=_1c6;
}else{
_1c3.attachEvent("onresize",_1c6);
}
if(_1c2===".."){
_19f(_1c4.frame,_1c4.relayUri,_1a9(_1c2),_1c2);
}else{
_1b8(_1c2);
}
return true;
};
return {getCode:function(){
return "rmr";
},isParentVerifiable:function(){
return true;
},init:function(_1c7,_1c8){
_19d=_1c7;
_19e=_1c8;
return true;
},setup:function(_1c9,_1ca){
try{
_1a4(_1c9);
}
catch(e){
OpenAjax.gadgets.warn("Caught exception setting up RMR: "+e);
return false;
}
return true;
},call:function(_1cb,from,rpc){
return _1b0(_1cb,rpc.s,from,rpc);
}};
}();
}
OpenAjax.gadgets.rpctx=OpenAjax.gadgets.rpctx||{};
if(!OpenAjax.gadgets.rpctx.wpm){
OpenAjax.gadgets.rpctx.wpm=function(){
var _1cc,_1cd;
var _1ce;
var _1cf=false;
var _1d0=false;
function _1d1(){
var hit=false;
function _1d2(_1d3){
if(_1d3.data=="postmessage.test"){
hit=true;
if(typeof _1d3.origin==="undefined"){
_1d0=true;
}
}
};
OpenAjax.gadgets.util.attachBrowserEvent(window,"message",_1d2,false);
window.postMessage("postmessage.test","*");
if(hit){
_1cf=true;
}
OpenAjax.gadgets.util.removeBrowserEvent(window,"message",_1d2,false);
};
function _1d4(_1d5){
var rpc=OpenAjax.gadgets.json.parse(_1d5.data);
if(!rpc||!rpc.f){
return;
}
var _1d6=OpenAjax.gadgets.rpc.getRelayUrl(rpc.f)||OpenAjax.gadgets.util.getUrlParameters()["parent"];
var _1d7=OpenAjax.gadgets.rpc.getOrigin(_1d6);
if(!_1d0?_1d5.origin!==_1d7:_1d5.domain!==/^.+:\/\/([^:]+).*/.exec(_1d7)[1]){
return;
}
_1cc(rpc);
};
return {getCode:function(){
return "wpm";
},isParentVerifiable:function(){
return true;
},init:function(_1d8,_1d9){
_1cc=_1d8;
_1cd=_1d9;
_1d1();
if(!_1cf){
_1ce=function(win,msg,_1da){
win.postMessage(msg,_1da);
};
}else{
_1ce=function(win,msg,_1db){
window.setTimeout(function(){
win.postMessage(msg,_1db);
},0);
};
}
OpenAjax.gadgets.util.attachBrowserEvent(window,"message",_1d4,false);
_1cd("..",true);
return true;
},setup:function(_1dc,_1dd,_1de){
if(_1dc===".."){
if(_1de){
OpenAjax.gadgets.rpc._createRelayIframe(_1dd);
}else{
OpenAjax.gadgets.rpc.call(_1dc,OpenAjax.gadgets.rpc.ACK);
}
}
return true;
},call:function(_1df,from,rpc){
var _1e0=OpenAjax.gadgets.rpc._getTargetWin(_1df);
var _1e1=OpenAjax.gadgets.rpc.getRelayUrl(_1df)||OpenAjax.gadgets.util.getUrlParameters()["parent"];
var _1e2=OpenAjax.gadgets.rpc.getOrigin(_1e1);
if(_1e2){
_1ce(_1e0,OpenAjax.gadgets.json.stringify(rpc),_1e2);
}else{
OpenAjax.gadgets.error("No relay set (used as window.postMessage targetOrigin)"+", cannot send cross-domain message");
}
return true;
},relayOnload:function(_1e3,data){
_1cd(_1e3,true);
}};
}();
}
if(!OpenAjax.gadgets.rpc){
OpenAjax.gadgets.rpc=function(){
var _1e4="__cb";
var _1e5="";
var ACK="__ack";
var _1e6=500;
var _1e7=10;
var _1e8={};
var _1e9={};
var _1ea={};
var _1eb={};
var _1ec=0;
var _1ed={};
var _1ee={};
var _1ef={};
var _1f0={};
var _1f1={};
var _1f2={};
var _1f3=(window.top!==window.self);
var _1f4=window.name;
var _1f5=function(){
};
var _1f6=0;
var _1f7=1;
var _1f8=2;
var _1f9=(function(){
function _1fa(name){
return function(){
OpenAjax.gadgets.log("gadgets.rpc."+name+"("+OpenAjax.gadgets.json.stringify(Array.prototype.slice.call(arguments))+"): call ignored. [caller: "+document.location+", isChild: "+_1f3+"]");
};
};
return {getCode:function(){
return "noop";
},isParentVerifiable:function(){
return true;
},init:_1fa("init"),setup:_1fa("setup"),call:_1fa("call")};
})();
if(OpenAjax.gadgets.util){
_1f0=OpenAjax.gadgets.util.getUrlParameters();
}
function _1fb(){
return typeof window.postMessage==="function"?OpenAjax.gadgets.rpctx.wpm:typeof window.postMessage==="object"?OpenAjax.gadgets.rpctx.wpm:window.ActiveXObject?OpenAjax.gadgets.rpctx.nix:navigator.userAgent.indexOf("WebKit")>0?OpenAjax.gadgets.rpctx.rmr:navigator.product==="Gecko"?OpenAjax.gadgets.rpctx.frameElement:OpenAjax.gadgets.rpctx.ifpc;
};
function _1fc(_1fd,_1fe){
var tx=_1ff;
if(!_1fe){
tx=_1f9;
}
_1f1[_1fd]=tx;
var _200=_1f2[_1fd]||[];
for(var i=0;i<_200.length;++i){
var rpc=_200[i];
rpc.t=_201(_1fd);
tx.call(_1fd,rpc.f,rpc);
}
_1f2[_1fd]=[];
};
var _202=false,_203=false;
function _204(){
if(_203){
return;
}
function _205(){
_202=true;
};
OpenAjax.gadgets.util.attachBrowserEvent(window,"unload",_205,false);
_203=true;
};
function _206(_207,_208,_209,data,_20a){
if(!_1eb[_208]||_1eb[_208]!==_209){
OpenAjax.gadgets.error("Invalid auth token. "+_1eb[_208]+" vs "+_209);
_1f5(_208,_1f8);
}
_20a.onunload=function(){
if(_1ee[_208]&&!_202){
_1f5(_208,_1f7);
OpenAjax.gadgets.rpc.removeReceiver(_208);
}
};
_204();
data=OpenAjax.gadgets.json.parse(decodeURIComponent(data));
_1ff.relayOnload(_208,data);
};
function _20b(rpc){
if(rpc&&typeof rpc.s==="string"&&typeof rpc.f==="string"&&rpc.a instanceof Array){
if(_1eb[rpc.f]){
if(_1eb[rpc.f]!==rpc.t){
OpenAjax.gadgets.error("Invalid auth token. "+_1eb[rpc.f]+" vs "+rpc.t);
_1f5(rpc.f,_1f8);
}
}
if(rpc.s===ACK){
window.setTimeout(function(){
_1fc(rpc.f,true);
},0);
return;
}
if(rpc.c){
rpc.callback=function(_20c){
OpenAjax.gadgets.rpc.call(rpc.f,_1e4,null,rpc.c,_20c);
};
}
var _20d=(_1e8[rpc.s]||_1e8[_1e5]).apply(rpc,rpc.a);
if(rpc.c&&typeof _20d!=="undefined"){
OpenAjax.gadgets.rpc.call(rpc.f,_1e4,null,rpc.c,_20d);
}
}
};
function _20e(url){
if(!url){
return "";
}
url=url.toLowerCase();
if(url.indexOf("//")==0){
url=window.location.protocol+url;
}
if(url.indexOf("://")==-1){
url=window.location.protocol+"//"+url;
}
var host=url.substring(url.indexOf("://")+3);
var _20f=host.indexOf("/");
if(_20f!=-1){
host=host.substring(0,_20f);
}
var _210=url.substring(0,url.indexOf("://"));
var _211="";
var _212=host.indexOf(":");
if(_212!=-1){
var port=host.substring(_212+1);
host=host.substring(0,_212);
if((_210==="http"&&port!=="80")||(_210==="https"&&port!=="443")){
_211=":"+port;
}
}
return _210+"://"+host+_211;
};
function _213(id){
if(typeof id==="undefined"||id===".."){
return window.parent;
}
id=String(id);
var _214=window.frames[id];
if(_214){
return _214;
}
_214=document.getElementById(id);
if(_214&&_214.contentWindow){
return _214.contentWindow;
}
return null;
};
var _1ff=_1fb();
_1e8[_1e5]=function(){
OpenAjax.gadgets.warn("Unknown RPC service: "+this.s);
};
_1e8[_1e4]=function(_215,_216){
var _217=_1ed[_215];
if(_217){
delete _1ed[_215];
_217(_216);
}
};
function _218(_219,_21a,_21b){
if(_1ee[_219]===true){
return;
}
if(typeof _1ee[_219]==="undefined"){
_1ee[_219]=0;
}
var _21c=document.getElementById(_219);
if(_219===".."||_21c!=null){
if(_1ff.setup(_219,_21a,_21b)===true){
_1ee[_219]=true;
return;
}
}
if(_1ee[_219]!==true&&_1ee[_219]++<_1e7){
window.setTimeout(function(){
_218(_219,_21a,_21b);
},_1e6);
}else{
_1f1[_219]=_1f9;
_1ee[_219]=true;
}
};
function _21d(_21e,rpc){
if(typeof _1ef[_21e]==="undefined"){
_1ef[_21e]=false;
var _21f=OpenAjax.gadgets.rpc.getRelayUrl(_21e);
if(_20e(_21f)!==_20e(window.location.href)){
return false;
}
var _220=_213(_21e);
try{
_1ef[_21e]=_220.OpenAjax.gadgets.rpc.receiveSameDomain;
}
catch(e){
OpenAjax.gadgets.error("Same domain call failed: parent= incorrectly set.");
}
}
if(typeof _1ef[_21e]==="function"){
_1ef[_21e](rpc);
return true;
}
return false;
};
function _221(_222,url,_223){
if(!/http(s)?:\/\/.+/.test(url)){
if(url.indexOf("//")==0){
url=window.location.protocol+url;
}else{
if(url.charAt(0)=="/"){
url=window.location.protocol+"//"+window.location.host+url;
}else{
if(url.indexOf("://")==-1){
url=window.location.protocol+"//"+url;
}
}
}
}
_1e9[_222]=url;
_1ea[_222]=!!_223;
};
function _201(_224){
return _1eb[_224];
};
function _225(_226,_227,_228){
_227=_227||"";
_1eb[_226]=String(_227);
_218(_226,_227,_228);
};
function _229(_22a,_22b){
function init(_22c){
var _22d=_22c?_22c.rpc:{};
var _22e=_22d.parentRelayUrl;
if(_22e.substring(0,7)!=="http://"&&_22e.substring(0,8)!=="https://"&&_22e.substring(0,2)!=="//"){
if(typeof _1f0.parent==="string"&&_1f0.parent!==""){
if(_22e.substring(0,1)!=="/"){
var _22f=_1f0.parent.lastIndexOf("/");
_22e=_1f0.parent.substring(0,_22f+1)+_22e;
}else{
_22e=_20e(_1f0.parent)+_22e;
}
}
}
var _230=!!_22d.useLegacyProtocol;
_221("..",_22e,_230);
if(_230){
_1ff=OpenAjax.gadgets.rpctx.ifpc;
_1ff.init(_20b,_1fc);
}
var _231=_22b||_1f0.forcesecure||false;
_225("..",_22a,_231);
};
var _232={parentRelayUrl:OpenAjax.gadgets.config.NonEmptyStringValidator};
OpenAjax.gadgets.config.register("rpc",_232,init);
};
function _233(_234,_235,_236){
var _237=_236||_1f0.forcesecure||false;
var _238=_235||_1f0.parent;
if(_238){
_221("..",_238);
_225("..",_234,_237);
}
};
function _239(_23a,_23b,_23c,_23d){
if(!OpenAjax.gadgets.util){
return;
}
var _23e=document.getElementById(_23a);
if(!_23e){
throw new Error("Cannot set up gadgets.rpc receiver with ID: "+_23a+", element not found.");
}
var _23f=_23b||_23e.src;
_221(_23a,_23f);
var _240=OpenAjax.gadgets.util.getUrlParameters(_23e.src);
var _241=_23c||_240.rpctoken;
var _242=_23d||_240.forcesecure;
_225(_23a,_241,_242);
};
function _243(_244,_245,_246,_247){
if(_244===".."){
var _248=_246||_1f0.rpctoken||_1f0.ifpctok||"";
if(window["__isgadget"]===true){
_229(_248,_247);
}else{
_233(_248,_245,_247);
}
}else{
_239(_244,_245,_246,_247);
}
};
return {config:function(_249){
if(typeof _249.securityCallback==="function"){
_1f5=_249.securityCallback;
}
},register:function(_24a,_24b){
if(_24a===_1e4||_24a===ACK){
throw new Error("Cannot overwrite callback/ack service");
}
if(_24a===_1e5){
throw new Error("Cannot overwrite default service:"+" use registerDefault");
}
_1e8[_24a]=_24b;
},unregister:function(_24c){
if(_24c===_1e4||_24c===ACK){
throw new Error("Cannot delete callback/ack service");
}
if(_24c===_1e5){
throw new Error("Cannot delete default service:"+" use unregisterDefault");
}
delete _1e8[_24c];
},registerDefault:function(_24d){
_1e8[_1e5]=_24d;
},unregisterDefault:function(){
delete _1e8[_1e5];
},forceParentVerifiable:function(){
if(!_1ff.isParentVerifiable()){
_1ff=OpenAjax.gadgets.rpctx.ifpc;
}
},call:function(_24e,_24f,_250,_251){
_24e=_24e||"..";
var from="..";
if(_24e===".."){
from=_1f4;
}
++_1ec;
if(_250){
_1ed[_1ec]=_250;
}
var rpc={s:_24f,f:from,c:_250?_1ec:0,a:Array.prototype.slice.call(arguments,3),t:_1eb[_24e],l:_1ea[_24e]};
if(_24e!==".."&&!document.getElementById(_24e)){
OpenAjax.gadgets.log("WARNING: attempted send to nonexistent frame: "+_24e);
return;
}
if(_21d(_24e,rpc)){
return;
}
var _252=_1f1[_24e];
if(!_252){
if(!_1f2[_24e]){
_1f2[_24e]=[rpc];
}else{
_1f2[_24e].push(rpc);
}
return;
}
if(_1ea[_24e]){
_252=OpenAjax.gadgets.rpctx.ifpc;
}
if(_252.call(_24e,from,rpc)===false){
_1f1[_24e]=_1f9;
_1ff.call(_24e,from,rpc);
}
},getRelayUrl:function(_253){
var url=_1e9[_253];
if(url&&url.substring(0,1)==="/"){
if(url.substring(1,2)==="/"){
url=document.location.protocol+url;
}else{
url=document.location.protocol+"//"+document.location.host+url;
}
}
return url;
},setRelayUrl:_221,setAuthToken:_225,setupReceiver:_243,getAuthToken:_201,removeReceiver:function(_254){
delete _1e9[_254];
delete _1ea[_254];
delete _1eb[_254];
delete _1ee[_254];
delete _1ef[_254];
delete _1f1[_254];
},getRelayChannel:function(){
return _1ff.getCode();
},receive:function(_255,_256){
if(_255.length>4){
_20b(OpenAjax.gadgets.json.parse(decodeURIComponent(_255[_255.length-1])));
}else{
_206.apply(null,_255.concat(_256));
}
},receiveSameDomain:function(rpc){
rpc.a=Array.prototype.slice.call(rpc.a);
window.setTimeout(function(){
_20b(rpc);
},0);
},getOrigin:_20e,getReceiverOrigin:function(_257){
var _258=_1f1[_257];
if(!_258){
return null;
}
if(!_258.isParentVerifiable(_257)){
return null;
}
var _259=OpenAjax.gadgets.rpc.getRelayUrl(_257)||OpenAjax.gadgets.util.getUrlParameters().parent;
return OpenAjax.gadgets.rpc.getOrigin(_259);
},init:function(){
if(_1ff.init(_20b,_1fc)===false){
_1ff=_1f9;
}
if(_1f3){
_243("..");
}
},_getTargetWin:_213,_createRelayIframe:function(_25a,data){
var _25b=OpenAjax.gadgets.rpc.getRelayUrl("..");
if(!_25b){
return;
}
var src=_25b+"#..&"+_1f4+"&"+_25a+"&"+encodeURIComponent(OpenAjax.gadgets.json.stringify(data));
var _25c=document.createElement("iframe");
_25c.style.border=_25c.style.width=_25c.style.height="0px";
_25c.style.visibility="hidden";
_25c.style.position="absolute";
function _25d(){
document.body.appendChild(_25c);
_25c.src="javascript:\"<html></html>\"";
_25c.src=src;
};
if(document.body){
_25d();
}else{
OpenAjax.gadgets.util.registerOnLoadHandler(function(){
_25d();
});
}
return _25c;
},ACK:ACK,RPC_ID:_1f4,SEC_ERROR_LOAD_TIMEOUT:_1f6,SEC_ERROR_FRAME_PHISH:_1f7,SEC_ERROR_FORGED_MSG:_1f8};
}();
OpenAjax.gadgets.rpc.init();
}