// Flash detection
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)) >= 6;
} 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.6")))\n');
	document.write('</SCRIPT\> \n');
}

function ShowFlash(url, w, h, id) {
	html =  '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ' +
		'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" ';

	if(id != undefined) {
		html += 'id="'+id+'" ';
	}

	html += 'width="' + w + '" height="' + h + '">' +

		'<param name="movie"             value="'+url+'" />'+
		'<param name="allowScriptAccess" value="always" />'+
		'<param name="movie"             value="' + url + '">' +
		'<param name="menu"              value="false">' +
		'<param name="quality"           value="high">' +
		'<param name="wmode"             value="transparent" />'+

		'<embed src="' + url + '" quality="high" menu="false" ' +
		'pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" ' +
		'width="' + w + '" height="' + h + '" wmode="transparent"></embed>' +

		'</object>';

	document.write(html);
}
