﻿var deployJava={debug:null,myInterval:null,preInstallJREList:null,returnPage:null,brand:null,locale:null,installType:null,EAInstallEnabled:false,EarlyAccessURL:null,getJavaURL:"http://java.sun.com/webapps/getjava/BrowserRedirect?host=java.com",appleRedirectPage:"http://www.apple.com/support/downloads/",oldMimeType:"application/npruntime-scriptable-plugin;DeploymentToolkit",mimeType:"application/java-deployment-toolkit",launchButtonPNG:"http://java.sun.com/products/jfc/tsc/articles/swing2d/webstart.png",getJREs:function(){var C=new Array();if(deployJava.isPluginInstalled()){var D=deployJava.getPlugin();var B=D.jvms;for(var E=0;E<B.getLength();E++){C[E]=B.get(E).version;}}else{var A=deployJava.getBrowser();if(A=="MSIE"){if(deployJava.testUsingActiveX("1.8.0")){C[0]="1.8.0";}else{if(deployJava.testUsingActiveX("1.7.0")){C[0]="1.7.0";}else{if(deployJava.testUsingActiveX("1.6.0")){C[0]="1.6.0";}else{if(deployJava.testUsingActiveX("1.5.0")){C[0]="1.5.0";}else{if(deployJava.testUsingActiveX("1.4.2")){C[0]="1.4.2";}else{if(deployJava.testForMSVM()){C[0]="1.1";}}}}}}}else{if(A=="Netscape Family"){if(deployJava.testUsingMimeTypes("1.8")){C[0]="1.8.0";}else{if(deployJava.testUsingMimeTypes("1.7")){C[0]="1.7.0";}else{if(deployJava.testUsingMimeTypes("1.6")){C[0]="1.6.0";}else{if(deployJava.testUsingMimeTypes("1.5")){C[0]="1.5.0";}else{if(deployJava.testUsingMimeTypes("1.4.2")){C[0]="1.4.2";}}}}}}else{if(A=="Safari"){if(deployJava.testUsingPluginsArray("1.8.0")){C[0]="1.8.0";}else{if(deployJava.testUsingPluginsArray("1.7.0")){C[0]="1.7.0";}else{if(deployJava.testUsingPluginsArray("1.6.0")){C[0]="1.6.0";}else{if(deployJava.testUsingPluginsArray("1.5.0")){C[0]="1.5.0";}else{if(deployJava.testUsingPluginsArray("1.4.2")){C[0]="1.4.2";}}}}}}}}}if(deployJava.debug){for(var E=0;E<C.length;++E){alert("We claim to have detected Java SE "+C[E]);}}return C;},installJRE:function(A){var B=false;if(deployJava.isPluginInstalled()){if(deployJava.getPlugin().installJRE(A)){deployJava.refresh();if(deployJava.returnPage!=null){document.location=deployJava.returnPage;}return true;}else{return false;}}else{return deployJava.installLatestJRE();}},installLatestJRE:function(){if(deployJava.isPluginInstalled()){if(deployJava.getPlugin().installLatestJRE()){deployJava.refresh();if(deployJava.returnPage!=null){document.location=deployJava.returnPage;}return true;}else{return false;}}else{var A=deployJava.getBrowser();var B=navigator.platform.toLowerCase();if((deployJava.EAInstallEnabled=="true")&&(B.indexOf("win")!=-1)&&(deployJava.EarlyAccessURL!=null)){deployJava.preInstallJREList=deployJava.getJREs();if(deployJava.returnPage!=null){deployJava.myInterval=setInterval("deployJava.poll()",3000);}location.href=deployJava.EarlyAccessURL;return false;}else{if(A=="MSIE"){return deployJava.IEInstall();}else{if((A=="Netscape Family")&&(B.indexOf("win32")!=-1)){return deployJava.FFInstall();}else{location.href=deployJava.getJavaURL+((deployJava.returnPage!=null)?("&returnPage="+deployJava.returnPage):"")+((deployJava.locale!=null)?("&locale="+deployJava.locale):"")+((deployJava.brand!=null)?("&brand="+deployJava.brand):"");}}return false;}}},runApplet:function(F,E,A){if(A=="undefined"||A==null){A="1.1";}var D="^(\\d+)(?:\\.(\\d+)(?:\\.(\\d+)(?:_(\\d+))?)?)?$";var B=A.match(D);if(deployJava.returnPage==null){deployJava.returnPage=document.location;}if(B!=null){var C=deployJava.getBrowser();if((C!="?")&&(C!="Safari")){if(deployJava.versionCheck(A+"+")){deployJava.writeAppletTag(F,E);}else{if(deployJava.installJRE(A+"+")){deployJava.refresh();location.href=document.location;deployJava.writeAppletTag(F,E);}}}else{deployJava.writeAppletTag(F,E);}}else{if(deployJava.debug){alert("Invalid minimumVersion argument to runApplet():"+A);}}},writeAppletTag:function(F,E){var B="<applet ";for(var A in F){B+=(" "+A+'="'+F[A]+'"');}B+=">";document.write(B);if(E!="undefined"&&E!=null){var D=false;for(var C in E){if(C=="codebase_lookup"){D=true;}B='<param name="'+C+'" value="'+E[C]+'">';document.write(B);}if(!D){document.write('<param name="codebase_lookup" value="false">');}}document.write("</applet>");},versionCheck:function(E){var D=0;var G="^(\\d+)(?:\\.(\\d+)(?:\\.(\\d+)(?:_(\\d+))?)?)?(\\*|\\+)?$";var H=E.match(G);if(H!=null){var F=true;var B=new Array();for(var A=1;A<H.length;++A){if((typeof H[A]=="string")&&(H[A]!="")){B[D]=H[A];D++;}}if(B[B.length-1]=="+"){F=false;B.length--;}else{if(B[B.length-1]=="*"){B.length--;}}var C=deployJava.getJREs();for(var A=0;A<C.length;++A){if(deployJava.compareVersionToPattern(C[A],B,F)){return true;}}return false;}else{alert("Invalid versionPattern passed to versionCheck: "+E);return false;}},isWebStartInstalled:function(A){var B=deployJava.getBrowser();if((B=="?")||(B=="Safari")){return true;}if(A=="undefined"||A==null){A="1.4.2";}var C=false;var E="^(\\d+)(?:\\.(\\d+)(?:\\.(\\d+)(?:_(\\d+))?)?)?$";var D=A.match(E);if(D!=null){C=deployJava.versionCheck(A+"+");}else{if(deployJava.debug){alert("Invalid minimumVersion argument to isWebStartInstalled(): "+A);}C=deployJava.versionCheck("1.4.2+");}return C;},createWebStartLaunchButton:function(C,A){if(deployJava.returnPage==null){deployJava.returnPage=C;}var B="javascript:if (!deployJava.isWebStartInstalled(&quot;"+A+"&quot;)) {if (deployJava.installLatestJRE()) {if (deployJava.launch(&quot;"+C+"&quot;)) {}}} else {if (deployJava.launch(&quot;"+C+"&quot;)) {}}";document.write('<a href="'+B+'" onMouseOver="window.status=\'\'; return true;"><img src="'+deployJava.launchButtonPNG+'" border="0" /></a>');},launch:function(A){if(deployJava.isPluginInstalled()){return deployJava.getPlugin().launch(A);}else{document.location=A;return true;}},isPluginInstalled:function(){var A=deployJava.getPlugin();if(A&&A.jvms){return true;}else{return false;}},isAutoUpdateEnabled:function(){if(deployJava.isPluginInstalled()){return deployJava.getPlugin().isAutoUpdateEnabled();}return false;},setAutoUpdateEnabled:function(){if(deployJava.isPluginInstalled()){return deployJava.getPlugin().setAutoUpdateEnabled();}return false;},setInstallerType:function(A){deployJava.installType=A;if(deployJava.isPluginInstalled()){return deployJava.getPlugin().setInstallerType(A);}return false;},setAdditionalPackages:function(A){if(deployJava.isPluginInstalled()){return deployJava.getPlugin().setAdditionalPackages(A);}return false;},setEarlyAccess:function(A){deployJava.EAInstallEnabled=A;},isPlugin2:function(){if(deployJava.isPluginInstalled()){if(deployJava.versionCheck("1.6.0_10+")){try{return deployJava.getPlugin().isPlugin2();}catch(A){}}}return false;},getPlugin:function(){deployJava.refresh();var A=document.getElementById("deployJavaPlugin");return A;},compareVersionToPattern:function(G,B,D){var E="^(\\d+)(?:\\.(\\d+)(?:\\.(\\d+)(?:_(\\d+))?)?)?$";var F=G.match(E);if(F!=null){var C=0;var I=new Array();for(var A=1;A<F.length;++A){if((typeof F[A]=="string")&&(F[A]!="")){I[C]=F[A];C++;}}var H=Math.min(I.length,B.length);if(D){for(var A=0;A<H;++A){if(I[A]!=B[A]){return false;}}return true;}else{for(var A=0;A<H;++A){if(I[A]<B[A]){return false;}else{if(I[A]>B[A]){return true;}}}return true;}}else{return false;}},getBrowser:function(){var A=navigator.userAgent.toLowerCase();if(deployJava.debug){alert("userAgent -> "+A);}if((navigator.vendor)&&(navigator.vendor.toLowerCase().indexOf("apple")!=-1)&&(A.indexOf("safari")!=-1)){if(deployJava.debug){alert('We claim to have detected "Safari".');}return"Safari";}else{if(A.indexOf("msie")!=-1){if(deployJava.debug){alert('We claim to have detected "IE".');}return"MSIE";}else{if((A.indexOf("mozilla")!=-1)||(A.indexOf("firefox")!=-1)){if(deployJava.debug){alert("We claim to have detected a Netscape family browser.");}return"Netscape Family";}else{if(deployJava.debug){alert("We claim to have failed to detect a browser.");}return"?";}}}},testUsingActiveX:function(B){var C="JavaWebStart.isInstalled."+B+".0";if(!ActiveXObject){if(deployJava.debug){alert("Browser claims to be IE, but no ActiveXObject object?");}return false;}try{return(new ActiveXObject(C)!=null);}catch(A){return false;}},testForMSVM:function(){var A="{08B0E5C0-4FCB-11CF-AAA5-00401C608500}";if(typeof oClientCaps!="undefined"){var B=oClientCaps.getComponentVersion(A,"ComponentID");if((B=="")||(B=="5,0,5000,0")){return false;}else{return true;}}else{return false;}},testUsingMimeTypes:function(B){if(!navigator.mimeTypes){if(deployJava.debug){alert("Browser claims to be Netscape family, but no mimeTypes[] array?");}return false;}for(var C=0;C<navigator.mimeTypes.length;++C){s=navigator.mimeTypes[C].type;var A=s.match(/^application\/x-java-applet\x3Bversion=(1\.8|1\.7|1\.6|1\.5|1\.4\.2)$/);if(A!=null){if(deployJava.compareVersions(A[1],B)){return true;}}}return false;},testUsingPluginsArray:function(A){if((!navigator.plugins)||(!navigator.plugins.length)){return false;}var B=navigator.platform.toLowerCase();for(var C=0;C<navigator.plugins.length;++C){s=navigator.plugins[C].description;if(s.search(/^Java Switchable Plug-in (Cocoa)/)!=-1){if(deployJava.compareVersions("1.5.0",A)){return true;}}else{if(s.search(/^Java/)!=-1){if(B.indexOf("win")!=-1){if(deployJava.compareVersions("1.5.0",A)||deployJava.compareVersions("1.6.0",A)){return true;}}}}}if(deployJava.compareVersions("1.5.0",A)){return true;}return false;},IEInstall:function(){location.href=deployJava.getJavaURL+((deployJava.returnPage!=null)?("&returnPage="+deployJava.returnPage):"")+((deployJava.locale!=null)?("&locale="+deployJava.locale):"")+((deployJava.brand!=null)?("&brand="+deployJava.brand):"")+((deployJava.installType!=null)?("&type="+deployJava.installType):"");return false;},done:function(A,B){},FFInstall:function(){location.href=deployJava.getJavaURL+((deployJava.returnPage!=null)?("&returnPage="+deployJava.returnPage):"")+((deployJava.locale!=null)?("&locale="+deployJava.locale):"")+((deployJava.brand!=null)?("&brand="+deployJava.brand):"")+((deployJava.installType!=null)?("&type="+deployJava.installType):"");return false;},compareVersions:function(D,E){var B=D.split(".");var C=E.split(".");for(var A=0;A<B.length;++A){B[A]=Number(B[A]);}for(var A=0;A<C.length;++A){C[A]=Number(C[A]);}if(B.length==2){B[2]=0;}if(B[0]>C[0]){return true;}if(B[0]<C[0]){return false;}if(B[1]>C[1]){return true;}if(B[1]<C[1]){return false;}if(B[2]>C[2]){return true;}if(B[2]<C[2]){return false;}return true;},enableAlerts:function(){deployJava.debug=true;},poll:function(){deployJava.refresh();var A=deployJava.getJREs();if((deployJava.preInstallJREList.length==0)&&(A.length!=0)){clearInterval(deployJava.myInterval);if(deployJava.returnPage!=null){location.href=deployJava.returnPage;}}if((deployJava.preInstallJREList.length!=0)&&(A.length!=0)&&(deployJava.preInstallJREList[0]!=A[0])){clearInterval(deployJava.myInterval);if(deployJava.returnPage!=null){location.href=deployJava.returnPage;}}},writePluginTag:function(){var A=deployJava.getBrowser();if(A=="MSIE"){document.write('<object classid="clsid:CAFEEFAC-DEC7-0000-0000-ABCDEFFEDCBA" id="deployJavaPlugin" width="0" height="0"></object>');}else{if(A=="Netscape Family"){deployJava.writeEmbedTag();}}},refresh:function(){navigator.plugins.refresh(false);var A=deployJava.getBrowser();if(A=="Netscape Family"){var B=document.getElementById("deployJavaPlugin");if(B==null){deployJava.writeEmbedTag();}}},writeEmbedTag:function(){var A=false;if(navigator.mimeTypes!=null){for(var B=0;B<navigator.mimeTypes.length;B++){if(navigator.mimeTypes[B].type==deployJava.mimeType){if(navigator.mimeTypes[B].enabledPlugin){document.write('<embed id="deployJavaPlugin" type="'+deployJava.mimeType+'" hidden="true" />');A=true;}}}if(!A){for(var B=0;B<navigator.mimeTypes.length;B++){if(navigator.mimeTypes[B].type==deployJava.oldMimeType){if(navigator.mimeTypes[B].enabledPlugin){document.write('<embed id="deployJavaPlugin" type="'+deployJava.oldMimeType+'" hidden="true" />');}}}}}},do_initialize:function(){deployJava.writePluginTag();if(deployJava.locale==null){var A=null;if(A==null){try{A=navigator.userLanguage;}catch(B){}}if(A==null){try{A=navigator.systemLanguage;}catch(B){}}if(A==null){try{A=navigator.language;}catch(B){}}if(A!=null){A.replace("-","_");deployJava.locale=A;}}}};deployJava.do_initialize();
if(typeof(Sys)!=='undefined')Sys.Application.notifyScriptLoaded();