/* detekce Flash */
function isFlash(ver) {
	var state = false;
	var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : false;
	if (plugin) {
		state = (parseInt(plugin.description.substring(plugin.description.indexOf(".")-1)) >= ver)? true : false;
	}
	else if (navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion.indexOf("MSIE 4") == -1 && navigator.appVersion.indexOf("Macintosh") == -1 && navigator.appVersion.indexOf("68K") == -1) {
		eval('try { var flash = new ActiveXObject("ShockwaveFlash.ShockwaveFlash." + ver); state = true; } catch(e) {  }');
	}
	return state;
}

function writeFlash(src,width,height) {
	if ( isFlash(7) )  {
		document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="'+width+'" height="'+height+'">');
		document.write('	<param name=movie value="'+src+'"> <param name="wmode" value="transparent" /> <param name=quality value=high> <param name=scale value=noscale> <param name=bgcolor value=#FFFFFF> <embed src="'+src+'" quality=high scale=noscale bgcolor=#FFFFFF wmode=transparent width="'+width+'" height="'+height+'"  type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed></object>');
	} else {
		return false;
	}
	return true;
}
