var deployJava={debug:null,firefoxJavaVersion: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",browserName:null,browserName2:null,getJREs:function(){var h=new Array();if(deployJava.isPluginInstalled()){var i=deployJava.getPlugin();var g=i.jvms;for(var j=0;j<g.getLength();j++){h[j]=g.get(j).version}}else{var f=deployJava.getBrowser();if(f=="MSIE"){if(deployJava.testUsingActiveX("1.7.0")){h[0]="1.7.0"}else{if(deployJava.testUsingActiveX("1.6.0")){h[0]="1.6.0"}else{if(deployJava.testUsingActiveX("1.5.0")){h[0]="1.5.0"}else{if(deployJava.testUsingActiveX("1.4.2")){h[0]="1.4.2"}else{if(deployJava.testForMSVM()){h[0]="1.1"}}}}}}else{if(f=="Netscape Family"){deployJava.getJPIVersionUsingMimeType();if(deployJava.firefoxJavaVersion!=null){h[0]=deployJava.firefoxJavaVersion}else{if(deployJava.testUsingMimeTypes("1.7")){h[0]="1.7.0"}else{if(deployJava.testUsingMimeTypes("1.6")){h[0]="1.6.0"}else{if(deployJava.testUsingMimeTypes("1.5")){h[0]="1.5.0"}else{if(deployJava.testUsingMimeTypes("1.4.2")){h[0]="1.4.2"}else{if(deployJava.browserName2=="Safari"){if(deployJava.testUsingPluginsArray("1.7.0")){h[0]="1.7.0"}else{if(deployJava.testUsingPluginsArray("1.6")){h[0]="1.6.0"}else{if(deployJava.testUsingPluginsArray("1.5")){h[0]="1.5.0"}else{if(deployJava.testUsingPluginsArray("1.4.2")){h[0]="1.4.2"}}}}}}}}}}}}}if(deployJava.debug){for(var j=0;j<h.length;++j){alert("We claim to have detected Java SE "+h[j])}}return h},installJRE:function(c){var d=false;if(deployJava.isPluginInstalled()){if(deployJava.getPlugin().installJRE(c)){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 c=deployJava.getBrowser();var d=navigator.platform.toLowerCase();if((deployJava.EAInstallEnabled=="true")&&(d.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(c=="MSIE"){return deployJava.IEInstall()}else{if((c=="Netscape Family")&&(d.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(g,i,k){if(k=="undefined"||k==null){k="1.1"}var j="^(\\d+)(?:\\.(\\d+)(?:\\.(\\d+)(?:_(\\d+))?)?)?$";var h=k.match(j);if(deployJava.returnPage==null){deployJava.returnPage=document.location}if(h!=null){var l=deployJava.getBrowser();if((l!="?")&&("Safari"!=deployJava.browserName2)){if(deployJava.versionCheck(k+"+")){deployJava.writeAppletTag(g,i)}else{if(deployJava.installJRE(k+"+")){deployJava.refresh();location.href=document.location;deployJava.writeAppletTag(g,i)}}}else{deployJava.writeAppletTag(g,i)}}else{if(deployJava.debug){alert("Invalid minimumVersion argument to runApplet():"+k)}}},writeAppletTag:function(i,k){var m="<applet ";var n=false;for(var l in i){m+=(" "+l+'="'+i[l]+'"');if(l=="code"){n=true}}if(!n){m+=(' code="dummy"')}m+=">";document.write(m);if(k!="undefined"&&k!=null){var h=false;for(var j in k){if(j=="codebase_lookup"){h=true}m='<param name="'+j+'" value="'+k[j]+'">';document.write(m)}if(!h){document.write('<param name="codebase_lookup" value="false">')}}document.write("</applet>")},versionCheck:function(k){var p=0;var m="^(\\d+)(?:\\.(\\d+)(?:\\.(\\d+)(?:_(\\d+))?)?)?(\\*|\\+)?$";var j=k.match(m);if(j!=null){var n=true;var i=new Array();for(var o=1;o<j.length;++o){if((typeof j[o]=="string")&&(j[o]!="")){i[p]=j[o];p++}}if(i[i.length-1]=="+"){n=false;i.length--}else{if(i[i.length-1]=="*"){i.length--}}var l=deployJava.getJREs();for(var o=0;o<l.length;++o){if(deployJava.compareVersionToPattern(l[o],i,n)){return true}}return false}else{alert("Invalid versionPattern passed to versionCheck: "+k);return false}},isWebStartInstalled:function(i){var j=deployJava.getBrowser();if((j=="?")||("Safari"==deployJava.browserName2)){return true}if(i=="undefined"||i==null){i="1.4.2"}var f=false;var h="^(\\d+)(?:\\.(\\d+)(?:\\.(\\d+)(?:_(\\d+))?)?)?$";var g=i.match(h);if(g!=null){f=deployJava.versionCheck(i+"+")}else{if(deployJava.debug){alert("Invalid minimumVersion argument to isWebStartInstalled(): "+i)}f=deployJava.versionCheck("1.4.2+")}return f},getJPIVersionUsingMimeType:function(){for(var d=0;d<navigator.mimeTypes.length;++d){var f=navigator.mimeTypes[d].type;var e=f.match(/^application\/x-java-applet;jpi-version=(.*)$/);if(e!=null){deployJava.firefoxJavaVersion=e[1];break}}},launchWebStartApplication:function(b){return false},createWebStartLaunchButtonEx:function(f,d){if(deployJava.returnPage==null){deployJava.returnPage=f}var e="javascript:deployJava.launchWebStartApplication('"+f+"');";document.write('<a href="'+e+'" onMouseOver="window.status=\'\'; return true;"><img src="'+deployJava.launchButtonPNG+'" border="0" /></a>')},createWebStartLaunchButton:function(f,d){if(deployJava.returnPage==null){deployJava.returnPage=f}var e="javascript:if (!deployJava.isWebStartInstalled(&quot;"+d+"&quot;)) {if (deployJava.installLatestJRE()) {if (deployJava.launch(&quot;"+f+"&quot;)) {}}} else {if (deployJava.launch(&quot;"+f+"&quot;)) {}}";document.write('<a href="'+e+'" onMouseOver="window.status=\'\'; return true;"><img src="'+deployJava.launchButtonPNG+'" border="0" /></a>')},launch:function(b){document.location=b;return true},isPluginInstalled:function(){var b=deployJava.getPlugin();if(b&&b.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(b){deployJava.installType=b;if(deployJava.isPluginInstalled()){return deployJava.getPlugin().setInstallerType(b)}return false},setAdditionalPackages:function(b){if(deployJava.isPluginInstalled()){return deployJava.getPlugin().setAdditionalPackages(b)}return false},setEarlyAccess:function(b){deployJava.EAInstallEnabled=b},isPlugin2:function(){if(deployJava.isPluginInstalled()){if(deployJava.versionCheck("1.6.0_10+")){try{return deployJava.getPlugin().isPlugin2()}catch(b){}}}return false},allowPlugin:function(){deployJava.getBrowser();var b=("Chrome"!=deployJava.browserName2&&"Safari"!=deployJava.browserName2&&"Opera"!=deployJava.browserName2);return b},getPlugin:function(){deployJava.refresh();var b=null;if(deployJava.allowPlugin()){b=document.getElementById("deployJavaPlugin")}return b},compareVersionToPattern:function(m,q,p){var l="^(\\d+)(?:\\.(\\d+)(?:\\.(\\d+)(?:_(\\d+))?)?)?$";var k=m.match(l);if(k!=null){var n=0;var i=new Array();for(var o=1;o<k.length;++o){if((typeof k[o]=="string")&&(k[o]!="")){i[n]=k[o];n++}}var r=Math.min(i.length,q.length);if(p){for(var o=0;o<r;++o){if(i[o]!=q[o]){return false}}return true}else{for(var o=0;o<r;++o){if(i[o]<q[o]){return false}else{if(i[o]>q[o]){return true}}}return true}}else{return false}},getBrowser:function(){if(deployJava.browserName==null){var b=navigator.userAgent.toLowerCase();if(deployJava.debug){alert("userAgent -> "+b)}if(b.indexOf("msie")!=-1){deployJava.browserName="MSIE";deployJava.browserName2="MSIE"}else{if(b.indexOf("firefox")!=-1){deployJava.browserName="Netscape Family";deployJava.browserName2="Firefox"}else{if(b.indexOf("chrome")!=-1){deployJava.browserName="Netscape Family";deployJava.browserName2="Chrome"}else{if(b.indexOf("safari")!=-1){deployJava.browserName="Netscape Family";deployJava.browserName2="Safari"}else{if(b.indexOf("mozilla")!=-1){deployJava.browserName="Netscape Family";deployJava.browserName2="Other"}else{if(b.indexOf("opera")!=-1){deployJava.browserName="Netscape Family";deployJava.browserName2="Opera"}else{deployJava.browserName="?";deployJava.browserName2="unknown"}}}}}}if(deployJava.debug){alert("Detected browser name:"+deployJava.browserName+", "+deployJava.browserName2)}}return deployJava.browserName},testUsingActiveX:function(e){var f="JavaWebStart.isInstalled."+e+".0";if(!ActiveXObject){if(deployJava.debug){alert("Browser claims to be IE, but no ActiveXObject object?")}return false}try{return(new ActiveXObject(f)!=null)}catch(d){return false}},testForMSVM:function(){var c="{08B0E5C0-4FCB-11CF-AAA5-00401C608500}";if(typeof oClientCaps!="undefined"){var d=oClientCaps.getComponentVersion(c,"ComponentID");if((d=="")||(d=="5,0,5000,0")){return false}else{return true}}else{return false}},testUsingMimeTypes:function(d){if(!navigator.mimeTypes){if(deployJava.debug){alert("Browser claims to be Netscape family, but no mimeTypes[] array?")}return false}for(var f=0;f<navigator.mimeTypes.length;++f){s=navigator.mimeTypes[f].type;var e=s.match(/^application\/x-java-applet\x3Bversion=(1\.8|1\.7|1\.6|1\.5|1\.4\.2)$/);if(e!=null){if(deployJava.compareVersions(e[1],d)){return true}}}return false},testUsingPluginsArray:function(d){if((!navigator.plugins)||(!navigator.plugins.length)){return false}var e=navigator.platform.toLowerCase();for(var f=0;f<navigator.plugins.length;++f){s=navigator.plugins[f].description;if(s.search(/^Java Switchable Plug-in (Cocoa)/)!=-1){if(deployJava.compareVersions("1.5.0",d)){return true}}else{if(s.search(/^Java/)!=-1){if(e.indexOf("win")!=-1){if(deployJava.compareVersions("1.5.0",d)||deployJava.compareVersions("1.6.0",d)){return true}}}}}if(deployJava.compareVersions("1.5.0",d)){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(c,d){},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(b,a){var i=b.split(".");var j=a.split(".");for(var h=0;h<i.length;++h){i[h]=Number(i[h])}for(var h=0;h<j.length;++h){j[h]=Number(j[h])}if(i.length==2){i[2]=0}if(i[0]>j[0]){return true}if(i[0]<j[0]){return false}if(i[1]>j[1]){return true}if(i[1]<j[1]){return false}if(i[2]>j[2]){return true}if(i[2]<j[2]){return false}return true},enableAlerts:function(){deployJava.browserName=null;deployJava.debug=true},poll:function(){deployJava.refresh();var b=deployJava.getJREs();if((deployJava.preInstallJREList.length==0)&&(b.length!=0)){clearInterval(deployJava.myInterval);if(deployJava.returnPage!=null){location.href=deployJava.returnPage}}if((deployJava.preInstallJREList.length!=0)&&(b.length!=0)&&(deployJava.preInstallJREList[0]!=b[0])){clearInterval(deployJava.myInterval);if(deployJava.returnPage!=null){location.href=deployJava.returnPage}}},writePluginTag:function(){var b=deployJava.getBrowser();if(b=="MSIE"){document.write('<object classid="clsid:CAFEEFAC-DEC7-0000-0000-ABCDEFFEDCBA" id="deployJavaPlugin" width="0" height="0"></object>')}else{if(b=="Netscape Family"&&deployJava.allowPlugin()){deployJava.writeEmbedTag()}}},refresh:function(){navigator.plugins.refresh(false);var d=deployJava.getBrowser();if(d=="Netscape Family"&&deployJava.allowPlugin()){var c=document.getElementById("deployJavaPlugin");if(c==null){deployJava.writeEmbedTag()}}},writeEmbedTag:function(){var d=false;if(navigator.mimeTypes!=null){for(var c=0;c<navigator.mimeTypes.length;c++){if(navigator.mimeTypes[c].type==deployJava.mimeType){if(navigator.mimeTypes[c].enabledPlugin){document.write('<embed id="deployJavaPlugin" type="'+deployJava.mimeType+'" hidden="true" />');d=true}}}if(!d){for(var c=0;c<navigator.mimeTypes.length;c++){if(navigator.mimeTypes[c].type==deployJava.oldMimeType){if(navigator.mimeTypes[c].enabledPlugin){document.write('<embed id="deployJavaPlugin" type="'+deployJava.oldMimeType+'" hidden="true" />')}}}}}},do_initialize:function(){deployJava.writePluginTag();if(deployJava.locale==null){var c=null;if(c==null){try{c=navigator.userLanguage}catch(d){}}if(c==null){try{c=navigator.systemLanguage}catch(d){}}if(c==null){try{c=navigator.language}catch(d){}}if(c!=null){c.replace("-","_");deployJava.locale=c}}}};deployJava.do_initialize();