// Test whether Java is installed or not.
// Note that we use the optional input argument 'getJavaInfo.jar' -
//  this is the path to a jar file.
//
//  We do this because at least one browser does not usually reveal
//  the Java version without actually running an externally loaded applet.
//  That browser is Safari on Macintosh. Without an externally loaded applet, PluginDetect would
//  only be able to tell if Java was installed or not for Safari/Mac, 
//  but it would not know the version.
//
// For most other browsers, the externally loaded applet is not needed to get the Java version.
// But just in case, if all other detection methods fail, PluginDetect will use 
// the applet 'getJavaInfo.jar' as a backup detection method.


var Java  = PluginDetect.isMinVersion('Java', '0', 'getJavaInfo.jar');
var installed = null;
var installedX = null;

if (PluginDetect.isIE){

   // A Java applet can be put into a web page using the <applet> tag.
   // When you disable Java in the IE browser settings, you disable the
   // <applet> tag - but NOT the <object> tag.
   
	 installed = Java >= 0 ? 'true' : 'false';
	 				

   // For IE, you can also use the 
   //  <object> tag with classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" 
   // to display a Java applet.
   
	 installedX = Java >= 0 ? 'true' : 'false';

}


// For the non-IE browsers, you can also use <object>/<embed>/<applet> tags for your
// Java applets.
else{
  
	installed = Java >= 0 ? 'true' : 'false';
};

