var flashinstalled = 0;
var flashversion = 8;
if (navigator.plugins && navigator.plugins.length){
	if (navigator.plugins["Shockwave Flash"] || navigator.plugins["Shockwave Flash 2.0"])
		flashinstalled = 2;
}
else if (navigator.mimeTypes && navigator.mimeTypes.length){
	if (navigator.mimeTypes['application/x-shockwave-flash'] && navigator.mimeTypes['application/x-shockwave-flash'].enabledPlugin)
		flashinstalled = 2;
}
else{
	for(i = 8; i > 0; i--){
		try{
			var flash = new ActiveXObject("ShockwaveFlash.ShockwaveFlash." + i);
			flashinstalled = 2;
			flashversion = i;
			break;
		} catch(e){}
	}
}

function writeFlash(file, width, height)
{
	//if(flashinstalled == 2 && flashversion > 2)
		document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="'+width+'" height="'+height+'"><param name="movie" value="'+file+'"><param name="quality" value="high"><embed src="'+file+'" quality="high" width="'+width+'" height="'+height+'" name="text" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed></object>');
}