1 line
9.4 KiB
JavaScript
1 line
9.4 KiB
JavaScript
var swfobject=function(){var $="undefined",p="object",T="Shockwave Flash",P="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",U="SWFObjectExprInst",u="onreadystatechange",I=window,g=document,n=navigator,O=false,N=[i],d=[],H=[],K=[],e,R,_,D,L=false,b=false,c,B,f=true,G=function(){var B=typeof g.getElementById!=$&&typeof g.getElementsByTagName!=$&&typeof g.createElement!=$,G=n.userAgent.toLowerCase(),E=n.platform.toLowerCase(),H=E?/win/.test(E):/win/.test(G),_=E?/mac/.test(E):/mac/.test(G),K=/webkit/.test(G)?parseFloat(G.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,F=!+"\v1",D=[0,0,0],C=null;if(typeof n.plugins!=$&&typeof n.plugins[T]==p){C=n.plugins[T].description;if(C&&!(typeof n.mimeTypes!=$&&n.mimeTypes[q]&&!n.mimeTypes[q].enabledPlugin)){O=true;F=false;C=C.replace(/^.*\s+(\S+\s+\S+$)/,"$1");D[0]=parseInt(C.replace(/^(.*)\..*$/,"$1"),10);D[1]=parseInt(C.replace(/^.*\.(.*)\s.*$/,"$1"),10);D[2]=/[a-zA-Z]/.test(C)?parseInt(C.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else if(typeof I.ActiveXObject!=$){try{var A=new ActiveXObject(P);if(A){C=A.GetVariable("$version");if(C){F=true;C=C.split(" ")[1].split(",");D=[parseInt(C[0],10),parseInt(C[1],10),parseInt(C[2],10)]}}}catch(J){}}return{w3:B,pv:D,wk:K,ie:F,win:H,mac:_}}(),h=function(){if(!G.w3)return;if((typeof g.readyState!=$&&g.readyState=="complete")||(typeof g.readyState==$&&(g.getElementsByTagName("body")[0]||g.body)))V();if(!L){if(typeof g.addEventListener!=$)g.addEventListener("DOMContentLoaded",V,false);if(G.ie&&G.win){g.attachEvent(u,function(){if(g.readyState=="complete"){g.detachEvent(u,arguments.callee);V()}});if(I==top)(function(){if(L)return;try{g.documentElement.doScroll("left")}catch($){setTimeout(arguments.callee,0);return}V()})()}if(G.wk)(function(){if(L)return;if(!/loaded|complete/.test(g.readyState)){setTimeout(arguments.callee,0);return}V()})();o(V)}}();function V(){if(L)return;try{var B=g.getElementsByTagName("body")[0].appendChild(E("span"));B.parentNode.removeChild(B)}catch($){return}L=true;var A=N.length;for(var _=0;_<A;_++)N[_]()}function M($){if(L)$();else N[N.length]=$}function o(_){if(typeof I.addEventListener!=$)I.addEventListener("load",_,false);else if(typeof g.addEventListener!=$)g.addEventListener("load",_,false);else if(typeof I.attachEvent!=$)j(I,"onload",_);else if(typeof I.onload=="function"){var A=I.onload;I.onload=function(){A();_()}}else I.onload=_}function i(){if(O)Q();else J()}function Q(){var B=g.getElementsByTagName("body")[0],_=E(p);_.setAttribute("type",q);var C=B.appendChild(_);if(C){var A=0;(function(){if(typeof C.GetVariable!=$){var D=C.GetVariable("$version");if(D){D=D.split(" ")[1].split(",");G.pv=[parseInt(D[0],10),parseInt(D[1],10),parseInt(D[2],10)]}}else if(A<10){A++;setTimeout(arguments.callee,10);return}B.removeChild(_);C=null;J()})()}else J()}function J(){var H=d.length;if(H>0)for(var N=0;N<H;N++){var I=d[N].id,F=d[N].callbackFn,E={success:false,id:I};if(G.pv[0]>0){var L=a(I);if(L)if(A(d[N].swfVersion)&&!(G.wk&&G.wk<312)){k(I,true);if(F){E.success=true;E.ref=s(I);F(E)}}else if(d[N].expressInstall&&C()){var _={};_.data=d[N].expressInstall;_.width=L.getAttribute("width")||"0";_.height=L.getAttribute("height")||"0";if(L.getAttribute("class"))_.styleclass=L.getAttribute("class");if(L.getAttribute("align"))_.align=L.getAttribute("align");var J={},K=L.getElementsByTagName("param"),B=K.length;for(var D=0;D<B;D++)if(K[D].getAttribute("name").toLowerCase()!="movie")J[K[D].getAttribute("name")]=K[D].getAttribute("value");S(_,J,I,F)}else{r(L);if(F)F(E)}}else{k(I,true);if(F){var M=s(I);if(M&&typeof M.SetVariable!=$){E.success=true;E.ref=M}F(E)}}}}function s(_){var B=null,A=a(_);if(A&&A.nodeName=="OBJECT")if(typeof A.SetVariable!=$)B=A;else{var C=A.getElementsByTagName(p)[0];if(C)B=C}return B}function C(){return!b&&A("6.0.65")&&(G.win||G.mac)&&!(G.wk&&G.wk<312)}function S(C,F,J,L){b=true;_=L||null;D={success:false,id:J};var K=a(J);if(K){if(K.nodeName=="OBJECT"){e=W(K);R=null}else{e=K;R=J}C.id=U;if(typeof C.width==$||(!/%$/.test(C.width)&&parseInt(C.width,10)<310))C.width="310";if(typeof C.height==$||(!/%$/.test(C.height)&&parseInt(C.height,10)<137))C.height="137";g.title=g.title.slice(0,47)+" - Flash Player Installation";var B=G.ie&&G.win?"ActiveX":"PlugIn",A="MMredirectURL="+I.location.toString().replace(/&/g,"%26")+"&MMplayerType="+B+"&MMdoctitle="+g.title;if(typeof F.flashvars!=$)F.flashvars+="&"+A;else F.flashvars=A;if(G.ie&&G.win&&K.readyState!=4){var H=E("div");J+="SWFObjectNew";H.setAttribute("id",J);K.parentNode.insertBefore(H,K);K.style.display="none";(function(){if(K.readyState==4)K.parentNode.removeChild(K);else setTimeout(arguments.callee,10)})()}m(C,F,J)}}function r($){if(G.ie&&G.win&&$.readyState!=4){var _=E("div");$.parentNode.insertBefore(_,$);_.parentNode.replaceChild(W($),_);$.style.display="none";(function(){if($.readyState==4)$.parentNode.removeChild($);else setTimeout(arguments.callee,10)})()}else $.parentNode.replaceChild(W($),$)}function W(A){var _=E("div");if(G.win&&G.ie)_.innerHTML=A.innerHTML;else{var B=A.getElementsByTagName(p)[0];if(B){var $=B.childNodes;if($){var C=$.length;for(var D=0;D<C;D++)if(!($[D].nodeType==1&&$[D].nodeName=="PARAM")&&!($[D].nodeType==8))_.appendChild($[D].cloneNode(true))}}}return _}function m(_,I,F){var K,C=a(F);if(G.wk&&G.wk<312)return K;if(C){if(typeof _.id==$)_.id=F;if(G.ie&&G.win){var J="";for(var L in _)if(_[L]!=Object.prototype[L])if(L.toLowerCase()=="data")I.movie=_[L];else if(L.toLowerCase()=="styleclass")J+=" class=\""+_[L]+"\"";else if(L.toLowerCase()!="classid")J+=" "+L+"=\""+_[L]+"\"";var N="";for(var B in I)if(I[B]!=Object.prototype[B])N+="<param name=\""+B+"\" value=\""+I[B]+"\" />";C.outerHTML="<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\""+J+">"+N+"</object>";H[H.length]=_.id;K=a(_.id)}else{var M=E(p);M.setAttribute("type",q);for(var A in _)if(_[A]!=Object.prototype[A])if(A.toLowerCase()=="styleclass")M.setAttribute("class",_[A]);else if(A.toLowerCase()!="classid")M.setAttribute(A,_[A]);for(var D in I)if(I[D]!=Object.prototype[D]&&D.toLowerCase()!="movie")Y(M,D,I[D]);C.parentNode.replaceChild(M,C);K=M}}return K}function Y(B,A,_){var $=E("param");$.setAttribute("name",A);$.setAttribute("value",_);B.appendChild($)}function t($){var _=a($);if(_&&_.nodeName=="OBJECT")if(G.ie&&G.win){_.style.display="none";(function(){if(_.readyState==4)Z($);else setTimeout(arguments.callee,10)})()}else _.parentNode.removeChild(_)}function Z(A){var $=a(A);if($){for(var _ in $)if(typeof $[_]=="function")$[_]=null;$.parentNode.removeChild($)}}function a(A){var _=null;try{_=g.getElementById(A)}catch($){}return _}function E($){return g.createElement($)}function j(A,_,$){A.attachEvent(_,$);K[K.length]=[A,_,$]}function A(A){var $=G.pv,_=A.split(".");_[0]=parseInt(_[0],10);_[1]=parseInt(_[1],10)||0;_[2]=parseInt(_[2],10)||0;return($[0]>_[0]||($[0]==_[0]&&$[1]>_[1])||($[0]==_[0]&&$[1]==_[1]&&$[2]>=_[2]))?true:false}function l(_,F,A,D){if(G.ie&&G.mac)return;var C=g.getElementsByTagName("head")[0];if(!C)return;var H=(A&&typeof A=="string")?A:"screen";if(D){c=null;B=null}if(!c||B!=H){var I=E("style");I.setAttribute("type","text/css");I.setAttribute("media",H);c=C.appendChild(I);if(G.ie&&G.win&&typeof g.styleSheets!=$&&g.styleSheets.length>0)c=g.styleSheets[g.styleSheets.length-1];B=H}if(G.ie&&G.win){if(c&&typeof c.addRule==p)c.addRule(_,F)}else if(c&&typeof g.createTextNode!=$)c.appendChild(g.createTextNode(_+" {"+F+"}"))}function k(A,_){if(!f)return;var $=_?"visible":"hidden";if(L&&a(A))a(A).style.visibility=$;else l("#"+A,"visibility:"+$)}function F(_){var B=/[\\\"<>\.;]/,A=B.exec(_)!=null;return A&&typeof encodeURIComponent!=$?encodeURIComponent(_):_}var X=function(){if(G.ie&&G.win)window.attachEvent("onunload",function(){var $=K.length;for(var A=0;A<$;A++)K[A][0].detachEvent(K[A][1],K[A][2]);var D=H.length;for(var _=0;_<D;_++)t(H[_]);for(var B in G)G[B]=null;G=null;for(var C in swfobject)swfobject[C]=null;swfobject=null})}();return{registerObject:function(_,B,$,C){if(G.w3&&_&&B){var A={};A.id=_;A.swfVersion=B;A.expressInstall=$;A.callbackFn=C;d[d.length]=A;k(_,false)}else if(C)C({success:false,id:_})},getObjectById:function($){if(G.w3)return s($)},embedSWF:function(E,J,K,H,F,D,N,B,L,_){var I={success:false,id:J};if(G.w3&&!(G.wk&&G.wk<312)&&E&&J&&K&&H&&F){k(J,false);M(function(){K+="";H+="";var P={};if(L&&typeof L===p)for(var M in L)P[M]=L[M];P.data=E;P.width=K;P.height=H;var Q={};if(B&&typeof B===p)for(var G in B)Q[G]=B[G];if(N&&typeof N===p)for(var O in N)if(typeof Q.flashvars!=$)Q.flashvars+="&"+O+"="+N[O];else Q.flashvars=O+"="+N[O];if(A(F)){var R=m(P,Q,J);if(P.id==J)k(J,true);I.success=true;I.ref=R}else if(D&&C()){P.data=D;S(P,Q,J,_);return}else k(J,true);if(_)_(I)})}else if(_)_(I)},switchOffAutoHideShow:function(){f=false},ua:G,getFlashPlayerVersion:function(){return{major:G.pv[0],minor:G.pv[1],release:G.pv[2]}},hasFlashPlayerVersion:A,createSWF:function(A,$,_){if(G.w3)return m(A,$,_);else return undefined},showExpressInstall:function(B,$,A,_){if(G.w3&&C())S(B,$,A,_)},removeSWF:function($){if(G.w3)t($)},createCSS:function($,B,_,A){if(G.w3)l($,B,_,A)},addDomLoadEvent:M,addLoadEvent:o,getQueryParamValue:function($){var B=g.location.search||g.location.hash;if(B){if(/\?/.test(B))B=B.split("?")[1];if($==null)return F(B);var _=B.split("&");for(var A=0;A<_.length;A++)if(_[A].substring(0,_[A].indexOf("="))==$)return F(_[A].substring((_[A].indexOf("=")+1)))}return""},expressInstallCallback:function(){if(b){var $=a(U);if($&&e){$.parentNode.replaceChild(e,$);if(R){k(R,true);if(G.ie&&G.win)e.style.display="block"}if(_)_(D)}b=false}}}}() |