if(typeof otee=="undefined"){var otee=new Object()}otee.UnityObject=function(b,g,a,e,d,c,f){if(!document.getElementById){return}this.attributes=new Array();this.params=new Object();if(b){this.setAttribute("src",b)}if(g){this.setAttribute("id",g)}if(a){this.setAttribute("width",a)}if(e){this.setAttribute("height",e)}if(d){this.addParam("backgroundcolor",d)}if(c){this.addParam("bordercolor",c)}this.setAttribute("redirectUrl","");if(f){this.setAttribute("redirectUrl",f)}};otee.UnityObject.prototype={detectUnityWebPlayer:function(){var a=false;if(navigator.appVersion.indexOf("MSIE")!=-1&&navigator.appVersion.toLowerCase().indexOf("win")!=-1){document.write(" \n");document.write("<script language='VBscript'> \n");document.write("function DetectUnityWebPlayerActiveX \n");document.write("on error resume next \n");document.write("dim tControl \n");document.write("dim res \n");document.write("res = 0 \n");document.write('set tControl = CreateObject("UnityWebPlayer.UnityWebPlayer.1") \n');document.write("if IsObject(tControl) then \n");document.write("res = 1 \n");document.write("end if \n");document.write("DetectUnityWebPlayerActiveX = res\n");document.write("end function\n");document.write("<\/script>\n");a=DetectUnityWebPlayerActiveX()}else{if(navigator.mimeTypes&&navigator.mimeTypes["application/vnd.unity"]&&navigator.mimeTypes["application/vnd.unity"].enabledPlugin){if(navigator.plugins&&navigator.plugins["Unity Player"]){a=true}}}return a},writeEmbedDOM:function(){var b='<object classid="clsid:444785F1-DE89-4295-863A-D46C3A781394" codebase="http://webplayer.unity3d.com/download_webplayer-2.x/UnityWebPlayer.cab#version=2,0,0,0" id="'+this.getAttribute("id")+'_object" width="'+this.getAttribute("width")+'" height="'+this.getAttribute("height")+'"><param name="src" value="'+this.getAttribute("src")+'" />';var c=this.getParams();for(var a in c){b+='<param name="'+a+'" value="'+c[a]+'" />'}b+='<embed type="application/vnd.unity" pluginspage="http://www.unity3d.com/unity-web-player-2.x" id="'+this.getAttribute("id")+'_embed" width="'+this.getAttribute("width")+'" height="'+this.getAttribute("height")+'" src="'+this.getAttribute("src")+'"';var c=this.getParams();for(var a in c){b+=[a]+'="'+c[a]+'" '}b+=" /></object>";return b},addParam:function(a,b){this.params[a]=b},getParams:function(){return this.params},setAttribute:function(a,b){this.attributes[a]=b},getAttribute:function(a){return this.attributes[a]},write:function(a){if(this.detectUnityWebPlayer()){document.write(this.writeEmbedDOM());this.findEar();return true}else{if(this.getAttribute("altHTML")!=""){document.write(this.getAttribute("altHTML"))}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"))}}}return false},findEar:function(){this.unityEar="";if(navigator.appVersion.indexOf("MSIE")!=-1&&navigator.appVersion.toLowerCase().indexOf("win")!=-1){this.unityEar=document.getElementById(this.getAttribute("id")+"_object")}else{if(navigator.appVersion.toLowerCase().indexOf("safari")!=-1){this.unityEar=document.getElementById(this.getAttribute("id")+"_object")}else{this.unityEar=document.getElementById(this.getAttribute("id")+"_embed")}}document.Unity=this.unityEar},msg:function(a,c,b){this.unityEar.SendMessage(a,c,b)}};if(!document.getElementById&&document.all){document.getElementById=function(a){return document.all[a]}}var UnityObject=otee.UnityObject;
