var javawsInstalled = 0; var javaws12Installed = 0; var javaws142Installed=0; isIE = "false"; if (navigator.mimeTypes && navigator.mimeTypes.length) { x = navigator.mimeTypes['application/x-java-jnlp-file']; if (x) { javawsInstalled = 1; javaws12Installed=1; javaws142Installed=1; } } else { isIE = "true"; } var webstartURL = "http://coast.bcgsc.bc.ca:8080/webstart/sockeyelauncher?"; function launchSockeye(database, chromosome, start, end, connection){ var targetURL = webstartURL + "database=" + database + "&chromosome=" + chromosome + "&start=" + start + "&end=" + end + "&conn=" + connection; /* Note that the logic below always launches the JNLP application *if the browser is Gecko based. This is because it is not possible *to detect MIME type application/x-java-jnlp-file on Gecko-based browsers. */ if (navigator.userAgent.indexOf("Gecko") !=-1) { var message = "You are using Gecko browser. Click "; message += ("here"); message += (" to launch Sockeye if you have JRE installed "); message += ("(Associate the MIME type application/x-java-jnlp-file to the executable javaws under the JRE_HOME/javaws folder if necessary)"); message += ("
or
"); message += ("Click "); message += ("here "); message += ("to download and install JRE 1.4."); var win = window.open("","LaunchSockeye","toolbar=no,scrollbars=yes,width=300,height=300"); win.document.open(); win.document.write(message); win.document.close(); } else if (javawsInstalled) { location.href=targetURL; } else { var message = ("Click "); message += ("here "); message += ("to download and install JRE 1.4."); var win = window.open("","LaunchSockeye","toolbar=no,scrollbars=yes,width=300,height=300"); win.document.open(); win.document.write(message); win.document.close(); } }