dzxstatic
Version:
The static files of Discuz! X
1 lines • 7.58 kB
JavaScript
if(void 0===deconcept)var deconcept={};void 0===deconcept.util&&(deconcept.util={}),void 0===deconcept.SWFObjectUtil&&(deconcept.SWFObjectUtil={}),deconcept.SWFObject=function(t,e,i,a,r,s,n,l,o,c){if(document.getElementById){this.DETECT_KEY=c||"detectflash",this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY),this.params={},this.variables={},this.attributes=[],this.fallback_html="",this.fallback_js_fcn=function(){},t&&this.setAttribute("swf",t),e&&this.setAttribute("id",e),i&&this.setAttribute("width",i),a&&this.setAttribute("height",a),r&&this.setAttribute("version",new deconcept.PlayerVersion(r.toString().split("."))),this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion(),!window.opera&&document.all&&this.installedVer.major>7&&(deconcept.unloadSet||(deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){},__flash_savedUnloadHandler=function(){},window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs)},window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload),deconcept.unloadSet=!0)),s&&this.addParam("bgcolor",s);var h=n||"high";this.addParam("quality",h),this.setAttribute("useExpressInstall",!1),this.setAttribute("doExpressInstall",!1);var d=l||window.location;this.setAttribute("xiRedirectUrl",d),this.setAttribute("redirectUrl",""),o&&this.setAttribute("redirectUrl",o)}},deconcept.SWFObject.prototype={useExpressInstall:function(t){this.xiSWFPath=t||"/swf/expressinstall.swf",this.setAttribute("useExpressInstall",!0)},setAttribute:function(t,e){this.attributes[t]=e},getAttribute:function(t){return this.attributes[t]||""},addParam:function(t,e){this.params[t]=e},getParams:function(){return this.params},addVariable:function(t,e){this.variables[t]=e},getVariable:function(t){return this.variables[t]||""},getVariables:function(){return this.variables},getVariablePairs:function(){var t,e=[],i=this.getVariables();for(t in i)e[e.length]=t+"="+i[t];return e},getSWFHTML:function(){var t="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){this.getAttribute("doExpressInstall")&&(this.addVariable("MMplayerType","PlugIn"),this.setAttribute("swf",this.xiSWFPath)),t='<embed type="application/x-shockwave-flash" src="'+htmlspecialchars(this.getAttribute("swf"))+'" width="'+htmlspecialchars(this.getAttribute("width"))+'" height="'+htmlspecialchars(this.getAttribute("height"))+'" style="'+htmlspecialchars(this.getAttribute("style")||"")+'"',t+=' id="'+htmlspecialchars(this.getAttribute("id"))+'" name="'+htmlspecialchars(this.getAttribute("id"))+'" ';var e=this.getParams();for(var i in e)t+=htmlspecialchars(i)+'="'+htmlspecialchars(e[i])+'" ';(a=this.getVariablePairs().join("&")).length>0&&(t+='flashvars="'+a+'"'),t+="/>"}else{this.getAttribute("doExpressInstall")&&(this.addVariable("MMplayerType","ActiveX"),this.setAttribute("swf",this.xiSWFPath)),t='<object id="'+this.getAttribute("id")+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+this.getAttribute("width")+'" height="'+this.getAttribute("height")+'" style="'+(this.getAttribute("style")||"")+'">',t+='<param name="movie" value="'+this.getAttribute("swf")+'" />';var a;e=this.getParams();for(var i in e)t+='<param name="'+i+'" value="'+e[i]+'" />';(a=this.getVariablePairs().join("&")).length>0&&(t+='<param name="flashvars" value="'+a+'" />'),t+="</object>"}return t},write:function(t){if(this.getAttribute("useExpressInstall")){var e=new deconcept.PlayerVersion([6,0,65]);this.installedVer.versionIsValid(e)&&!this.installedVer.versionIsValid(this.getAttribute("version"))&&(this.setAttribute("doExpressInstall",!0),this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl"))),document.title=document.title.slice(0,47)+" - Flash Player Installation",this.addVariable("MMdoctitle",document.title))}var i="string"==typeof t?document.getElementById(t):t;return this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))?(i.innerHTML=this.getSWFHTML(),!0):(""!=this.getAttribute("redirectUrl")&&document.location.replace(this.getAttribute("redirectUrl")),need_version=this.getAttribute("version").major+"."+this.getAttribute("version").minor+"."+this.getAttribute("version").rev,have_version=this.installedVer.major+"."+this.installedVer.minor+"."+this.installedVer.rev,this.fallback_js_fcn(have_version,need_version),i.innerHTML=this.fallback_html,!1)}},deconcept.SWFObjectUtil.getPlayerVersion=function(){var t=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length)for(k=0;k<navigator.plugins.length;k++)try{x=navigator.plugins[k],"Shockwave Flash"==x.name&&(PlayerVersion_tmp=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split(".")),(void 0===t||PlayerVersion_tmp.major>t.major||PlayerVersion_tmp.major==t.major&&(PlayerVersion_tmp.minor>t.minor||PlayerVersion_tmp.minor==t.minor&&PlayerVersion_tmp.rev>t.rev))&&(t=PlayerVersion_tmp))}catch(t){}else if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0)for(var e=1,i=3;e;)try{i++,e=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+i),t=new deconcept.PlayerVersion([i,0,0])}catch(t){e=null}else{try{e=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}catch(i){try{e=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");t=new deconcept.PlayerVersion([6,0,21]),e.AllowScriptAccess="always"}catch(e){if(6==t.major)return t}try{e=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(t){}}null!=e&&(t=new deconcept.PlayerVersion(e.GetVariable("$version").split(" ")[1].split(",")))}return t},deconcept.PlayerVersion=function(t){this.major=null!=t[0]?parseInt(t[0]):0,this.minor=null!=t[1]?parseInt(t[1]):0,this.rev=null!=t[2]?parseInt(t[2]):0},deconcept.PlayerVersion.prototype.versionIsValid=function(t){return!(this.major<t.major)&&(this.major>t.major||!(this.minor<t.minor)&&(this.minor>t.minor||!(this.rev<t.rev)))},deconcept.util={getRequestParameter:function(t){var e=document.location.search||document.location.hash;if(null==t)return e;if(e)for(var i=e.substring(1).split("&"),a=0;a<i.length;a++)if(i[a].substring(0,i[a].indexOf("="))==t)return i[a].substring(i[a].indexOf("=")+1);return""}},deconcept.SWFObjectUtil.cleanupSWFs=function(){for(var t=document.getElementsByTagName("OBJECT"),e=t.length-1;e>=0;e--)for(var i in t[e].style.display="none",t[e])"function"==typeof t[e][i]&&(t[e][i]=function(){})},!document.getElementById&&document.all&&(document.getElementById=function(t){return document.all[t]});var getQueryParamValue=deconcept.util.getRequestParameter,FlashObject=deconcept.SWFObject,SWFObject=deconcept.SWFObject,flash_update_dialog_shown=!1;function spawn_flash_update_dialog(t,e){flash_update_dialog_shown||(flash_update_dialog_shown=!0,dialog=new pop_dialog("errorDialog"),(new AsyncRequest).setURI("/ajax/flash_update_dialog.php").setData({have_version:t,need_version:e}).setHandler((function(t){message_data=t.getPayload(),dialog.show_message(message_data.title,message_data.body,"Close")})).send())}function setFlashFallback(t,e){var i=ge(t),a=deconcept.SWFObjectUtil.getPlayerVersion();if(i&&a.major>0){var r=a.major+"."+a.minor+"."+a.rev;i.innerHTML=tx("flash:upgrade-explanation",{"required-version":e,"current-version":r})}}function getFlashPlayer(){return goURI("http://adobe.com/go/getflashplayer"),!1}function htmlspecialchars(t){return void 0!==t&&t.toString?!1===t?"0":!0===t?"1":t.toString().replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">"):""}