
/* Flash movies */

var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;

if (plugin) { 
	plugin = parseInt(plugin.description.substring(plugin.description.indexOf(".")-1)) >= 3; 
} 
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('    plugin = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.3")))\n'); 
	document.write('<\/script\> \n'); 
} 
/* UTILISATION :
	<script language="javascript" type="text/javascript">
	<!--
		document.write(getFlash('/jeux/233/233.swf', '/images/_welove.gif', '200', '200', 'welove'));
	//-->
	</script>
*/
function getFlash(movie, fallback, width,height, id)
{
	var flash = '';

	if (plugin) { 
		flash =
			  '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'
			+ ' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=3,0,0,0"'
			+ ' id="' + id + '" width="' + width + '" height="' + height + '">'
			+ '    <param name="movie" value="' + movie + '" \/>\n'
			+ '    <param name="wmode" value="opaque" \/>\n' 
			+ '    <param name="menu" value="false" \/>\n' 
			+ '    <param name="quality" value="high" \/>\n'
			+ '    <embed src="' + movie + '" quality="high" swLiveConnect="FALSE" width="' + width + '" height="' + height + '"'
			+ '        type="application/x-shockwave-flash"'
			+ '        pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"><\/embed>\n'
			+ '<\/object>';
	} 
	else if (fallback && !(navigator.appName
		&& navigator.appName.indexOf("Netscape") >= 0
		&& navigator.appVersion.indexOf("2.") >= 0)) { 
		flash = '<img src="' + fallback + '" width="' + width + '" height="' + height + '" border="0" \/>';
	}
	
	return flash;
}

function getVideoPlayer(movie, fallback, width, height, id)
{
	var player = '';
	
	if (plugin) {
		player =
			  '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'
			+ ' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"'
			+ ' id="' + id + '" width="' + width + '" height="' + height + '" align="left">'
			+ '    <param name="movie" value="' + movie + '" \/>'
			+ '    <param name="menu" value="false" \/>'
			+ '    <param name="quality" value="high" \/>'
			+ '    <param name="bgcolor" value="#ffffff" \/>'
			+ '    <embed src="' + movie + '" menu="false" quality="high" bgcolor="#ffffff"'
			+ '        width="'+ width + '" height="150" name="' + id + '" align="left"'
			+ '        type="application/x-shockwave-flash"'
			+ '        pluginspage="http://www.macromedia.com/go/getflashplayer"><\/embed>'
			+ '<\/object>';
		
	}
	else if (fallback && !(navigator.appName
		&& navigator.appName.indexOf("Netscape") >= 0
		&& navigator.appVersion.indexOf("2.") >= 0)) { 
		player = '<img src="' + fallback + '" width="' + width + '" height="' + height + '" border="0" \/>';
	}
	
	return player;
}

