if (array.prototype.push==null) { array.prototype.push=function(item) { this[this.length]=item; return this.length; } } function playerversion(_arrversion) { this.major=parseint(_arrversion[0]) || 0; this.minor=parseint(_arrversion[1]) || 0; this.rev=parseint(_arrversion[2]) || 0; this.versionisvalid=function(_needversion) { if (this.major<_needversion.major) { return false; } if (this.major>_needversion.major) { return true; } if (this.minor<_needversion.minor) { return false; } if (this.minor>_needversion.minor) { return true; } if (this.rev<_needversion.rev) { return false; } return true; } this.tostring=function() { return this.major+"."+this.minor+"."+this.rev; } } var flashutil=new function() { this.getplayerversion=function(_reqver,_xiinstall) { var _playerversion=new playerversion([0,0,0]); if (navigator.plugins && navigator.mimetypes.length) { var x = navigator.plugins["shockwave flash"]; if (x && x.description) { _playerversion=new playerversion(x.description.replace(/([a-z]|[a-z]|\s)+/, "").replace(/(\s+r|\s+b[0-9]+)/, ".").split(".")); } } else { try { var axo=new activexobject("shockwaveflash.shockwaveflash"); for (var i=3;axo!=null;i++) { axo=new activexobject("shockwaveflash.shockwaveflash." + i); _playerversion=new playerversion([i, 0, 0]); } } catch (e) {} if (_reqver && _playerversion.major>_reqver.major) { return _playerversion; } if (!_reqver || ((_reqver.minor!=0 || _reqver.rev!=0) && _playerversion.major==_reqver.major) || _playerversion.major!=6 || _xiinstall) { try { _playerversion=new playerversion(axo.getvariable("$version").split(" ")[1].split(",")); } catch (e){} } } return _playerversion; } } var util=new function() { this.getrequestparameter=function(param) { var q=document.location.search || document.location.href.hash; if (q) { var startindex=q.indexof(param+"="); var endindex=(q.indexof("&",startindex)>-1)?q.indexof("&", startindex):q.length; if (q.length>1 && startindex>-1) { return q.substring(q.indexof("=",startindex)+1,endindex); } } return ""; } } function flash(_swf,_id,_width,_height,_version,_bgcolor,_useexpressinstall,_quality,_xiredirecturl,_redirecturl,_detectkey) { this.detect_key=_detectkey?_detectkey:"detectflash"; this.skipdetect=util.getrequestparameter(this.detect_key); this.params = new object(); this.variables = new object(); this.attributes=new array(); this.useexpressinstall=_useexpressinstall; this.init=function() { this.setattribute("swf",(_swf)?_swf:""); this.setattribute("id",(_id)?_id:""); this.setattribute("width",(_width)?_width:""); this.setattribute("height",(_height)?_height:""); this.setattribute("version",(_version)?new playerversion(_version.tostring().split(".")):[0,0,0]); this.installedver=flashutil.getplayerversion(this.getattribute("version"),_useexpressinstall); this.addparam("bgcolor",(_bgcolor)?_bgcolor:"#ffffff"); this.addparam("quality",(_quality)?_quality:"high"); this.setattribute("xiredirecturl",(_xiredirecturl)?_xiredirecturl:window.location); this.setattribute("redirecturl",(_redirecturl)?_redirecturl:""); } this.setattribute=function(_name,_value) { this.attributes[_name]=_value; } this.getattribute=function(_name) { return this.attributes[_name]; } this.addparam=function(_name,_value) { this.params[_name]=_value; } this.getparams=function() { return this.params; } this.addvariable=function(_name,_value) { this.variables[_name]=_value; } this.getvariable=function(_name) { return this.variables[_name]; } this.getvariables=function() { return this.variables; } this.createparamtag=function(_name,_value) { var _p=document.createelement("param"); _p.setattribute("name",_name); _p.setattribute("value",_value); return _p; } this.getvariablepairs=function() { var variablepairs=new array(); var key; var variables=this.getvariables(); for (key in variables) { variablepairs.push(key+"="+variables[key]); } return variablepairs; } this.getflashhtml=function() { var flashnode=""; if (navigator.plugins && navigator.mimetypes && navigator.mimetypes.length) { if (this.getattribute("doexpressinstall")) { this.addvariable("mmplayertype","plugin"); } flashnode=" 0) { flashnode += "flashvars=\""+pairs+"\""; } flashnode += "/>"; } else { if (this.getattribute("doexpressinstall")) { this.addvariable("mmplayertype","activex"); } flashnode=""; flashnode += ""; var params=this.getparams(); for (var key in params) { flashnode += ""; } var pairs=this.getvariablepairs().join("&"); if (pairs.length > 0) { flashnode += ""; } flashnode += ""; } return flashnode; } this.write=function(_container) { if (this.useexpressinstall) { var expressinstallreqver=new playerversion([6,0,65]); if (this.installedver.versionisvalid(expressinstallreqver) && !this.installedver.versionisvalid(this.getattribute("version"))) { this.setattribute("doexpressinstall",true); this.addvariable("mmredirecturl",escape(this.getattribute("xiredirecturl"))); document.title=document.title.slice(0,47)+" - flash player installation"; this.addvariable("mmdoctitle",document.title); } } else { this.setattribute("doexpressinstall",false); } if (this.skipdetect || this.getattribute("doexpressinstall") || this.installedver.versionisvalid(this.getattribute("version"))) { var n=(typeof _container=="string")?document.getelementbyid(_container):_container; n.innerhtml=this.getflashhtml(); } else { alert("flash鎾斁鍣ㄧ増鏈笉澶燂紝璇蜂笅杞芥柊鐗堟挱鏀惧櫒銆?); if (this.getattribute("redirecturl")!="") { document.location.replace(this.getattribute("redirecturl")); } } } this.init(); }