/*ADOBE SYSTEMS INCORPORATED Copyright 2007 Adobe Systems Incorporated All Rights Reserved. NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms of the Adobe license agreement accompanying it. If you have received this file from a source other than Adobe, then your use, modification, or distribution of it requires the prior written permission of Adobe.*/ var cf_ws={URL_PROTOCOL:"ws",URL_CONTEXTROOT:"/cfusion",URL_DEFAULT_PAGE:"/cfusion",URL_PORT:_cf_websocket_port,CONNECTING:0,OPEN:1,CLOSING:2,CLOSED:3,APP_ERROR_CODE:4001,CHANNEL_ERROR_CODE:-1,validRE:/^("(\\.|[^"\\\n\r])*?"|[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t])+?$/,URL_SERVER:"ws://"+(self.location.hostname?self.location.hostname:"127.0.0.1")+":"+_cf_websocket_port+"/cfusion"+"/cfusion",$:function(_3e1){ return document.getElementById(_3e1); },isWebSocketSupported:function(){ return ((window.WebSocket!==null&&window.WebSocket!==undefined)||(window.MozWebSocket!==null&&window.MozWebSocket!==undefined)); },CFWebSocketWrapper:function(){ this.open=function(_3e2,_3e3){ if(self.WebSocket||self.MozWebSocket){ if(!this.wsConnection){ var _3e4=this; if("MozWebSocket" in window){ this.wsConnection=new MozWebSocket(_3e2,"json"); }else{ this.wsConnection=new WebSocket(_3e2); } this.wsConnection.connectionOptions=_3e3; this.onWelcome=_3e3.OnWelcome; this.wsConnection.onopen=function(_3e5){ if(_3e3.OnWelcome){ _3e3.OnWelcome(_3e4); } }; this.wsConnection.onmessage=function(_3e6){ var _3e7=_3e4.streamToToken(_3e6.data); if(_3e7.code&&_3e3.onError&&(_3e7.code==cf_ws.APP_ERROR_CODE||_3e7.code==cf_ws.CHANNEL_ERROR_CODE)){ _3e3.onError(_3e7,_3e4); }else{ if(_3e3.OnMessage){ if(_3e7.data){ if(cf_ws.validRE.test(_3e7.data)){ _3e7.data=_3e4.streamToToken(_3e7.data); } } _3e3.OnMessage(_3e7,_3e4); } } }; this.wsConnection.onclose=function(_3e8){ if(this.wsConnection&&this.wsConnection.readyState==cf_ws.OPEN){ this.wsConnection.readyState=cf_ws.CLOSED; if(_3e3.OnClose){ _3e3.OnClose(_3e4); } } }; this.wsConnection.onerror=function(_3e9){ this.wsConnection.readyState=cf_ws.CLOSED; if(_3e3.onError){ _3e3.onError(null,_3e4); } }; } }else{ throw new Error("Your browser does not have WebSockets support"); } },this.sendStream=function(_3ea){ if(this.wsConnection&&this.wsConnection.readyState==cf_ws.OPEN){ this.wsConnection.send(_3ea); }else{ throw new Error("Connection not established."); } },this.isConnected=function(){ return (this.wsConnection!=null&&this.wsConnection.readyState==cf_ws.OPEN); },this.forceClose=function(_3eb){ },this.close=function(_3ec){ if(this.wsConnection){ this.wsConnection.OnWelcome=null; this.wsConnection.onMessage=null; if(this.wsConnection.readyState==cf_ws.OPEN){ this.wsConnection.readyState=cf_ws.CLOSING; this.wsConnection.close(); } if(this.wsConnection.connectionOptions.OnClose){ this.wsConnection.connectionOptions.OnClose(this.wsConnection.connectionOptions); } this.wsConnection=null; } },this.getId=function(){ },this.checkCallbacks=function(_3ed){ var _3ee="utid"+_3ed.utid; },this.createDefaultResult=function(){ return {code:0,msg:"Ok",localeKey:"jws.jsc.res.Ok",args:null,tid:jws.CUR_TOKEN_ID}; },this.tokenToStream=function(_3ef){ return ColdFusion.JSON.encode(_3ef); },this.streamToToken=function(data){ if(typeof data=="number"){ return data; } try{ return ColdFusion.JSON.decode(data); } catch(e){ return data; } },this.processResponsePacket=function(_3f1){ var _3f2=ColdFusion.JSON.decode(_3f1.data); if(_3f2.type){ if(_3f2.type=="welcome"&&_3f2.usid){ this.fSessionId=_3f2.usid; this.fClientId=_3f2.sourceId; if(this.fOnWelcome){ this.fOnWelcome(_3f2); } }else{ if(_3f2.type=="goodBye"){ if(this.fOnGoodBye){ this.fOnGoodBye(_3f2); } this.fSessionId=null; this.fUsername=null; }else{ if(_3f2.type=="close"){ this.close({timeout:0}); }else{ if(_3f2.type=="response"){ this.checkCallbacks(_3f2); }else{ if(aToken.type=="event"){ if(aToken.name=="connect"){ this.processConnected(aToken); } if(aToken.name=="disconnect"){ this.processDisconnected(aToken); } } } } } } }else{ this.checkCallbacks(aToken); } },this.sendToken=function(_3f3){ if(this.isConnected()){ var _3f4=ColdFusion.JSON.encode(_3f3); this.wsConnection.send(_3f4); }else{ throw new Error("Connection not established."); } },this.startKeepAlive=function(_3f5){ },this.stopKeepAlive=function(){ }; }}; if(!cf_ws.isWebSocketSupported()){ var swfobject=function(){ var D="undefined",r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="onreadystatechange",O=window,j=document,t=navigator,T=false,U=[h],o=[],N=[],I=[],l,Q,E,B,J=false,a=false,n,G,m=true,M=function(){ var aa=typeof j.getElementById!=D&&typeof j.getElementsByTagName!=D&&typeof j.createElement!=D,ah=t.userAgent.toLowerCase(),Y=t.platform.toLowerCase(),ae=Y?/win/.test(Y):/win/.test(ah),ac=Y?/mac/.test(Y):/mac/.test(ah),af=/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,X=!+"\v1",ag=[0,0,0],ab=null; if(typeof t.plugins!=D&&typeof t.plugins[S]==r){ ab=t.plugins[S].description; if(ab&&!(typeof t.mimeTypes!=D&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin)){ T=true; X=false; ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1"); ag[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10); ag[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10); ag[2]=/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0; } }else{ if(typeof O.ActiveXObject!=D){ try{ var ad=new ActiveXObject(W); if(ad){ ab=ad.GetVariable("$version"); if(ab){ X=true; ab=ab.split(" ")[1].split(","); ag=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]; } } } catch(Z){ } } } return {w3:aa,pv:ag,wk:af,ie:X,win:ae,mac:ac}; }(),k=function(){ if(!M.w3){ return; } if((typeof j.readyState!=D&&j.readyState=="complete")||(typeof j.readyState==D&&(j.getElementsByTagName("body")[0]||j.body))){ f(); } if(!J){ if(typeof j.addEventListener!=D){ j.addEventListener("DOMContentLoaded",f,false); } if(M.ie&&M.win){ j.attachEvent(x,function(){ if(j.readyState=="complete"){ j.detachEvent(x,arguments.callee); f(); } }); if(O==top){ (function(){ if(J){ return; } try{ j.documentElement.doScroll("left"); } catch(X){ setTimeout(arguments.callee,0); return; } f(); })(); } } if(M.wk){ (function(){ if(J){ return; } if(!/loaded|complete/.test(j.readyState)){ setTimeout(arguments.callee,0); return; } f(); })(); } s(f); } }(); function f(){ if(J){ return; } try{ var Z=j.getElementsByTagName("body")[0].appendChild(C("span")); Z.parentNode.removeChild(Z); } catch(aa){ return; } J=true; var X=U.length; for(var Y=0;Y0){ for(var af=0;af0){ var ae=c(Y); if(ae){ if(F(o[af].swfVersion)&&!(M.wk&&M.wk<312)){ w(Y,true); if(ab){ aa.success=true; aa.ref=z(Y); ab(aa); } }else{ if(o[af].expressInstall&&A()){ var ai={}; ai.data=o[af].expressInstall; ai.width=ae.getAttribute("width")||"0"; ai.height=ae.getAttribute("height")||"0"; if(ae.getAttribute("class")){ ai.styleclass=ae.getAttribute("class"); } if(ae.getAttribute("align")){ ai.align=ae.getAttribute("align"); } var ah={}; var X=ae.getElementsByTagName("param"); var ac=X.length; for(var ad=0;ad"; } } aa.outerHTML=""+af+""; N[N.length]=ai.id; X=c(ai.id); }else{ var Z=C(r); Z.setAttribute("type",q); for(var ac in ai){ if(ai[ac]!=Object.prototype[ac]){ if(ac.toLowerCase()=="styleclass"){ Z.setAttribute("class",ai[ac]); }else{ if(ac.toLowerCase()!="classid"){ Z.setAttribute(ac,ai[ac]); } } } } for(var ab in ag){ if(ag[ab]!=Object.prototype[ab]&&ab.toLowerCase()!="movie"){ e(Z,ab,ag[ab]); } } aa.parentNode.replaceChild(Z,aa); X=Z; } } return X; } function e(Z,X,Y){ var aa=C("param"); aa.setAttribute("name",X); aa.setAttribute("value",Y); Z.appendChild(aa); } function y(Y){ var X=c(Y); if(X&&X.nodeName=="OBJECT"){ if(M.ie&&M.win){ X.style.display="none"; (function(){ if(X.readyState==4){ b(Y); }else{ setTimeout(arguments.callee,10); } })(); }else{ X.parentNode.removeChild(X); } } } function b(Z){ var Y=c(Z); if(Y){ for(var X in Y){ if(typeof Y[X]=="function"){ Y[X]=null; } } Y.parentNode.removeChild(Y); } } function c(Z){ var X=null; try{ X=j.getElementById(Z); } catch(Y){ } return X; } function C(X){ return j.createElement(X); } function i(Z,X,Y){ Z.attachEvent(X,Y); I[I.length]=[Z,X,Y]; } function F(Z){ var Y=M.pv,X=Z.split("."); X[0]=parseInt(X[0],10); X[1]=parseInt(X[1],10)||0; X[2]=parseInt(X[2],10)||0; return (Y[0]>X[0]||(Y[0]==X[0]&&Y[1]>X[1])||(Y[0]==X[0]&&Y[1]==X[1]&&Y[2]>=X[2]))?true:false; } function v(ac,Y,ad,ab){ if(M.ie&&M.mac){ return; } var aa=j.getElementsByTagName("head")[0]; if(!aa){ return; } var X=(ad&&typeof ad=="string")?ad:"screen"; if(ab){ n=null; G=null; } if(!n||G!=X){ var Z=C("style"); Z.setAttribute("type","text/css"); Z.setAttribute("media",X); n=aa.appendChild(Z); if(M.ie&&M.win&&typeof j.styleSheets!=D&&j.styleSheets.length>0){ n=j.styleSheets[j.styleSheets.length-1]; } G=X; } if(M.ie&&M.win){ if(n&&typeof n.addRule==r){ n.addRule(ac,Y); } }else{ if(n&&typeof j.createTextNode!=D){ n.appendChild(j.createTextNode(ac+" {"+Y+"}")); } } } function w(Z,X){ if(!m){ return; } var Y=X?"visible":"hidden"; if(J&&c(Z)){ c(Z).style.visibility=Y; }else{ v("#"+Z,"visibility:"+Y); } } function L(Y){ var Z=/[\\\"<>\.;]/; var X=Z.exec(Y)!=null; return X&&typeof encodeURIComponent!=D?encodeURIComponent(Y):Y; } var d=function(){ if(M.ie&&M.win){ window.attachEvent("onunload",function(){ var ac=I.length; for(var ab=0;ab4){ d+=d.substr(d.length-x.charCodeAt(p+1)*96-x.charCodeAt(p+2)+3104-l,l); }else{ d+="`"; } p+=4; } } return d; })("function FABridge(target,b` )!Name){this.` 2\"=` 9\";` .!remoteTypeCache={}` ,(Instanc` '1F`!0#` .*local` %2`!I\"ID=`!`$.next` %\"ID++` @\"name=`!p&` .#extL` r$ID=0;` [%i`!\\#s[` V%]=this` 8'dMap` 9\"`!<$` <#return ` '!}` G%TYPE_ASINSTANCE=1` a&` 4#FUNCTION=2` ,+J` 1&3` F,NONYMOUS=4`!r(itCallbacks={}` 0&userType` (*addToU` 2%`%3$(){for(var i=0;i0`)\x7f,ol`(?\"if(typeof`!<$[i].SetVariable!=\"`$-%\"){` r)[`! )`!?#]`!N$`),!}`$H!embed`!}=` A!`\"6#el=` O\"`\"*.E` g\"`\"5\"e`\".)j=0;j` w\"`\"2#` '\"`\"/%` ]%`\"/$aol=`\"O0`!g\"e` 5$` Z)` 7!searchStr=\"`%@&=\"+`1Z'if(aol==1&&!ael||` &$ael==1`'/'attach`4A#`$2*0]`4F(;}else if(` ^\"&&!ao`'x(` W/`\"i#` U0`,f\"lash_found=`/F!`!r#>1`$,&k=0;k$n` /0`\"A!vars` >%value.indexOf(`$g%)>=0`#uBk`#D*`#<(true;break;}}if(` 1'){` 0$}if(!` /'`%T!`#j(m=0;m>16`3H$` }*`0M#ID];`!)'`\"Q(` n'`!k#`\"S(`!%!new`\";#` ;#=new`! %` C1`!#%`1h)` X-`+s!`1`$s`2cKs`3'$`3z$`0^*` >%`)X$`0u!` -%[i]`4`\"`!D-);}delete`#A'`!75`#K'blockedMethods={toString:true,get` #\"se` \"#call` %!` Y'prototype={root:`$4%`\">$ this.deser`4Q\"(` ,!targe`1~!Root());},releaseAS`*7#` U4` U#` ?,(` Y'`)7!` 2$` ^&`+k!`2'(` ,!!=\"`3g\"\"` \x7f%`._\"`.w&ret=`!)/` z)` x\".fb_`&9$_id)`'_$ret;}},create`!H&class`'4\"`\"l@` Y\"` K');},makeID` j&token` h$` Y\"`(n$<<16)+` 0){throw new Error(\"You are trying to`(K! recursively into the Flash Player which is not allowed. In most cases` P!JavaScript setTimeout `!r$, can be used as a workaround.\"`3n$`!{-++;retVal`${)`\"{#`\"x\"`\"d-` E)handle`\"_\"` 2\"`+K&` }%--`%E'Val;}},s`#|&In`#i7,`'4&`#(~`#(~`#[K`\"\x7f#In`#v.,` C!`(G&`#\"\"`#WccallASF`\"-#`$3&funcID,args`#1~`#1~`#_Pinvoke`\"s&`\"l$`$ +`\"~!`#Ai`1l\"`(<)ID,func`%J!`#2~`#2~`#oAargs`#K\"`#_+`$28`#7\"`\"\x7f1`#^b`!#\"Local`(8;`3T\"sult;var`\"m!`!6\"l` Q(Cache[` S\"];if` _!!=undefined){` ^\"`\"Z,func.apply(null`&q\"`3M(`&s\");}`!z%`!F!`2s!TypeFromNam`4C'objType`4>.remoteType`!h\"` >'];},`4Q\"Proxy`'&,t` g%var ` Q#`\"%\"`!8+(` B%;instanceFactory.prototype=` Z#`#K!` >$=new` $%` L#`!8\");`!s'I` ;#`!y%ID]=` O$`$\x7f$` '%`#!!`!~0`\"e0` g0;},addTypeDataTo` 7!` b&t` 2#`\"r\"new`\"s!new AS`!2!(this`#:!Data.n`\"t!var accessors=` 4%` *%;for(`\"w!=0;i<` /%.length;i++){`!t!add`4.$ToType(`!=#,` L%[i]);}var m`(o!`!&'` *#`! +` /#`! )`,;(blocked`)\\\"s[` H#[i]]=`'c(`!X$` B\"`!O+` K&);}}`&h1` D#.`&($]=` +#`$}$` '$`$=!`\"X*`$5(`3x%`$>\"c=` ($.charAt(0`$+\"setterNam`&q\"g` %&if(c>=\"a\"&&c<=\"z\"){` 4&=\"get\"+c.toUpperCase()+` |%substr(1);` w&=\"s` -C`.0\"` }-` B$` b.` 1%}ty[` 4&]=`\"i%val`$6#b`$j\"s`(=!`#9!InAS`'-!.fb_`(]$_id`#;%,val);};ty[`!K&` r'`(i*` z#`,b(` ,(`)U\"`!4!From` |;));}`%&\"`&&(`$})`&0\"`%&\"ty`&s#`!&X`4](`!H1` y&,`(7%argsToArray(argument`/<\"`,)\"`0J$`,(+`0U\"`&\x7f\"`!9\"`.;!;if`!4\"`(:\"`0z1==nul`$n$` ,8`\"['`\"5)` F$`2Q$`!l<;}`1F%` t<`\"F*ID`\"C*`+U!`2^!__`!L\"_id__`+<)` ,/`!0!makeID`\"w\"next`4c%ID++`0M#`4,3` a*`\"r\"`\")%` /.;},`%W%`!v&valu`+N#`4.\"={}`+6!t`.=!of ` =!`$\\!==\"number\"||t==\"string` &#boolean` (\"null` $!`\"W'` x#` i\"`*n! if`!:\"`2B%of `$B!` E%[]`/I+` K!`/I)` D\"[i]`#K\"`'z&` F!`.v#`!'$t==\"`\"T$\"` T$`.y!=`%f%TYPE_JSFUNCTION;` >#` j!` ~\"`%?)`#<#`!w8`3@\"` s8ASINSTANCE`!!*`\"I\"`)b*`.)#` R7NONYMOUS` Y/`%X%` 5\";},`+,'`%M&packedV`%M,`%L*` :'`%4H` L'`%b$` &)`%b.`#p!handleError`!R)`#o&` +'`%gG` K'`%|8`.2(` H'`&-/object\"){` n6newTypes`!$)`!\"!addTypeDataTo`*G!`!\"(` P%`!1\"` y$aRefID in`$'(.newRefs` r#create`&d!(` J\",` :/[` 5\"]);}`#C*`&B\"`&:+PRIMITIVE`#U%` F(`*;+` M`) $` t-` :_`)0$`\"S8`)/-addRef`)1&obj`$L#target.incRef(obj`*Z+);},releas`)o'` N-` ;#` I6`(n'`0'-if(`/{(`*+&&&`,5\"indexOf(\"__FLASHERROR\")==0`+2\"my` t!Messag`,h$split(\"||\");if(`#=%refCount>0){` $---;}throw new `*b\"` p*[1]);`#X#`&R'{` %*}};`.j#`3-!`\"I!`3!\",typeName`#:#` 0\"=` 7\"`4%\"` :$`->!Name`!($this;` q%.proto`%_!{get`.-'rop` |\"` M'`!\"#`+V)` ,(`&w\"pertyFromAS` 8\"`$\\*,` r%);},s`!!0,`$n#` p(s` r&In` [;` Y#;},call` v&func` ;!arg`+g$` x#callASMethod` g1` N*`'|/` b*` 8\"` e!`'i1` @*` 8#` G$};")); (function(){ if(window.WEB_SOCKET_FORCE_FLASH){ }else{ if(window.WebSocket){ return; }else{ if(window.MozWebSocket){ window.WebSocket=MozWebSocket; return; } } } var _47f; if(window.WEB_SOCKET_LOGGER){ _47f=WEB_SOCKET_LOGGER; }else{ if(window.console&&window.console.log&&window.console.error){ _47f=window.console; }else{ _47f={log:function(){ },error:function(){ }}; } } if(swfobject.getFlashPlayerVersion().major<10){ _47f.error("Flash Player >= 10.0.0 is required."); return; } if(location.protocol=="file:"){ _47f.error("WARNING: web-socket-js doesn't work in file:///... URL "+"unless you set Flash Security Settings properly. "+"Open the page via Web server i.e. http://..."); } window.WebSocket=function(url,_481,_482,_483,_484){ var self=this; self.__id=WebSocket.__nextId++; WebSocket.__instances[self.__id]=self; self.readyState=WebSocket.CONNECTING; self.bufferedAmount=0; self.__events={}; if(!_481){ _481=[]; }else{ if(typeof _481=="string"){ _481=[_481]; } } self.__createTask=setTimeout(function(){ WebSocket.__addTask(function(){ self.__createTask=null; WebSocket.__flash.create(self.__id,url,_481,_482||null,_483||0,_484||null,_cf_flash_policy_port||1243); }); },0); }; WebSocket.prototype.send=function(data){ if(this.readyState==WebSocket.CONNECTING){ throw "INVALID_STATE_ERR: Web Socket connection has not been established"; } var _487=WebSocket.__flash.send(this.__id,encodeURIComponent(data)); if(_487<0){ return true; }else{ this.bufferedAmount+=_487; return false; } }; WebSocket.prototype.close=function(){ if(this.__createTask){ clearTimeout(this.__createTask); this.__createTask=null; this.readyState=WebSocket.CLOSED; return; } if(this.readyState==WebSocket.CLOSED||this.readyState==WebSocket.CLOSING){ return; } this.readyState=WebSocket.CLOSING; WebSocket.__flash.close(this.__id); }; WebSocket.prototype.addEventListener=function(type,_489,_48a){ if(!(type in this.__events)){ this.__events[type]=[]; } this.__events[type].push(_489); }; WebSocket.prototype.removeEventListener=function(type,_48c,_48d){ if(!(type in this.__events)){ return; } var _48e=this.__events[type]; for(var i=_48e.length-1;i>=0;--i){ if(_48e[i]===_48c){ _48e.splice(i,1); break; } } }; WebSocket.prototype.dispatchEvent=function(_490){ var _491=this.__events[_490.type]||[]; for(var i=0;i<_491.length;++i){ _491[i](_490); } var _493=this["on"+_490.type]; if(_493){ _493.apply(this,[_490]); } }; WebSocket.prototype.__handleEvent=function(_494){ if("readyState" in _494){ this.readyState=_494.readyState; } if("protocol" in _494){ this.protocol=_494.protocol; } var _495; if(_494.type=="open"||_494.type=="error"){ _495=this.__createSimpleEvent(_494.type); }else{ if(_494.type=="close"){ _495=this.__createSimpleEvent("close"); _495.wasClean=_494.wasClean?true:false; _495.code=_494.code; _495.reason=_494.reason; }else{ if(_494.type=="message"){ var data=decodeURIComponent(_494.message); _495=this.__createMessageEvent("message",data); }else{ throw "unknown event type: "+_494.type; } } } this.dispatchEvent(_495); }; WebSocket.prototype.__createSimpleEvent=function(type){ if(document.createEvent&&window.Event){ var _498=document.createEvent("Event"); _498.initEvent(type,false,false); return _498; }else{ return {type:type,bubbles:false,cancelable:false}; } }; WebSocket.prototype.__createMessageEvent=function(type,data){ if(document.createEvent&&window.MessageEvent&&!window.opera){ var _49b=document.createEvent("MessageEvent"); _49b.initMessageEvent("message",false,false,data,null,null,window,null); return _49b; }else{ return {type:type,data:data,bubbles:false,cancelable:false}; } }; WebSocket.CONNECTING=0; WebSocket.OPEN=1; WebSocket.CLOSING=2; WebSocket.CLOSED=3; WebSocket.__initialized=false; WebSocket.__flash=null; WebSocket.__instances={}; WebSocket.__tasks=[]; WebSocket.__nextId=0; WebSocket.loadFlashPolicyFile=function(url){ WebSocket.__addTask(function(){ WebSocket.__flash.loadManualPolicyFile(url); }); }; WebSocket.__initialize=function(){ if(WebSocket.__initialized){ return; } WebSocket.__initialized=true; if(WebSocket.__swfLocation){ window.WEB_SOCKET_SWF_LOCATION=WebSocket.__swfLocation; } if(!window.WEB_SOCKET_SWF_LOCATION){ _47f.error("[WebSocket] set WEB_SOCKET_SWF_LOCATION to location of WebSocketMain.swf"); return; } if(!window.WEB_SOCKET_SUPPRESS_CROSS_DOMAIN_SWF_ERROR&&!WEB_SOCKET_SWF_LOCATION.match(/(^|\/)WebSocketMainInsecure\.swf(\?.*)?$/)&&WEB_SOCKET_SWF_LOCATION.match(/^\w+:\/\/([^\/]+)/)){ var _49d=RegExp.$1; if(location.host!=_49d){ _47f.error("[WebSocket] You must host HTML and WebSocketMain.swf in the same host "+"('"+location.host+"' != '"+_49d+"'). "+"See also 'How to host HTML file and SWF file in different domains' section "+"in README.md. If you use WebSocketMainInsecure.swf, you can suppress this message "+"by WEB_SOCKET_SUPPRESS_CROSS_DOMAIN_SWF_ERROR = true;"); } } var _49e=document.createElement("div"); _49e.id="webSocketContainer"; _49e.style.position="absolute"; if(WebSocket.__isFlashLite()){ _49e.style.left="0px"; _49e.style.top="0px"; }else{ _49e.style.left="-100px"; _49e.style.top="-100px"; } var _49f=document.createElement("div"); _49f.id="webSocketFlash"; _49e.appendChild(_49f); document.body.appendChild(_49e); swfobject.embedSWF(WEB_SOCKET_SWF_LOCATION,"webSocketFlash","1","1","10.0.0",null,null,{hasPriority:true,swliveconnect:true,allowScriptAccess:"always"},null,function(e){ if(!e.success){ _47f.error("[WebSocket] swfobject.embedSWF failed"); } }); }; WebSocket.__onFlashInitialized=function(){ setTimeout(function(){ WebSocket.__flash=document.getElementById("webSocketFlash"); WebSocket.__flash.setCallerUrl(location.href); WebSocket.__flash.setDebug(!!window.WEB_SOCKET_DEBUG); for(var i=0;i>2; enc2=((chr1&3)<<4)|(chr2>>4); enc3=((chr2&15)<<2)|(chr3>>6); enc4=chr3&63; if(isNaN(chr2)){ enc3=enc4=64; }else{ if(isNaN(chr3)){ enc4=64; } } _4be=_4be+this._keyStr.charAt(enc1)+this._keyStr.charAt(enc2)+this._keyStr.charAt(enc3)+this._keyStr.charAt(enc4); } return _4be; },decode:function(_4c1){ var _4c2=""; var chr1,chr2,chr3; var enc1,enc2,enc3,enc4; var i=0; _4c1=_4c1.replace(/[^A-Za-z0-9\+\/\=]/g,""); while(i<_4c1.length){ enc1=this._keyStr.indexOf(_4c1.charAt(i++)); enc2=this._keyStr.indexOf(_4c1.charAt(i++)); enc3=this._keyStr.indexOf(_4c1.charAt(i++)); enc4=this._keyStr.indexOf(_4c1.charAt(i++)); chr1=(enc1<<2)|(enc2>>4); chr2=((enc2&15)<<4)|(enc3>>2); chr3=((enc3&3)<<6)|enc4; _4c2=_4c2+String.fromCharCode(chr1); if(enc3!=64){ _4c2=_4c2+String.fromCharCode(chr2); } if(enc4!=64){ _4c2=_4c2+String.fromCharCode(chr3); } } _4c2=Base64._utf8_decode(_4c2); return _4c2; },_utf8_encode:function(_4c6){ _4c6=_4c6.replace(/\r\n/g,"\n"); var _4c7=""; for(var n=0;n<_4c6.length;n++){ var c=_4c6.charCodeAt(n); if(c<128){ _4c7+=String.fromCharCode(c); }else{ if((c>127)&&(c<2048)){ _4c7+=String.fromCharCode((c>>6)|192); _4c7+=String.fromCharCode((c&63)|128); }else{ _4c7+=String.fromCharCode((c>>12)|224); _4c7+=String.fromCharCode(((c>>6)&63)|128); _4c7+=String.fromCharCode((c&63)|128); } } } return _4c7; },_utf8_decode:function(_4ca){ var _4cb=""; var i=0; var c=c1=c2=0; while(i<_4ca.length){ c=_4ca.charCodeAt(i); if(c<128){ _4cb+=String.fromCharCode(c); i++; }else{ if((c>191)&&(c<224)){ c2=_4ca.charCodeAt(i+1); _4cb+=String.fromCharCode(((c&31)<<6)|(c2&63)); i+=2; }else{ c2=_4ca.charCodeAt(i+1); c3=_4ca.charCodeAt(i+2); _4cb+=String.fromCharCode(((c&15)<<12)|((c2&63)<<6)|(c3&63)); i+=3; } } } return _4cb; }};