| 12345678910111213141516171819202122232425262728 |
- var version_regex_base="^(\\d+)(?:\\.(\\d+)(?:\\.(\\d+)(?:[_\\.](\\d+))?)?)?",version_regex_strict=version_regex_base+"$",version_regex_with_family_modifier=version_regex_base+"(\\*|\\+)?$",deployJava=function(){function j(a){l.debug&&(console.log?console.log(a):alert(a))}function m(a){if(null==a||0==a.length)return"http://java.com/dt-redirect";"&"==a.charAt(0)&&(a=a.substring(1,a.length));return"http://java.com/dt-redirect?"+a}var h=["id","class","title","style"];"classid codebase codetype data type archive declare standby height width usemap name tabindex align border hspace vspace".split(" ").concat(h,
- ["lang","dir"],"onclick ondblclick onmousedown onmouseup onmouseover onmousemove onmouseout onkeypress onkeydown onkeyup".split(" "));var p="codebase code name archive object width height alt align hspace vspace".split(" ").concat(h),n;try{n=-1!=document.location.protocol.indexOf("http")?"//java.com/js/webstart.png":"http://java.com/js/webstart.png"}catch(q){n="http://java.com/js/webstart.png"}var l={debug:null,version:"20120801",firefoxJavaVersion:null,myInterval:null,preInstallJREList:null,returnPage:null,
- brand:null,locale:null,installType:null,EAInstallEnabled:!1,EarlyAccessURL:null,oldMimeType:"application/npruntime-scriptable-plugin;DeploymentToolkit",mimeType:"application/java-deployment-toolkit",launchButtonPNG:n,browserName:null,browserName2:null,getJREs:function(){var a=[];if(this.isPluginInstalled())for(var b=this.getPlugin().jvms,c=0;c<b.getLength();c++)a[c]=b.get(c).version;else b=this.getBrowser(),"MSIE"==b?this.testUsingActiveX("1.7.0")?a[0]="1.7.0":this.testUsingActiveX("1.6.0")?a[0]=
- "1.6.0":this.testUsingActiveX("1.5.0")?a[0]="1.5.0":this.testUsingActiveX("1.4.2")?a[0]="1.4.2":this.testForMSVM()&&(a[0]="1.1"):"Netscape Family"==b&&(this.getJPIVersionUsingMimeType(),null!=this.firefoxJavaVersion?a[0]=this.firefoxJavaVersion:this.testUsingMimeTypes("1.7")?a[0]="1.7.0":this.testUsingMimeTypes("1.6")?a[0]="1.6.0":this.testUsingMimeTypes("1.5")?a[0]="1.5.0":this.testUsingMimeTypes("1.4.2")?a[0]="1.4.2":"Safari"==this.browserName2&&(this.testUsingPluginsArray("1.7.0")?a[0]="1.7.0":
- this.testUsingPluginsArray("1.6")?a[0]="1.6.0":this.testUsingPluginsArray("1.5")?a[0]="1.5.0":this.testUsingPluginsArray("1.4.2")&&(a[0]="1.4.2")));if(this.debug)for(c=0;c<a.length;++c)j("[getJREs()] We claim to have detected Java SE "+a[c]);return a},installJRE:function(a,b){if(this.isPluginInstalled()&&this.isAutoInstallEnabled(a)){var c=!1;if(c=this.isCallbackSupported()?this.getPlugin().installJRE(a,b):this.getPlugin().installJRE(a))this.refresh(),null!=this.returnPage&&(document.location=this.returnPage);
- return c}return this.installLatestJRE()},isAutoInstallEnabled:function(a){if(!this.isPluginInstalled())return!1;"undefined"==typeof a&&(a=null);var b;if("MSIE"!=deployJava.browserName||deployJava.compareVersionToPattern(deployJava.getPlugin().version,["10","0","0"],!1,!0))b=!0;else if(null==a)b=!1;else{b="1.6.0_33+";if(null==b||0==b.length)b=!0;else{var c=b.charAt(b.length-1);"+"!=c&&("*"!=c&&-1!=b.indexOf("_")&&"_"!=c)&&(b+="*",c="*");b=b.substring(0,b.length-1);if(0<b.length){var d=b.charAt(b.length-
- 1);if("."==d||"_"==d)b=b.substring(0,b.length-1)}b="*"==c?0==a.indexOf(b):"+"==c?b<=a:!1}b=!b}return b},isCallbackSupported:function(){return this.isPluginInstalled()&&this.compareVersionToPattern(this.getPlugin().version,["10","2","0"],!1,!0)},installLatestJRE:function(a){if(this.isPluginInstalled()&&this.isAutoInstallEnabled()){var b=!1;if(b=this.isCallbackSupported()?this.getPlugin().installLatestJRE(a):this.getPlugin().installLatestJRE())this.refresh(),null!=this.returnPage&&(document.location=
- this.returnPage);return b}a=this.getBrowser();b=navigator.platform.toLowerCase();if("true"==this.EAInstallEnabled&&-1!=b.indexOf("win")&&null!=this.EarlyAccessURL)this.preInstallJREList=this.getJREs(),null!=this.returnPage&&(this.myInterval=setInterval("deployJava.poll()",3E3)),location.href=this.EarlyAccessURL;else{if("MSIE"==a)return this.IEInstall();if("Netscape Family"==a&&-1!=b.indexOf("win32"))return this.FFInstall();location.href=m((null!=this.returnPage?"&returnPage="+this.returnPage:"")+
- (null!=this.locale?"&locale="+this.locale:"")+(null!=this.brand?"&brand="+this.brand:""))}return!1},runApplet:function(a,b,c){if("undefined"==c||null==c)c="1.1";var d=c.match(version_regex_strict);null==this.returnPage&&(this.returnPage=document.location);null!=d?"?"!=this.getBrowser()?this.versionCheck(c+"+")?this.writeAppletTag(a,b):this.installJRE(c+"+")&&(this.refresh(),location.href=document.location,this.writeAppletTag(a,b)):this.writeAppletTag(a,b):j("[runApplet()] Invalid minimumVersion argument to runApplet():"+
- c)},writeAppletTag:function(a,b){var c="<applet ",d="",e=!0;if(null==b||"object"!=typeof b)b={};for(var f in a){var g;a:{g=f.toLowerCase();for(var h=p.length,j=0;j<h;j++)if(p[j]===g){g=!0;break a}g=!1}g?(c+=" "+f+'="'+a[f]+'"',"code"==f&&(e=!1)):b[f]=a[f]}f=!1;for(var k in b){"codebase_lookup"==k&&(f=!0);if("object"==k||"java_object"==k||"java_code"==k)e=!1;d+='<param name="'+k+'" value="'+b[k]+'"/>'}f||(d+='<param name="codebase_lookup" value="false"/>');e&&(c+=' code="dummy"');document.write(c+
- ">\n"+d+"\n</applet>")},versionCheck:function(a){var b=0,c=a.match(version_regex_with_family_modifier);if(null!=c){for(var d=a=!1,e=[],f=1;f<c.length;++f)"string"==typeof c[f]&&""!=c[f]&&(e[b]=c[f],b++);"+"==e[e.length-1]?(d=!0,a=!1,e.length--):"*"==e[e.length-1]?(d=!1,a=!0,e.length--):4>e.length&&(d=!1,a=!0);b=this.getJREs();for(f=0;f<b.length;++f)if(this.compareVersionToPattern(b[f],e,a,d))return!0}else b="Invalid versionPattern passed to versionCheck: "+a,j("[versionCheck()] "+b),alert(b);return!1},
- isWebStartInstalled:function(a){if("?"==this.getBrowser())return!0;if("undefined"==a||null==a)a="1.4.2";var b=!1;null!=a.match(version_regex_strict)?b=this.versionCheck(a+"+"):(j("[isWebStartInstaller()] Invalid minimumVersion argument to isWebStartInstalled(): "+a),b=this.versionCheck("1.4.2+"));return b},getJPIVersionUsingMimeType:function(){for(var a=0;a<navigator.mimeTypes.length;++a){var b=navigator.mimeTypes[a].type.match(/^application\/x-java-applet;jpi-version=(.*)$/);if(null!=b&&(this.firefoxJavaVersion=
- b[1],"Opera"!=this.browserName2))break}},launchWebStartApplication:function(a){navigator.userAgent.toLowerCase();this.getJPIVersionUsingMimeType();if(!1==this.isWebStartInstalled("1.7.0")&&(!1==this.installJRE("1.7.0+")||!1==this.isWebStartInstalled("1.7.0")))return!1;var b=null;document.documentURI&&(b=document.documentURI);null==b&&(b=document.URL);var c=this.getBrowser(),d;"MSIE"==c?d='<object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" width="0" height="0"><PARAM name="launchjnlp" value="'+
- a+'"><PARAM name="docbase" value="'+encodeURIComponent(b)+'"></object>':"Netscape Family"==c&&(d='<embed type="application/x-java-applet;jpi-version='+this.firefoxJavaVersion+'" width="0" height="0" launchjnlp="'+a+'"docbase="'+encodeURIComponent(b)+'" />');"undefined"==document.body||null==document.body?(document.write(d),document.location=b):(a=document.createElement("div"),a.id="div1",a.style.position="relative",a.style.left="-10000px",a.style.margin="0px auto",a.className="dynamicDiv",a.innerHTML=
- d,document.body.appendChild(a))},createWebStartLaunchButtonEx:function(a){null==this.returnPage&&(this.returnPage=a);document.write('<a href="'+("javascript:deployJava.launchWebStartApplication('"+a+"');")+'" onMouseOver="window.status=\'\'; return true;"><img src="'+this.launchButtonPNG+'" border="0" /></a>')},createWebStartLaunchButton:function(a,b){null==this.returnPage&&(this.returnPage=a);document.write('<a href="'+("javascript:if (!deployJava.isWebStartInstalled(""+b+"")) {if (deployJava.installLatestJRE()) {if (deployJava.launch(""+
- a+"")) {}}} else {if (deployJava.launch(""+a+"")) {}}")+'" onMouseOver="window.status=\'\'; return true;"><img src="'+this.launchButtonPNG+'" border="0" /></a>')},launch:function(a){document.location=a;return!0},isPluginInstalled:function(){var a=this.getPlugin();return a&&a.jvms?!0:!1},isAutoUpdateEnabled:function(){return this.isPluginInstalled()?this.getPlugin().isAutoUpdateEnabled():!1},setAutoUpdateEnabled:function(){return this.isPluginInstalled()?this.getPlugin().setAutoUpdateEnabled():
- !1},setInstallerType:function(a){this.installType=a;return this.isPluginInstalled()?this.getPlugin().setInstallerType(a):!1},setAdditionalPackages:function(a){return this.isPluginInstalled()?this.getPlugin().setAdditionalPackages(a):!1},setEarlyAccess:function(a){this.EAInstallEnabled=a},isPlugin2:function(){if(this.isPluginInstalled()&&this.versionCheck("1.6.0_10+"))try{return this.getPlugin().isPlugin2()}catch(a){}return!1},allowPlugin:function(){this.getBrowser();return"Safari"!=this.browserName2&&
- "Opera"!=this.browserName2},getPlugin:function(){this.refresh();var a=null;this.allowPlugin()&&(a=document.getElementById("deployJavaPlugin"));return a},compareVersionToPattern:function(a,b,c,d){if(void 0==a||void 0==b)return!1;var e=a.match(version_regex_strict);if(null!=e){var f=0;a=[];for(var g=1;g<e.length;++g)"string"==typeof e[g]&&""!=e[g]&&(a[f]=e[g],f++);e=Math.min(a.length,b.length);if(d){for(g=0;g<e;++g){c=parseInt(a[g]);d=parseInt(b[g]);if(c<d)return!1;if(c>d)break}return!0}for(g=0;g<e;++g)if(a[g]!=
- b[g])return!1;return c?!0:a.length==b.length}return!1},getBrowser:function(){if(null==this.browserName){var a=navigator.userAgent.toLowerCase();j("[getBrowser()] navigator.userAgent.toLowerCase() -> "+a);-1!=a.indexOf("msie")&&-1==a.indexOf("opera")?this.browserName2=this.browserName="MSIE":-1!=a.indexOf("trident")||-1!=a.indexOf("Trident")?this.browserName2=this.browserName="MSIE":-1!=a.indexOf("iphone")?(this.browserName="Netscape Family",this.browserName2="iPhone"):-1!=a.indexOf("firefox")&&-1==
- a.indexOf("opera")?(this.browserName="Netscape Family",this.browserName2="Firefox"):-1!=a.indexOf("chrome")?(this.browserName="Netscape Family",this.browserName2="Chrome"):-1!=a.indexOf("safari")?(this.browserName="Netscape Family",this.browserName2="Safari"):-1!=a.indexOf("mozilla")&&-1==a.indexOf("opera")?(this.browserName="Netscape Family",this.browserName2="Other"):-1!=a.indexOf("opera")?(this.browserName="Netscape Family",this.browserName2="Opera"):(this.browserName="?",this.browserName2="unknown");
- j("[getBrowser()] Detected browser name:"+this.browserName+", "+this.browserName2)}return this.browserName},testUsingActiveX:function(a){a="JavaWebStart.isInstalled."+a+".0";if("undefined"==typeof ActiveXObject||!ActiveXObject)return j("[testUsingActiveX()] Browser claims to be IE, but no ActiveXObject object?"),!1;try{return null!=new ActiveXObject(a)}catch(b){return!1}},testForMSVM:function(){if("undefined"!=typeof oClientCaps){var a=oClientCaps.getComponentVersion("{08B0E5C0-4FCB-11CF-AAA5-00401C608500}",
- "ComponentID");return""==a||"5,0,5000,0"==a?!1:!0}return!1},testUsingMimeTypes:function(a){if(!navigator.mimeTypes)return j("[testUsingMimeTypes()] Browser claims to be Netscape family, but no mimeTypes[] array?"),!1;for(var b=0;b<navigator.mimeTypes.length;++b){s=navigator.mimeTypes[b].type;var c=s.match(/^application\/x-java-applet\x3Bversion=(1\.8|1\.7|1\.6|1\.5|1\.4\.2)$/);if(null!=c&&this.compareVersions(c[1],a))return!0}return!1},testUsingPluginsArray:function(a){if(!navigator.plugins||!navigator.plugins.length)return!1;
- for(var b=navigator.platform.toLowerCase(),c=0;c<navigator.plugins.length;++c)if(s=navigator.plugins[c].description,-1!=s.search(/^Java Switchable Plug-in (Cocoa)/)){if(this.compareVersions("1.5.0",a))return!0}else if(-1!=s.search(/^Java/)&&-1!=b.indexOf("win")&&(this.compareVersions("1.5.0",a)||this.compareVersions("1.6.0",a)))return!0;return this.compareVersions("1.5.0",a)?!0:!1},IEInstall:function(){location.href=m((null!=this.returnPage?"&returnPage="+this.returnPage:"")+(null!=this.locale?"&locale="+
- this.locale:"")+(null!=this.brand?"&brand="+this.brand:""));return!1},done:function(){},FFInstall:function(){location.href=m((null!=this.returnPage?"&returnPage="+this.returnPage:"")+(null!=this.locale?"&locale="+this.locale:"")+(null!=this.brand?"&brand="+this.brand:"")+(null!=this.installType?"&type="+this.installType:""));return!1},compareVersions:function(a,b){for(var c=a.split("."),d=b.split("."),e=0;e<c.length;++e)c[e]=Number(c[e]);for(e=0;e<d.length;++e)d[e]=Number(d[e]);2==c.length&&(c[2]=
- 0);return c[0]>d[0]?!0:c[0]<d[0]?!1:c[1]>d[1]?!0:c[1]<d[1]?!1:c[2]>d[2]?!0:c[2]<d[2]?!1:!0},enableAlerts:function(){this.browserName=null;this.debug=!0},poll:function(){this.refresh();var a=this.getJREs();0==this.preInstallJREList.length&&0!=a.length&&(clearInterval(this.myInterval),null!=this.returnPage&&(location.href=this.returnPage));0!=this.preInstallJREList.length&&(0!=a.length&&this.preInstallJREList[0]!=a[0])&&(clearInterval(this.myInterval),null!=this.returnPage&&(location.href=this.returnPage))},
- writePluginTag:function(){var a=this.getBrowser();"MSIE"==a?document.write('<object classid="clsid:CAFEEFAC-DEC7-0000-0001-ABCDEFFEDCBA" id="deployJavaPlugin" width="0" height="0"></object>'):"Netscape Family"==a&&this.allowPlugin()&&this.writeEmbedTag()},refresh:function(){navigator.plugins.refresh(!1);"Netscape Family"==this.getBrowser()&&this.allowPlugin()&&null==document.getElementById("deployJavaPlugin")&&this.writeEmbedTag()},writeEmbedTag:function(){var a=!1;if(null!=navigator.mimeTypes){for(var b=
- 0;b<navigator.mimeTypes.length;b++)navigator.mimeTypes[b].type==this.mimeType&&navigator.mimeTypes[b].enabledPlugin&&(document.write('<embed id="deployJavaPlugin" type="'+this.mimeType+'" hidden="true" />'),a=!0);if(!a)for(b=0;b<navigator.mimeTypes.length;b++)navigator.mimeTypes[b].type==this.oldMimeType&&navigator.mimeTypes[b].enabledPlugin&&document.write('<embed id="deployJavaPlugin" type="'+this.oldMimeType+'" hidden="true" />')}}};l.writePluginTag();if(null==l.locale){h=null;if(null==h)try{h=
- navigator.userLanguage}catch(r){}if(null==h)try{h=navigator.systemLanguage}catch(t){}if(null==h)try{h=navigator.language}catch(u){}null!=h&&(h.replace("-","_"),l.locale=h)}return l}();
|