///////////////////////////////////////////////////////////////////
//Skrypt wykrywający plug-in flash player
///////////////////////////////////////////////////////////////////


//Created by Robert Reinhardt for the Flash MX 2004 Bible, Wiley Books
//This script will detect the presence of either the plug-in or
//the ActiveX Control for the Flash Player 7.

var plugin = 0;
var activeX = 0;
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)) >= 7;
}
else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 && navigator.userAgent.indexOf("Windows")>=0) {
	document.write('<script language="VBScript" type="text/vbscript"\> \n');
	document.write('on error resume next \n');
	document.write('activeX = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.7")))\n');
	document.write('<' + '/script>');
}
//////////////////////////////////////////////////////////////////
//funkcja wyswietla różną treść w zależności od obecności flasha7
//////////////////////////////////////////////////////////////////
function detectFlash(embedText, objectText, imgText) {
	if (activeX) {
		document.write(objectText);
		return;
	}
	if ( plugin ) {
		document.write(embedText);
		return;
	} 	
	document.write(imgText);
	return;
}	
