
/**
 * Sprawdza czy jest Flash w przeglądarce. Jeśli nie wraca 'false', 
 * jeśli tak to true lub referencje do obiektu Flasha
 * @returns bool | Object Flash
 */
function DetectFlashIsInstalled()
{
	result = false;
	if (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"])
	{
		result = navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin;
	}
	else if (document.all && (navigator.appVersion.indexOf("Mac")==-1))
	{
		eval ('try {var xObj = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");if (xObj) result = true; xObj = null; } catch (e) {}');
	}
	return result;
}

/**
 * Wyświetlany komunikat że jest wymagany Flash Player
 */
function DetectFlashPrintError()
{
	var html = "<div style='"
		+ "border: 1px solid #F7941D;"
		+ "background: #FEEFDA;"
		+ "text-align: center;"
		+ "clear: both;"
		+ "height: 75px;"
		+ "position: relative;'>"
		+ "<div style='"
			+ "position: absolute;" 
			+ "right: 3px;" 
			+ "top: 3px;" 
			+ "font-family: courier new;" 
			+ "font-weight: bold;'>"
				+ "<a href='#' onclick='javascript:this.parentNode.parentNode.style.display=\"none\"; return false;'>"
					+ "<img src='http://www.ie6nomore.com/files/theme/ie6nomore-cornerx.jpg' style='border: none;' alt='Close this notice'/>"
				+ "</a>"
		+ "</div>"    
		+ "<div style='"
			+ "width: 640px;" 
			+ "margin: 0 auto;" 
			+ "text-align: left;"
			+ "padding: 0;" 
			+ "overflow: hidden;" 
			+ "color: black;'>"      
				+ "<div style='width: 75px; float: left;'>"
					+ "<img src='http://www.ie6nomore.com/files/theme/ie6nomore-warning.jpg' alt='Warning!'/>"
				+ "</div>"      
				+ "<div style='width: 500px; float: left; font-family: Arial, sans-serif;'>"  
					+ "<div style='margin-top:2px;'>Do poprawnego wyświetlania strona wymaga aktualnego odtwarzacza Adobe Flash Player. <a href='http://get.adobe.com/flashplayer/' target='_blank'>Pobierz go z witryny Adobe</a>.</div>"
					+ "<div style='margin-top:5px;'>To correct display of the current page requires Adobe Flash Player. <a href='http://get.adobe.com/flashplayer/' target='_blank'>Download it from the Adobe website</a>.</div>"
				+ "</div>"  
		+ "</div>"
	+ "</div>";
	
	$("body").prepend(html);
}

