var kswfobject=function(){function a(){if(!z){try{var c=m.getElementsByTagName("body")[0].appendChild(A("span"));c.parentNode.removeChild(c)}catch(e){return}z=true;c=I.length;for(var f=0;f0)for(var e=0;e0){var n=w(f);if(n)if(S(K[e].swfVersion)&&!(i.wk&&i.wk<312)){F(f,true);if(h){l.success=true;l.ref=u(f);h(l)}}else{B(n);h&&h(l)}}else{F(f,true);if(h){if((f=u(f))&&typeof f.SetVariable!=o){l.success=true;l.ref=f}h(l)}}}}function u(c){var e=null;if((c=w(c))&&c.nodeName=="OBJECT")if(typeof c.SetVariable!=o)e=c;else if(c=c.getElementsByTagName(t)[0])e=c;return e}function B(c){if(i.ie&&i.win&&c.readyState!=4){var e=A("div");c.parentNode.insertBefore(e, c);e.parentNode.replaceChild(G(c),e);c.style.display="none";(function(){c.readyState==4?c.parentNode.removeChild(c):setTimeout(arguments.callee,10)})()}else c.parentNode.replaceChild(G(c),c)}function G(c){var e=A("div");if(i.win&&i.ie)e.innerHTML=c.innerHTML;else if(c=c.getElementsByTagName(t)[0])if(c=c.childNodes)for(var f=c.length,h=0;h';l.outerHTML='"+k+"";L[L.length]=c.id;h=w(c.id)}else{p=A(t);p.setAttribute("type", J);for(n in c)if(c[n]!=Object.prototype[n])if(n.toLowerCase()=="styleclass")p.setAttribute("class",c[n]);else n.toLowerCase()!="classid"&&p.setAttribute(n,c[n]);for(var r in e)e[r]!=Object.prototype[r]&&r.toLowerCase()!="movie"&&C(p,r,e[r]);l.parentNode.replaceChild(p,l);h=p}}return h}function C(c,e,f){var h=A("param");h.setAttribute("name",e);h.setAttribute("value",f);c.appendChild(h)}function T(c){var e=w(c);if(e&&e.nodeName=="OBJECT")if(i.ie&&i.win){e.style.display="none";(function(){e.readyState== 4?W(c):setTimeout(arguments.callee,10)})()}else e.parentNode.removeChild(e)}function W(c){if(c=w(c)){for(var e in c)if(typeof c[e]=="function")c[e]=null;c.parentNode.removeChild(c)}}function w(c){var e=null;try{e=m.getElementById(c)}catch(f){}return e}function A(c){return m.createElement(c)}function V(c,e,f){c.attachEvent(e,f);D[D.length]=[c,e,f]}function S(c){var e=i.pv;c=c.split(".");c[0]=parseInt(c[0],10);c[1]=parseInt(c[1],10)||0;c[2]=parseInt(c[2],10)||0;return e[0]>c[0]||e[0]==c[0]&&e[1]>c[1]|| e[0]==c[0]&&e[1]==c[1]&&e[2]>=c[2]?true:false}function U(c,e,f,h){if(!(i.ie&&i.mac)){var l=m.getElementsByTagName("head")[0];if(l){f=f&&typeof f=="string"?f:"screen";if(h)Q=v=null;if(!v||Q!=f){h=A("style");h.setAttribute("type","text/css");h.setAttribute("media",f);v=l.appendChild(h);if(i.ie&&i.win&&typeof m.styleSheets!=o&&m.styleSheets.length>0)v=m.styleSheets[m.styleSheets.length-1];Q=f}if(i.ie&&i.win)v&&typeof v.addRule==t&&v.addRule(c,e);else v&&typeof m.createTextNode!=o&&v.appendChild(m.createTextNode(c+ " {"+e+"}"))}}}function F(c,e){if(X){e=e?"visible":"hidden";if(z&&w(c))w(c).style.visibility=e;else U("#"+c,"visibility:"+e)}}var o="undefined",t="object",J="application/x-shockwave-flash",s=window,m=document,x=navigator,R=false,I=[j],K=[],L=[],D=[],z=false,v,Q,X=true,i=function(){var c=typeof m.getElementById!=o&&typeof m.getElementsByTagName!=o&&typeof m.createElement!=o,e=x.userAgent.toLowerCase(),f=x.platform.toLowerCase(),h=f?/win/.test(f):/win/.test(e);f=f?/mac/.test(f):/mac/.test(e);e=/webkit/.test(e)? parseFloat(e.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false;var l=!+"\u000b1",n=[0,0,0],k=null;if(typeof x.plugins!=o&&typeof x.plugins["Shockwave Flash"]==t){if((k=x.plugins["Shockwave Flash"].description)&&!(typeof x.mimeTypes!=o&&x.mimeTypes[J]&&!x.mimeTypes[J].enabledPlugin)){R=true;l=false;k=k.replace(/^.*\s+(\S+\s+\S+$)/,"$1");n[0]=parseInt(k.replace(/^(.*)\..*$/,"$1"),10);n[1]=parseInt(k.replace(/^.*\.(.*)\s.*$/,"$1"),10);n[2]=/[a-zA-Z]/.test(k)?parseInt(k.replace(/^.*[a-zA-Z]+(.*)$/,"$1"), 10):0}}else if(typeof s.ActiveXObject!=o)try{var p=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");if(p)if(k=p.GetVariable("$version")){l=true;k=k.split(" ")[1].split(",");n=[parseInt(k[0],10),parseInt(k[1],10),parseInt(k[2],10)]}}catch(r){}return{w3:c,pv:n,wk:e,ie:l,win:h,mac:f}}();(function(){if(i.w3){if(typeof m.readyState!=o&&m.readyState=="complete"||typeof m.readyState==o&&(m.getElementsByTagName("body")[0]||m.body))a();if(!z){typeof m.addEventListener!=o&&m.addEventListener("DOMContentLoaded", a,false);if(i.ie&&i.win){m.attachEvent("onreadystatechange",function(){if(m.readyState=="complete"){m.detachEvent("onreadystatechange",arguments.callee);a()}});s==top&&function(){if(!z){try{m.documentElement.doScroll("left")}catch(c){setTimeout(arguments.callee,0);return}a()}}()}i.wk&&function(){z||(/loaded|complete/.test(m.readyState)?a():setTimeout(arguments.callee,0))}();d(a)}}})();(function(){i.ie&&i.win&&window.attachEvent("onunload",function(){for(var c=D.length,e=0;e0)for(var g=0;g0)for(var q=0;q1)for(var B= 0;B=0){FABridge.attachBridge(j[B],a);u=true;break}}if(u)break}if(!u&&d>1)for(j=0;j=0){FABridge.attachBridge(b[j],a);break}}return true}FABridge.nextBridgeID=0;FABridge.instances={};FABridge.idMap={};FABridge.refCount=0; FABridge.extractBridgeFromID=function(a){return FABridge.idMap[a>>16]};FABridge.attachBridge=function(a,b){a=new FABridge(a,b);FABridge[b]=a;var d=FABridge.initCallbacks[b];if(d!=null){for(var j=0;j0)throw new Error("You are trying to call recursively into the Flash Player which is not allowed. In most cases the JavaScript setTimeout function, can be used as a workaround."); else{FABridge.refCount++;retVal=this.target.getPropFromAS(a,b);retVal=this.handleError(retVal);FABridge.refCount--;return retVal}},setPropertyInAS:function(a,b,d){if(FABridge.refCount>0)throw new Error("You are trying to call recursively into the Flash Player which is not allowed. In most cases the JavaScript setTimeout function, can be used as a workaround.");else{FABridge.refCount++;retVal=this.target.setPropInAS(a,b,this.serialize(d));retVal=this.handleError(retVal);FABridge.refCount--;return retVal}}, callASFunction:function(a,b){if(FABridge.refCount>0)throw new Error("You are trying to call recursively into the Flash Player which is not allowed. In most cases the JavaScript setTimeout function, can be used as a workaround.");else{FABridge.refCount++;retVal=this.target.invokeASFunction(a,this.serialize(b));retVal=this.handleError(retVal);FABridge.refCount--;return retVal}},callASMethod:function(a,b,d){if(FABridge.refCount>0)throw new Error("You are trying to call recursively into the Flash Player which is not allowed. In most cases the JavaScript setTimeout function, can be used as a workaround."); else{FABridge.refCount++;d=this.encodeJSON(this.serialize(d));retVal=this.target.invokeASMethod(a,b,d);retVal=this.handleError(retVal);FABridge.refCount--;return retVal}},invokeLocalFunction:function(a,b){var d;a=this.localFunctionCache[a];if(a!=undefined)d=this.serialize(a.apply(null,this.deserialize(b)));return d},getTypeFromName:function(a){return this.remoteTypeCache[a]},createProxy:function(a,b){b=this.getTypeFromName(b);instanceFactory.prototype=b;b=new instanceFactory(a);return this.remoteInstanceCache[a]= b},getProxy:function(a){return this.remoteInstanceCache[a]},addTypeDataToCache:function(a){newType=new ASProxy(this,a.name);for(var b=a.accessors,d=0;d="a"&&d<="z"){j="get"+d.toUpperCase()+b.substr(1);d="set"+d.toUpperCase()+b.substr(1)}else{j= "get"+b;d="set"+b}a[d]=function(g){this.bridge.setPropertyInAS(this.fb_instance_id,b,g)};a[j]=function(){return this.bridge.deserialize(this.bridge.getPropertyFromAS(this.fb_instance_id,b))}},addMethodToType:function(a,b){a[b]=function(){return this.bridge.deserialize(this.bridge.callASMethod(this.fb_instance_id,b,FABridge.argsToArray(arguments)))}},getFunctionProxy:function(a){var b=this;if(this.remoteFunctionCache[a]==null)this.remoteFunctionCache[a]=function(){b.callASFunction(a,FABridge.argsToArray(arguments))}; return this.remoteFunctionCache[a]},getFunctionID:function(a){if(a.__bridge_id__==undefined){a.__bridge_id__=this.makeID(this.nextLocalFuncID++);this.localFunctionCache[a.__bridge_id__]=a}return a.__bridge_id__},serialize:function(a){var b={},d=typeof a;if(d=="number"||d=="string"||d=="boolean"||d==null||d=="undefined")b=a;else if(FABridge.isArray(a)){b=[];for(d=0;d=" "){if(b=="\\"||b=='"')g+="\\";g+=b}else switch(b){case "\u0008":g+="\\b";break;case "\u000c":g+="\\f";break;case "\n":g+="\\n";break;case "\r":g+="\\r";break;case "\t":g+="\\t";break;default:b=b.charCodeAt();g+="\\u00"+Math.floor(b/16).toString(16)+(b%16).toString(16)}}return g+'"';case "boolean":return""+a;default:return"null"}}, addRef:function(a){this.target.incRef(a.fb_instance_id)},release:function(a){this.target.releaseRef(a.fb_instance_id)},handleError:function(a){if(typeof a=="string"&&a.indexOf("__FLASHERROR")==0){a=a.split("||");FABridge.refCount>0&&FABridge.refCount--;throw new Error(a[1]);}else return a}};ASProxy=function(a,b){this.bridge=a;this.typeName=b;this.className="ASProxy";return this}; ASProxy.prototype={get:function(a){return this.bridge.deserialize(this.bridge.getPropertyFromAS(this.fb_instance_id,a))},set:function(a,b){this.bridge.setPropertyInAS(this.fb_instance_id,a,b)},call:function(a,b){this.bridge.callASMethod(this.fb_instance_id,a,b)},addRef:function(){this.bridge.addRef(this)},release:function(){this.bridge.release(this)}};function KongregateAPI(){this.initialize()} KongregateAPI.prototype={initialize:function(){this._flashVarsString="";this._flashVarsObject={};this._services={};this._apiLoadedCallback=null;this._paramsReceived=false;var a=location.search.split("?")[1];if(a){a=a.split("&");for(var b=0;b";b.innerHTML=d},createAnsible:function(a){FABridge.addInitializationCallback("ansible",a);a=document.createElement("div");a.id="ansible_container";a.style.position="absolute";a.style.width=a.style.height="1px";a.style.left=a.style.top="-1000px";document.body.appendChild(a);var b=document.createElement("div");b.id="ansible";a.appendChild(b);a={bridgeName:"ansible",json_encode:"true"};for(var d in this.flashVarsObject())a[d]=this.flashVarsObject()[d];if((d=decodeURIComponent(this.getVariable("kongregate_ansible_path")))&& d.indexOf("http://")!=0)d=location.protocol=="https:"&&d.indexOf("chat.kongregate.com")==0?"https://"+d.replace("chat.kongregate.com","ssl.kongcdn.com"):"http://"+d;kswfobject.embedSWF(d,"ansible","1","1","9.0.0",null,a,{allowScriptaccess:"always"},null,null)}};kongregateAPI=new KongregateAPI;