var FlashMode = 0;
detect_flash();

function ask_to_load_flash_plugin() {
	if ( FlashMode == 0 ) {
		var str = 'Для отображения всех элементов страницы Вам необходимо установить плагин "Macromedia Flash"\n';
		str += 'Вы хотите установить плагин?';
		if ( confirm(str) ) {
			return true;
		}
	}
	return false;
}


function detect_flash() {
	var version_num = 5;
	
	if (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"] 
		&& navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin) 
	{
		if (navigator.plugins && navigator.plugins["Shockwave Flash"] 
			&& (versionIndex = navigator.plugins["Shockwave Flash"].description.indexOf(".")) 
			!= - 1) 
		{
			var versionString = navigator.plugins["Shockwave Flash"].description.substring(versionIndex-1, 
			versionIndex);
			versionIndex = parseInt( versionString );
			if ( versionIndex >= version_num ) {
				Set_FlashMode(1);
			}
		}
	}
	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('<SCR\IPT LANGUAGE=VBScript\> \n');
		document.write('on error resume next \n');
		document.write('FlashMode = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.5")))\n');
		document.write('call Set_FlashMode(FlashMode) \n');
		document.write("</SCRIPT\> \n");
	}
}

function Set_FlashMode(value) {
	FlashMode = (value)?1:0;
}