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