www.gusucode.com > 在线影院小偷程序联盟多风格后台版 3.2源码程序 > js/flashloader.js

    /*
 * TUI.swfobject, TUI.player(for video/playlist player) $Rev: 2976 $
 * Created: dexter.yy
 * Modified: $Author: dexteryy $ $LastChangedDate: 2008-11-04 15:36:40 +0800 (星期二, 04 十一月 2008) $
 */
TUI.swfobject=TUI.Class.create();TUI.swfobject.prototype={init:function(a,w,h,b,c,d){this.attr=$.extend(d,{src:a,width:w,height:h});this.params=c||{};this.flashvars=b||{}},load:function(a){this.attr.id=a;var b=document.getElementById(a);if(b)b.parentNode.innerHTML=this.getHTML();else document.write(this.getHTML())},getHTML:function(){var h="";var a=!(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length);h="<object allownetworking='internal' allowscriptaccess='never' wmode='opaque' id=\""+this.attr["id"]+"\""+(a?" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" ":(" data=\""+this.attr["src"]+"\" "))+"width=\""+this.attr["width"]+"\" height=\"400\" style=\""+(this.attr["style"]||"")+"\">";if(a)h+="<param name=\"movie\" value=\""+this.attr["src"]+"\" />";var p=[],vars=[];for(var k in this.params)p.push("<param name=\""+k+"\" value=\""+this.params[k]+"\" />");for(var n in this.flashvars)vars.push(n+"="+this.flashvars[n]);if(vars.length>0)p.push("<param name=\"flashvars\" value=\""+vars.join("&")+"\" />");return h+p.join("")+"<param name=\"allownetworking\" value=\"internal\" /><param name=\"allowscriptaccess\" value=\"never\" /><param name=\"wmode\" value=\"opaque\" /></object>"}};TUI.swfobject.getVersion=function(){var a=[0,0,0];if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description)a=x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split(".")}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var b=1;var n=3;while(b){try{n++;b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+n);a=[n,0,0]}catch(e){b=null}}}else{try{var b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}catch(e){try{var b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");a=[6,0,21];b.AllowScriptAccess="always"}catch(e){if(a.major==6)return a}try{b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(e){}}if(b!=null){a=b.GetVariable("$version").split(" ")[1].split(",")}}}return a};var tudouLoadTime=(function(){var a=[];return{save:function(n,t){a[n]=t},get:function(){return a.join("|")}}})();TUI.player={load:function(p,s,e,i,l){try{var b={bgcolor:"#000000",allowFullScreen:'true',allowScriptAccess:'always'};var c='playerRunning';var d={"iid":i,"default_skin":s,"lid":l||'0',"uid":(typeof uid=='undefined'&&'0')||uid||'0',"referrer":document.referrer.replace(/&/g,"%26"),"href":location.href.replace(/&/g,"%26"),"USER_AGENT":navigator.userAgent,"document_title":encodeURIComponent(document.title.slice(0,47)),"channel":(typeof cid=='undefined'&&'0')||cid||'0',"juid":(typeof juidStr=='undefined'&&'0')||juidStr||'0',"isRec":/tudou.com(|\/|\/index.html|\/index.php|\/my(|\/|\/index.php.*))$/i.test(document.referrer)?1:0,"durl":'http://fpdownload.macromedia.com/get/flashplayer/current/licensing/win/install_flash_player_'+($.browser.msie?'active_x.exe':'plugin.msi'),"ev7Str":$.cookie(c)||'0',"ports":'100:0',"safekey":"IAlsoNeverKnow","gettime":"tudouLoadTime.get"};var f={};var g=location.href.match(/[^\s&?=\/]+=[^\s&?=\/]+/g);if(g){$.each(g,function(){var n=this.split("=");f[n[0]]=n[1]})}$.extend(d,{"actionID":f.tid||0,"ID":f.aid||0,"adOwnerId":f.oid||0,"adPositionId":f.pid||0,"isNielson":f.isNielson||0});if(f.rqtime)tudouLoadTime.save(0,f.rqtime);this.fv=TUI.swfobject.getVersion();if(this.fv.length>=3&&this.fv[0]>=9){window.playerEx=TUI.swfobject(p,"100%","100%",d,b);playerEx.load(e);$.extend(playerEx,{adGetParams:function(){return{iid:iid,uid:uid}},adQuest:function(a){$.get(a)},cache7:'',setCookie:function(n,v,t){$.cookie(n,v,{expires:t*1,path:'/'})},addCache7:function(a){this.cache7=a},keepEvent7:function(){if(this.cache7)$.cookie(c,($.cookie(c)||"")+this.cache7+"|",{expires:365,path:'/'})}})}}catch(e){this.error(e.message)}},hdVersion:function(a){var b=false,hdversion=[9,0,115];$.each(a,function(i){if(this!=hdversion[i]){b=this<hdversion[i];return false}});return b},afterLoad:function(){try{if(this.fv[0]==0){if(navigator.userAgent.toLowerCase().indexOf("win")!=-1)$("#noticeWithoutFlash .abutton").attr("href",'http://fpdownload.macromedia.com/get/flashplayer/current/licensing/win/install_flash_player_10'+(($.browser.msie)?'_active_x.exe':'.exe'));$("#noticeWithoutFlash").show();$("#betaPortal").show()}else if(this.fv[0]<9)$("#noticeLowFlash").show();else if(hdVersion(this.fv))$("#betaPortal").show()}catch(e){}if(window.playerEx){try{if(window.ActiveXObject)var a=new ActiveXObject("VaCom.Application");else{netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");var a=Components.classes["@mydomain.com/XPCOMTudouVa/CCheckTudouVa;1"].createInstance().QueryInterface(Components.interfaces.ICheckTudouVa);a.RunTudouVa()}window.tudouva_http_port=a.GetHttpPort;window.tudouva_tcp_port=a.GetTcpPort}catch(e){}window.onbeforeunload=function(){playerEx.keepEvent7()}}},error:function(a){try{var b=TUI.swfobject.getVersion().join("")}catch(e){var b=-1}this.sendError({category:1800,type:668,object_id:iid,summary:uid+"|"+b+"|"+a+"|"+navigator.userAgent.toLowerCase()})},sendError:function(a){var b,cd=TUI.addElm('IFRAME',{src:"http://erreport.tudou.com/crossdomain/index.html"});cd.style.display="none";document.body.appendChild(cd);(function(){try{cd.contentWindow.TUI.ajax({url:"http://erreport.tudou.com/errorlog/error.php",type:"POST",processData:false,data:a,success:function(e){alert(unescape("%u64AD%u653E%u5668%u52A0%u8F7D%u65F6%u51FA%u73B0%u610F%u5916%u7684%u9519%u8BEF%uFF01%u8BE5%u95EE%u9898%u5DF2%u88AB%u8BB0%u5F55%uFF0C%u6211%u4EEC%u4F1A%u5C3D%u5FEB%u89E3%u51B3%u3002%u4F60%u53EF%u4EE5%u8054%u7CFB%u571F%u8C46%u5BA2%u670D%u5BFB%u6C42%u5E2E%u52A9%u3002"))}});return}catch(e){setTimeout(arguments.callee,0);return}})()}};