1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
|
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("<div style=position:absolute> </div>");
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(' <applet width="'+width+'" height="'+height+'" name="'+name+'" id="'+name+'" code="'+code+'" codebase=. archive="'+archive+'" mayscript></applet> ');
}
}
else
{
document.writeln('<object ');
document.writeln(' classid = "clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" ');
document.writeln(' codebase = "http://java.sun.com/update/1.5.0/jinstall-1_5-windows-i586.cab#Version=1,5,0,0" ');
document.writeln(' width = "'+width+'" height = "'+height+'" name = "'+name+'" >');
document.writeln(' <param name="code" value="' + code + '">');
document.writeln(' <param name="codebase" value=".">');
document.writeln(' <param name="name" value="' + name + '">');
document.writeln(' <param name="matscript" value="true">');
document.writeln(' <param name="type" value="application/x-java-applet;version=1.4">');
document.writeln(' <param name="scriptable" value="false">');
document.writeln('</object>');
}
if(autoInstall)
{
//Traitement si java n'est pas instalé
autoInstallJRE();
}
} |
Partager