summaryrefslogtreecommitdiff
path: root/BKUOnline
diff options
context:
space:
mode:
Diffstat (limited to 'BKUOnline')
-rw-r--r--BKUOnline/pom.xml22
-rw-r--r--BKUOnline/src/main/java/at/gv/egiz/stal/service/impl/STALRequestBrokerImpl.java1
-rw-r--r--BKUOnline/src/main/webapp/SLRequestForm.html40
-rw-r--r--BKUOnline/src/main/webapp/applet.jsp13
-rw-r--r--BKUOnline/src/main/webapp/index.html3
-rw-r--r--BKUOnline/src/main/webapp/js/deployJava_orig.js725
6 files changed, 783 insertions, 21 deletions
diff --git a/BKUOnline/pom.xml b/BKUOnline/pom.xml
index 408ce195..3d504a8d 100644
--- a/BKUOnline/pom.xml
+++ b/BKUOnline/pom.xml
@@ -128,6 +128,15 @@
<version>1.2.8-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
+ <!--
+ | Transitive dependency from BKUViewer,
+ | set excludeTransitive=false in unpack-fonts
+ <dependency>
+ <groupId>at.gv.egiz</groupId>
+ <artifactId>BKUFonts</artifactId>
+ <version>1.0</version>
+ <scope>provided</scope>
+ </dependency-->
<dependency>
<groupId>iaik</groupId>
<artifactId>iaik_jce_me4se</artifactId>
@@ -160,6 +169,19 @@
</configuration>
</execution>
<execution>
+ <id>unpack-fonts</id>
+ <goals>
+ <goal>unpack-dependencies</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>${project.build.directory}/${project.build.finalName}/applet</outputDirectory>
+ <includeGroupIds>at.gv.egiz</includeGroupIds>
+ <includeArtifactIds>BKUFonts</includeArtifactIds>
+ <excludes>META-INF/,LICENSE</excludes>
+ <excludeTransitive>false</excludeTransitive>
+ </configuration>
+ </execution>
+ <execution>
<id>copy-certificates</id>
<goals>
<!-- unpack does not work with release:prepare -->
diff --git a/BKUOnline/src/main/java/at/gv/egiz/stal/service/impl/STALRequestBrokerImpl.java b/BKUOnline/src/main/java/at/gv/egiz/stal/service/impl/STALRequestBrokerImpl.java
index 9a9bd444..a2447ab7 100644
--- a/BKUOnline/src/main/java/at/gv/egiz/stal/service/impl/STALRequestBrokerImpl.java
+++ b/BKUOnline/src/main/java/at/gv/egiz/stal/service/impl/STALRequestBrokerImpl.java
@@ -33,7 +33,6 @@ import at.gv.egiz.stalx.service.translator.STALXTranslationHandler;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
-import java.util.Locale;
import javax.xml.bind.JAXBElement;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
diff --git a/BKUOnline/src/main/webapp/SLRequestForm.html b/BKUOnline/src/main/webapp/SLRequestForm.html
index f705a0cb..24a88a1e 100644
--- a/BKUOnline/src/main/webapp/SLRequestForm.html
+++ b/BKUOnline/src/main/webapp/SLRequestForm.html
@@ -20,7 +20,7 @@
<title>Security-Layer v1.2 Request Formular</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="shortcut icon" href="img/chip16.ico" type="image/x-icon">
- <script language="JavaScript">
+ <script language="JavaScript" type="text/javascript">
<!--
function setAppletDimension(width, height)
{
@@ -34,13 +34,10 @@
//-->
</script>
<style type="text/css" media="all">@import "css/main.css";</style>
-
- </head>
- <body>
- <h1>Security-Layer v1.2 Request Formular</h1>
<style type="text/css">
fieldset {
padding: 1em;
+ margin: 1em;
font: 80%/ 1 sans-serif;
background-color: #F2EFE9;
padding-left: 5em;
@@ -72,6 +69,9 @@
}
</style>
+ </head>
+ <body>
+ <h1>Security-Layer v1.2 Request Formular</h1>
<p>
<form action="./http-security-layer-request" method="Post"
enctype="application/x-www-form-urlencoded" name="slform">
@@ -110,7 +110,7 @@
<sl:KeyboxIdentifier>SecureSignatureKeypair</sl:KeyboxIdentifier>
<sl:DataObjectInfo Structure="enveloping">
<sl:DataObject>
- <sl:XMLContent>Ich bin ein einfacher Text.</sl:XMLContent>
+ <sl:XMLContent>Ich bin ein einfacher Text. llöäü߀</sl:XMLContent>
</sl:DataObject>
<sl:TransformsInfo>
<sl:FinalDataMetaInfo>
@@ -120,7 +120,27 @@
</sl:DataObjectInfo>
<sl:DataObjectInfo Structure="enveloping">
<sl:DataObject>
- <sl:XMLContent><html xmlns="http://www.w3.org/1999/xhtml"><head><title>TestXHTML</title><style/></head><body><p>Ich bin ein einfacher Text.</p></body></html></sl:XMLContent>
+ <sl:XMLContent>
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>TestXHTML</title>
+ <style type="text/css" media="screen">
+ .heading { font-size: large; font-weight: bold; }
+ .content1 { }
+ .content2 { font-style: italic; }
+ .content3 { font-family: serif; }
+ .footer { font-size: small; }
+ </style>
+ </head>
+ <body>
+ <h3 class="heading">Heading3 large bold llöäü߀</h3>
+ <p class="content1">Ich bin ein einfacher Text. llöäü߀</p>
+ <p class="content2">Ich bin ein einfacher Text. llöäü߀</p>
+ <p class="content3">Ich bin ein einfacher Text. llöäü߀</p>
+ <p class="footer">Ich bin ein einfacher Text. llöäü߀</p>
+ </body>
+</html>
+ </sl:XMLContent>
</sl:DataObject>
<sl:TransformsInfo>
<sl:FinalDataMetaInfo>
@@ -145,7 +165,8 @@
</sl10:BinaryFileParameters>
</sl10:InfoboxUpdateRequest>
-->
-
+ </fieldset>
+ <fieldset><legend>Request Parameters</legend>
<p>
<label for="appletGuiStyle">GUI Style</label>
<input type="radio" name="appletGuiStyle" value="tiny" onclick="setAppletDimension(152, 145)">tiny
@@ -185,8 +206,9 @@
name="StylesheetURL" value="" id="StylesheetURL"></p>
<p>
-->
+
</fieldset>
- <fieldset class="submit"><input type="submit" class="submit"></fieldset>
+ <fieldset class="submit"><input type="submit" class="submit"/></fieldset>
</form>
</body>
diff --git a/BKUOnline/src/main/webapp/applet.jsp b/BKUOnline/src/main/webapp/applet.jsp
index 31f3362b..df0b3ca5 100644
--- a/BKUOnline/src/main/webapp/applet.jsp
+++ b/BKUOnline/src/main/webapp/applet.jsp
@@ -72,14 +72,13 @@
%>
<body id="appletpage" style="width:<%=width%>px" onFocus="focusToApplet()">
- <script>
+ <script type="text/javascript">
// avoid selection of applet before it is completely loaded
var allowSelectionByJS = false;
if (!deployJava.versionCheck('1.6.0_04+')) {
- document
- .write('<p>Diese Anwendung benötigt Version 6 Update 4 oder höher der <a href="" onclick="deployJava.installLatestJRE();">Java&trade; Laufzeitumgebung</a>.</p>');
+ document.write('<p>Diese Anwendung benötigt Version 6 Update 4 oder höher der <a href="" onclick="deployJava.installLatestJRE();">Java&trade; Laufzeitumgebung</a>.</p>');
} else {
// to enable applet caching, remove AppletDispatcher servlet,
// change codebase to 'applet',
@@ -105,14 +104,8 @@
RedirectURL : '../bkuResult',
RedirectTarget: '_parent'
};
- var version = '1.6.0_04';
- deployJava.runApplet(attributes, parameters, version);
-
-
+ deployJava.runApplet(attributes, parameters, '1.6.0_04');
}
-
-
-
</script>
</body>
diff --git a/BKUOnline/src/main/webapp/index.html b/BKUOnline/src/main/webapp/index.html
index 5bc01297..b39dafb7 100644
--- a/BKUOnline/src/main/webapp/index.html
+++ b/BKUOnline/src/main/webapp/index.html
@@ -22,6 +22,7 @@
<link rel="shortcut icon" href="img/chip16.ico" type="image/x-icon">
<link href="css/main.css" rel="stylesheet" type="text/css" />
<script src="js/deployJava.js" type="text/javascript"></script>
+ <!--script src="http://java.com/js/deployJava.js" type="text/javascript"></script-->
</head>
<body>
<div id="animDiv" class="box">
@@ -46,7 +47,7 @@
<p>
<h1>MOCCA Web Start</h1>
<p>
- <script>
+ <script type="text/javascript">
var url="webstart/mocca.jnlp"
deployJava.createWebStartLaunchButton(url, "1.6")
</script></p>
diff --git a/BKUOnline/src/main/webapp/js/deployJava_orig.js b/BKUOnline/src/main/webapp/js/deployJava_orig.js
new file mode 100644
index 00000000..316fa278
--- /dev/null
+++ b/BKUOnline/src/main/webapp/js/deployJava_orig.js
@@ -0,0 +1,725 @@
+/*
+ * Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * - Neither the name of Sun Microsystems nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * Added by EGIZ:
+ * This file contains workarounds to
+ * [#423] Firefox 3.0.11 bug #498132 causes applet loading failure
+ * (lines 95-99)
+ * [#424] Web Start loading via java plugin (Sun deployment script) fails on WinXP/Vista
+ * (lines 501-506)
+ *
+ * features:
+ * [#425] Disable WebStart Launch Button for MacOS
+ * (lines 492-504)
+ *
+ */
+
+/*
+ * deployJava.js
+ *
+ * This file is part of the Deployment Toolkit. It provides functions for web
+ * pages to detect the presence of a JRE, install the latest JRE, and easily run
+ * applets or Web Start programs. Usage guide may be found at http://<TBD>/.
+ *
+ * The "live" copy of this file may be found at
+ * http://java.com/js/deployJava.js.
+ * You are encouraged to link directly to the live copy of the file.
+ *
+ * @version @(#)deployJava.js XXXXX
+ */
+
+var deployJava={
+ debug:null,
+
+ myInterval:null,
+ preInstallJREList:null,
+ returnPage:null,
+ brand:null,
+ locale:null,
+ installType:null,
+
+ EAInstallEnabled:false,
+ EarlyAccessURL:null,
+
+ // GetJava page
+ getJavaURL:'http://java.sun.com/webapps/getjava/BrowserRedirect?host=java.com',
+
+ // Apple redirect page
+ 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 list=new Array();
+ if(deployJava.isPluginInstalled()){
+ var plugin=deployJava.getPlugin();
+ var VMs=plugin.jvms;
+ for(var i=0;i<VMs.getLength();i++){
+ list[i]=VMs.get(i).version;
+ }
+ }else{
+ var browser=deployJava.getBrowser();
+
+ if(browser=='MSIE'){
+ if(deployJava.testUsingActiveX('1.8.0')){
+ list[0]='1.8.0';
+ }else if(deployJava.testUsingActiveX('1.7.0')){
+ list[0]='1.7.0';
+ }else if(deployJava.testUsingActiveX('1.6.0')){
+ list[0]='1.6.0';
+ }else if(deployJava.testUsingActiveX('1.5.0')){
+ list[0]='1.5.0';
+ }else if(deployJava.testUsingActiveX('1.4.2')){
+ list[0]='1.4.2';
+ }else if(deployJava.testForMSVM()){
+ list[0]='1.1';
+ }
+ }
+ else if(browser=='Netscape Family'){
+ if(deployJava.testUsingMimeTypes('1.8')){
+ list[0]='1.8.0';
+ }else if(deployJava.testUsingMimeTypes('1.7')){
+ list[0]='1.7.0';
+ }else if(deployJava.testUsingMimeTypes('1.6')){
+ list[0]='1.6.0';
+ }else if(deployJava.testUsingMimeTypes('1.5')){
+ list[0]='1.5.0';
+ }else if(deployJava.testUsingMimeTypes('1.4.2')){
+ list[0]='1.4.2';
+ }
+ }else if(browser=='Safari'){
+ if(deployJava.testUsingPluginsArray('1.8.0')){
+ list[0]='1.8.0';
+ }else if(deployJava.testUsingPluginsArray('1.7.0')){
+ list[0]='1.7.0';
+ }else if(deployJava.testUsingPluginsArray('1.6.0')){
+ list[0]='1.6.0';
+ }else if(deployJava.testUsingPluginsArray('1.5.0')){
+ list[0]='1.5.0';
+ }else if(deployJava.testUsingPluginsArray('1.4.2')){
+ list[0]='1.4.2';
+ }
+ }
+ }
+
+ if(deployJava.debug){
+ for(var i=0;i<list.length;++i){
+ alert('We claim to have detected Java SE '+list[i]);
+ }
+ }
+
+ return list;
+ },
+
+ installJRE:function(requestVersion){
+ var ret=false;
+ if(deployJava.isPluginInstalled()){
+ if(deployJava.getPlugin().installJRE(requestVersion)){
+ 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 browser=deployJava.getBrowser();
+ var platform=navigator.platform.toLowerCase();
+ if((deployJava.EAInstallEnabled=='true') &&
+ (platform.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(browser=='MSIE'){
+ return deployJava.IEInstall();
+ }else if((browser=='Netscape Family')&&
+ (platform.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(attributes,parameters,minimumVersion){
+ if(minimumVersion=='undefined'||minimumVersion==null){
+ minimumVersion='1.1';
+ }
+
+ var regex="^(\\d+)(?:\\.(\\d+)(?:\\.(\\d+)(?:_(\\d+))?)?)?$";
+
+ var matchData=minimumVersion.match(regex);
+
+ if(deployJava.returnPage==null){
+ deployJava.returnPage=document.location;
+ }
+
+ if(matchData!=null){
+ var browser=deployJava.getBrowser();
+ if((browser!='?')&&(browser!='Safari')){
+ if(deployJava.versionCheck(minimumVersion+'+')){
+ deployJava.writeAppletTag(attributes,parameters);
+ }else if(deployJava.installJRE(minimumVersion+'+')){
+ deployJava.refresh();
+ location.href=document.location;
+ deployJava.writeAppletTag(attributes,parameters);
+ }
+ }else{
+ deployJava.writeAppletTag(attributes,parameters);
+ }
+ }else{
+ if(deployJava.debug){
+ alert('Invalid minimumVersion argument to runApplet():'+
+ minimumVersion);
+ }
+ }
+ },
+
+ writeAppletTag:function(attributes,parameters){
+ var s='<'+'applet ';
+ for(var attribute in attributes){
+ s+=(' '+attribute+'="'+attributes[attribute]+'"');
+ }
+ s+='>';
+ document.write(s);
+
+ if(parameters!='undefined'&&parameters!=null){
+ var codebaseParam=false;
+ for(var parameter in parameters){
+ if(parameter=='codebase_lookup'){
+ codebaseParam=true;
+ }
+ s='<param name="'+parameter+'" value="'+
+ parameters[parameter]+'">';
+ document.write(s);
+ }
+ if(!codebaseParam){
+ document.write('<param name="codebase_lookup" value="false">');
+ }
+ }
+ document.write('<'+'/'+'applet'+'>');
+ },
+
+ versionCheck:function(versionPattern)
+
+ {
+ var index=0;
+ var regex="^(\\d+)(?:\\.(\\d+)(?:\\.(\\d+)(?:_(\\d+))?)?)?(\\*|\\+)?$";
+
+ var matchData=versionPattern.match(regex);
+
+ if(matchData!=null){
+ var familyMatch=true;
+
+ var patternArray=new Array();
+
+ for(var i=1;i<matchData.length;++i){
+ if((typeof matchData[i]=='string')&&(matchData[i]!='')){
+ patternArray[index]=matchData[i];
+ index++;
+ }
+ }
+
+ if(patternArray[patternArray.length-1]=='+'){
+ familyMatch=false;
+ patternArray.length--;
+ }else{
+ if(patternArray[patternArray.length-1]=='*'){
+ patternArray.length--;
+ }
+ }
+
+ var list=deployJava.getJREs();
+ for(var i=0;i<list.length;++i){
+ if(deployJava.compareVersionToPattern(list[i],patternArray,
+ familyMatch)){
+ return true;
+ }
+ }
+
+ return false;
+ }else{
+ alert('Invalid versionPattern passed to versionCheck: '+
+ versionPattern);
+ return false;
+ }
+ },
+
+ isWebStartInstalled:function(minimumVersion){
+
+ var browser=deployJava.getBrowser();
+ if((browser=='?')||(browser=='Safari')){
+ return true;
+ }
+
+ if(minimumVersion=='undefined'||minimumVersion==null){
+ minimumVersion='1.4.2';
+ }
+
+ var retval=false;
+ var regex="^(\\d+)(?:\\.(\\d+)(?:\\.(\\d+)(?:_(\\d+))?)?)?$";
+ var matchData=minimumVersion.match(regex);
+
+ if(matchData!=null){
+ retval=deployJava.versionCheck(minimumVersion+'+');
+ }else{
+ if(deployJava.debug){
+ alert('Invalid minimumVersion argument to isWebStartInstalled(): '+minimumVersion);
+ }
+ retval=deployJava.versionCheck('1.4.2+');
+ }
+ return retval;
+ },
+
+ createWebStartLaunchButton:function(jnlp,minimumVersion){
+
+ if(deployJava.returnPage==null){
+ deployJava.returnPage=jnlp;
+ }
+ var url='javascript:'+'if (!deployJava.isWebStartInstalled(&quot;'+
+ minimumVersion+'&quot;)) {'+'if (deployJava.installLatestJRE()) {'+'if (deployJava.launch(&quot;'+jnlp+'&quot;)) {}'+'}'+'} else {'+'if (deployJava.launch(&quot;'+jnlp+'&quot;)) {}'+'}';document.write('<'+'a href="'+url+'" onMouseOver="window.status=\'\'; '+'return true;"><'+'img '+'src="'+deployJava.launchButtonPNG+'" '+'border="0" /><'+'/'+'a'+'>');
+ },
+
+ launch:function(jnlp){
+ if(deployJava.isPluginInstalled()){
+ return deployJava.getPlugin().launch(jnlp);
+ }else{
+ document.location=jnlp;return true;
+ }
+ },
+
+ isPluginInstalled:function(){
+ var plugin=deployJava.getPlugin();
+ if(plugin&&plugin.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(type){
+ deployJava.installType=type;
+ if(deployJava.isPluginInstalled()){
+ return deployJava.getPlugin().setInstallerType(type);
+ }
+ return false;
+ },
+
+ setAdditionalPackages:function(packageList){
+ if(deployJava.isPluginInstalled()){
+ return deployJava.getPlugin().setAdditionalPackages(
+ packageList);
+ }
+ return false;
+ },
+
+ setEarlyAccess:function(enabled){
+ deployJava.EAInstallEnabled=enabled;
+ },
+
+ isPlugin2:function(){
+ if(deployJava.isPluginInstalled()){
+ if(deployJava.versionCheck('1.6.0_10+')){
+ try{
+ return deployJava.getPlugin().isPlugin2();
+ }catch(err){
+
+ }
+ }
+ }
+ return false;
+ },
+
+
+ getPlugin:function(){
+ deployJava.refresh();
+ var ret=document.getElementById('deployJavaPlugin');
+ return ret;
+ },
+
+ compareVersionToPattern:function(version,patternArray,familyMatch){
+ var regex="^(\\d+)(?:\\.(\\d+)(?:\\.(\\d+)(?:_(\\d+))?)?)?$";
+ var matchData=version.match(regex);
+
+ if(matchData!=null){
+ var index=0;
+ var result=new Array();
+
+ for(var i=1;i<matchData.length;++i){
+ if((typeof matchData[i]=='string')&&(matchData[i]!=''))
+ {
+ result[index]=matchData[i];
+ index++;
+ }
+ }
+
+ var l=Math.min(result.length,patternArray.length);
+
+ if(familyMatch){
+ for(var i=0;i<l;++i){
+ if(result[i]!=patternArray[i])return false;
+ }
+
+ return true;
+ }else{
+ for(var i=0;i<l;++i){
+ if(result[i]<patternArray[i]){
+ return false;
+ }else if(result[i]>patternArray[i]){
+ return true;
+ }
+ }
+
+ return true;
+ }
+ }else{
+ return false;
+ }
+ },
+
+
+ getBrowser:function(){
+ var browser=navigator.userAgent.toLowerCase();
+
+ if(deployJava.debug){
+ alert('userAgent -> '+browser);
+ }
+
+ if((navigator.vendor)&&
+ (navigator.vendor.toLowerCase().indexOf('apple')!=-1)&&
+ (browser.indexOf('safari')!=-1)){
+ if(deployJava.debug){
+ alert('We claim to have detected "Safari".');
+ }
+ return'Safari';
+ }else if(browser.indexOf('msie')!=-1){
+ if(deployJava.debug){
+ alert('We claim to have detected "IE".');
+ }
+ return'MSIE';
+ }else if((browser.indexOf('mozilla')!=-1)||
+ (browser.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(version){
+ var objectName='JavaWebStart.isInstalled.'+version+'.0';
+
+ if(!ActiveXObject){
+ if(deployJava.debug){
+ alert('Browser claims to be IE, but no ActiveXObject object?');
+ }
+ return false;
+ }
+
+ try{
+ return(new ActiveXObject(objectName)!=null);
+ }catch(exception){
+ return false;
+ }
+ },
+
+
+ testForMSVM:function(){
+ var clsid='{08B0E5C0-4FCB-11CF-AAA5-00401C608500}';
+
+ if(typeof oClientCaps!='undefined'){
+ var v=oClientCaps.getComponentVersion(clsid,"ComponentID");
+ if((v=='')||(v=='5,0,5000,0')){
+ return false;
+ }else{
+ return true;
+ }
+ }else{
+ return false;
+ }
+ },
+
+
+ testUsingMimeTypes:function(version){
+ if(!navigator.mimeTypes){
+ if(deployJava.debug){
+ alert('Browser claims to be Netscape family, but no mimeTypes[] array?');
+ }
+ return false;
+ }
+
+ for(var i=0;i<navigator.mimeTypes.length;++i){
+ s=navigator.mimeTypes[i].type;
+ var m=s.match(/^application\/x-java-applet\x3Bversion=(1\.8|1\.7|1\.6|1\.5|1\.4\.2)$/);
+ if(m!=null){
+ if(deployJava.compareVersions(m[1],version)){
+ return true;
+ }
+ }
+ }
+ return false;
+ },
+
+
+ testUsingPluginsArray:function(version){
+ if((!navigator.plugins)||(!navigator.plugins.length)){
+ return false;
+ }
+ var platform=navigator.platform.toLowerCase();
+ for(var i=0;i<navigator.plugins.length;++i){
+ s=navigator.plugins[i].description;
+
+ if(s.search(/^Java Switchable Plug-in (Cocoa)/)!=-1){
+ if(deployJava.compareVersions("1.5.0",version)){
+ return true;
+ }
+ }else if(s.search(/^Java/)!=-1){
+ if(platform.indexOf('win')!=-1){
+ if(deployJava.compareVersions("1.5.0",version)||deployJava.compareVersions("1.6.0",version)){
+ return true;
+ }
+ }
+ }
+ }
+ if(deployJava.compareVersions("1.5.0",version)){
+ 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(name,result){
+ },
+
+ 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(installed,required){
+
+ var a=installed.split('.');
+ var b=required.split('.');
+
+ for(var i=0;i<a.length;++i){
+ a[i]=Number(a[i]);
+ }
+ for(var i=0;i<b.length;++i){
+ b[i]=Number(b[i]);
+ }
+ if(a.length==2){
+ a[2]=0;
+ }
+
+ if(a[0]>b[0])return true;
+ if(a[0]<b[0])return false;
+
+ if(a[1]>b[1])return true;
+ if(a[1]<b[1])return false;
+
+ if(a[2]>b[2])return true;
+ if(a[2]<b[2])return false;
+
+ return true;
+ },
+
+
+ enableAlerts:function(){
+ deployJava.debug=true;
+ },
+
+ poll:function(){
+
+ deployJava.refresh();
+ var postInstallJREList=deployJava.getJREs();
+
+ if((deployJava.preInstallJREList.length==0)&&
+ (postInstallJREList.length!=0)){
+ clearInterval(deployJava.myInterval);
+ if(deployJava.returnPage!=null){
+ location.href=deployJava.returnPage;
+ };
+ }
+
+ if((deployJava.preInstallJREList.length!=0)&&
+ (postInstallJREList.length!=0)&&
+ (deployJava.preInstallJREList[0]!=postInstallJREList[0])){
+ clearInterval(deployJava.myInterval);
+ if(deployJava.returnPage!=null){
+ location.href=deployJava.returnPage;
+ }
+ }
+
+ },
+
+ writePluginTag:function(){
+ var browser=deployJava.getBrowser();
+ if(browser=='MSIE'){
+ document.write('<'+
+ 'object classid="clsid:CAFEEFAC-DEC7-0000-0000-ABCDEFFEDCBA" '+
+ 'id="deployJavaPlugin" width="0" height="0">'+
+ '<'+'/'+'object'+'>');
+ }else if(browser=='Netscape Family'){
+ deployJava.writeEmbedTag();
+ }
+ },
+
+ refresh:function(){
+ navigator.plugins.refresh(false);var browser=deployJava.getBrowser();if(browser=='Netscape Family'){
+ var plugin=document.getElementById('deployJavaPlugin');if(plugin==null){
+ deployJava.writeEmbedTag();
+ }
+ }
+ },
+
+ writeEmbedTag:function(){
+ var written=false;if(navigator.mimeTypes!=null){
+ for(var i=0;i<navigator.mimeTypes.length;i++){
+ if(navigator.mimeTypes[i].type==deployJava.mimeType){
+ if(navigator.mimeTypes[i].enabledPlugin){
+ document.write('<'+'embed id="deployJavaPlugin" type="'+
+ deployJava.mimeType+'" hidden="true" />');written=true;
+ }
+ }
+ }
+ if(!written)for(var i=0;i<navigator.mimeTypes.length;i++){
+ if(navigator.mimeTypes[i].type==deployJava.oldMimeType){
+ if(navigator.mimeTypes[i].enabledPlugin){
+ document.write('<'+'embed id="deployJavaPlugin" type="'+
+ deployJava.oldMimeType+'" hidden="true" />');
+ }
+ }
+ }
+ }
+ },
+
+ do_initialize:function(){
+ deployJava.writePluginTag();
+ if(deployJava.locale==null){
+ var loc=null;
+
+ if(loc==null)try{
+ loc=navigator.userLanguage;
+ }catch(err){}
+
+ if(loc==null)try{
+ loc=navigator.systemLanguage;
+ }catch(err){}
+
+ if(loc==null)try{
+ loc=navigator.language;
+ }catch(err){}
+
+ if(loc!=null){
+ loc.replace("-","_")
+ deployJava.locale=loc;
+ }
+ }
+ }
+
+ };
+ deployJava.do_initialize();
+