


function writeSW(){

/*document.write("Installed: " + 
 (PluginDetect.isMinVersion('Shockwave', '0') >= 0 ? 'true' : 'false') + '<br>');
document.write("Version: " + PluginDetect.getVersion('Shockwave') + '<br>')
*/

var minVersion = '11'
var SW = PluginDetect.isMinVersion('Shockwave', minVersion);

if (SW == 1){
		document.write('<OBJECT classid="clsid:233C1507-6A77-46A4-9443-F871F945D258"');
		document.write(' codebase="https://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=11,5,0,595"');
		document.write(' ID=container width="1600" height="1200">');
		document.write('<PARAM NAME=src VALUE="container.dcr">');
		document.write('<PARAM NAME=swStretchStyle VALUE=meet>');
		document.write('<PARAM NAME=PlayerVersion VALUE=11>');
		document.write('<PARAM NAME=swRemote VALUE="');
		document.write("swSaveEnabled='true' swVolume='false' swRestart='false' swPausePlay='false' swFastForward='false' swContextMenu='false' ");
		document.write('">\n');
		document.write('<EMBED SRC="container.dcr"');
		document.write(' bgColor=#FFFFFF swStretchHAlign=Left swStretchVAlign=Top  width="1600" height="1200" swStretchStyle=meet ');
		document.write('swRemote="');
		document.write("swSaveEnabled='true' swVolume='false' swRestart='false' swPausePlay='false' swFastForward='false' swContextMenu='false' ");
		document.write('"');
		document.write(' TYPE="application/x-director" PlayerVersion=11 PLUGINSPAGE="https://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveDirector">');
		document.write('</EMBED>');
		document.write('</OBJECT>');
   //document.write('Shockwave ' + minVersion + ' or higher is installed and enabled<br>')
}

else if (SW == -1) {  // SW == -1, so Shockwave out of date or not installed/enabled

   if (PluginDetect.isMinVersion('Shockwave', '0') >= 0)
     document.write('Shockwave plugin est installé mais la version est inférieure à ' + minVersion + '<br>')
   
   else document.write('Shockwave n\'est pas installé<br>')

}

else if (SW == -2){
   // ActiveX is disabled
   document.write('Merci d\'activer les controles ActiveX dans Internet Explorer pour visionner votre document<br>')

};

	

}

function writeSWTest(){
	var ShockMode = 0;
	if (navigator.mimeTypes && navigator.mimeTypes["application/x-director"] && navigator.mimeTypes["application/x-director"].enabledPlugin) {
		if (navigator.plugins && navigator.plugins["Shockwave for Director"] && (versionIndex = navigator.plugins["Shockwave for Director"].description.indexOf(".")) != - 1) {
			var versionString = navigator.plugins["Shockwave for Director"].description.substring(versionIndex-2, versionIndex);
			versionIndex = parseInt( versionString );
			if ( versionIndex >= 10 ) {
				ShockMode = 1;
			}
		}
	}
	else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 
	   && (navigator.userAgent.indexOf("Windows 95")>=0 || navigator.userAgent.indexOf("Windows 98")>=0 || navigator.userAgent.indexOf("Windows NT")>=0 )) {
		document.write('<SCRIPT LANGUAGE=VBScript\> \n');
		document.write('on error resume next \n');
		document.write('ShockMode = (IsObject(CreateObject("SWCtl.SWCtl.11"))) \n');
		document.write('</SCRIPT\> \n');
	}
	if ( ShockMode ) {
		document.write('<OBJECT classid="clsid:233C1507-6A77-46A4-9443-F871F945D258"');
		document.write(' codebase="https://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=11,5,0,595"');
		document.write(' ID=container width="500" height="300">');
		document.write('<PARAM NAME=src VALUE="container_test.dcr">');
		document.write('<PARAM NAME=swStretchStyle VALUE=meet>');
		document.write('<PARAM NAME=PlayerVersion VALUE=11>');
		document.write('<PARAM NAME=swRemote VALUE="');
		document.write("swSaveEnabled='true' swVolume='false' swRestart='false' swPausePlay='false' swFastForward='false' swContextMenu='false' ");
		document.write('">\n');
		document.write('<EMBED SRC="container_test"');
		document.write(' bgColor=#FFFFFF swStretchHAlign=Left swStretchVAlign=Top  width="500" height="300" swStretchStyle=meet ');
		document.write('swRemote="');
		document.write("swSaveEnabled='true' swVolume='false' swRestart='false' swPausePlay='false' swFastForward='false' swContextMenu='false' ");
		document.write('"');
		document.write(' TYPE="application/x-director" PlayerVersion=11 PLUGINSPAGE="https://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveDirector">');
		document.write('</EMBED>');
		document.write('</OBJECT>');
	} else if (!(navigator.appName && navigator.appName.indexOf("Netscape")>=0 && navigator.appVersion.indexOf("2.")>=0)){
		document.write('Une version plus récente de Shockwave doit être installée pour l\'affichage de ce contenu. Veuillez mettre votre version de Shockwave à jour. (1)');
	}
}
