var java = navigator.javaEnabled() ? true:false;
var ua = navigator.userAgent.toLowerCase();
var OS = null;
var browser,version,total,thestring;
if (checkIt('konqueror'))
{
browser = "konqueror";
OS = "linux";
}
else if (checkIt('safari'))
{
browser = "safari"
OS = "mac";
}
else if (checkIt('omniweb'))
{
browser = "omniweb";
}
else if (checkIt('opera'))
{
browser = "opera";
}
else if (checkIt('webtv'))
{
browser = "webtv";
}
else if (checkIt('icab'))
{
browser = "icab";
}
else if (checkIt('msie'))
{
browser = "internet explorer";
}
else if (!checkIt('compatible'))
{
// what?
browser = "netscape navigator";
version = ua.charAt(8);
}
else
{
browser = "An unknown browser";
}
if (!version) version = ua.charAt(place + thestring.length);
if (null==OS)
{
if (checkIt('linux'))
{
OS = "linux";
}
else if (checkIt('x11'))
{
OS = "unix";
}
else if (checkIt('mac'))
{
OS = "mac";
}
else if (checkIt('win'))
{
OS = "windows";
}
else
{
OS = null;
}
}
function checkIt(string)
{
place = ua.indexOf(string.toLowerCase()) + 1;
thestring = string;
return place;
}
function checkInstall(name, result)
{
// Installation failed.
if (result)
{
alert("The installation of package " + name + " failed with " + result);
}
// Installation successful, so try to reload current page.
else
{
window.location.reload();
}
}
var adresse = null;
if(OS=="windows")
{
adresse = "http://java.sun.com/update/1.5.0/jre-1_5_0_06-windows-i586.xpi";
}
var dejaEcrit = false;
function autoInstallJRE()
{
var ecrire = true;
if(adresse != null)
{
try
{
if (InstallTrigger.enabled())
{
txt = "J2SE(TM) Runtime Environment 5.0 Update 6";
var xpi = new Object();
xpi[txt] = adresse;
// Try to install the package and process the results.
InstallTrigger.install(xpi, checkInstall);
ecrire = false;
}
}
catch(exception)
{
ecrire = true;
}
}
if(ecrire && !dejaEcrit)
{
var texte = '
';
texte += '';
texte += 'Pour utiliser cette application, Java doit être installé et activé.';
texte += '
';
texte += '';
texte += 'Téléchargez Java.
';
texte += '';
texte += '
';
texte += '
';
texte += 'Puis réactualisez la page !';
texte += '
';
document.write(texte);
dejaEcrit = true;
}
}
function applet(name, code, archive, width, height, x, y, params)
{
var autoInstall = false;
var useAppletTag = true;
var ie5windows=((document.all) && (document.getElementById) && (navigator.platform=='Win32') && (navigator.userAgent.toLowerCase().indexOf("opera")==-1));
if (ie5windows)
{
document.write("
");
document.body.addBehavior("#default#clientCaps");
useAppletTag = (document.body.isComponentInstalled("{08B0E5C0-4FCB-11CF-AAA5-00401C608500}", "componentid")) ;
}
if (useAppletTag)
{
if (!navigator.javaEnabled())
{
autoInstall = true;
}
else
{
document.writeln(' ');
}
}
else
{
document.writeln('');
}
if(autoInstall)
{
autoInstallJRE();
}
}
function applet(name, code, archive, width, height, params)
{
var autoInstall = false;
var useAppletTag = true;
var ie5windows=((document.all) && (document.getElementById) && (navigator.platform=='Win32') && (navigator.userAgent.toLowerCase().indexOf("opera")==-1));
if (ie5windows)
{
document.write("
");
document.body.addBehavior("#default#clientCaps");
useAppletTag = (document.body.isComponentInstalled("{08B0E5C0-4FCB-11CF-AAA5-00401C608500}", "componentid")) ;
}
if (useAppletTag)
{
if (!navigator.javaEnabled())
{
autoInstall = true;
}
else
{
var texte = '';
document.writeln(texte);
}
}
else
{
document.writeln('');
}
if(autoInstall)
{
autoInstallJRE();
}
}
function applet(name, code, archive, width, height, x, y)
{
var autoInstall = false;
var useAppletTag = true;
var ie5windows=((document.all) && (document.getElementById) && (navigator.platform=='Win32') && (navigator.userAgent.toLowerCase().indexOf("opera")==-1));
if (ie5windows)
{
document.write("
");
document.body.addBehavior("#default#clientCaps");
useAppletTag = (document.body.isComponentInstalled("{08B0E5C0-4FCB-11CF-AAA5-00401C608500}", "componentid")) ;
}
if (useAppletTag)
{
if (!navigator.javaEnabled())
{
autoInstall = true;
}
else
{
document.writeln(' ');
}
}
else
{
document.writeln('');
}
if(autoInstall)
{
autoInstallJRE();
}
}
function applet(name, code, archive, width, height)
{
var autoInstall = false;
var useAppletTag = true;
var ie5windows=((document.all) && (document.getElementById) && (navigator.platform=='Win32') && (navigator.userAgent.toLowerCase().indexOf("opera")==-1));
if (ie5windows)
{
document.write("
");
document.body.addBehavior("#default#clientCaps");
useAppletTag = (document.body.isComponentInstalled("{08B0E5C0-4FCB-11CF-AAA5-00401C608500}", "componentid")) ;
}
if (useAppletTag)
{
if (!navigator.javaEnabled())
{
autoInstall = true;
}
else
{
document.writeln(' ');
}
}
else
{
document.writeln('');
}
if(autoInstall)
{
autoInstallJRE();
}
}