var isDOM       = document.getElementById;                       //DOM1 browser (MSIE 5+, Netscape 6, Opera 5+)
var isOpera     = isOpera5 = window.opera && isDOM;              //Opera 5+
var isOpera6    = isOpera && window.print;                       //Opera 6+
var isOpera7    = isOpera && document.readyState;                //Opera 7+
var isMSIE      = document.all && document.all.item && !isOpera; //Microsoft Internet Explorer 4+
var isMSIE5     = isDOM && isMSIE;                               //MSIE 5+
var isNetscape4 = document.layers;                               //Netscape 4.*
var isMozilla   = isDOM && navigator.appName == "Netscape";      //Mozilla или Netscape 6.*

var plugin;
var version = 6;
var flash = false;

function checkFlash() {
	if(navigator.plugins["Shockwave Flash"]) {
		plugin = navigator.plugins["Shockwave Flash"].description;
		flash = parseInt(plugin.charAt(plugin.indexOf('.') - 1)) >= version;
	}
	else {
		if ((navigator.userAgent.indexOf('MSIE') != -1)&&(navigator.userAgent.indexOf('Win') != -1)&&(navigator.userAgent.indexOf('Opera') == -1)) {
			checkFlashInExplorer ();
		}
	}
}

function OpenFlash(w, h) {
	if (flash) {
	var leftCoord = (screen.availWidth-w)/2;
	var topCoord  = (screen.availHeight-h)/2;
	var winParam = 'scrollbars=no,width='+w+',height='+h+',top='+topCoord+',left='+leftCoord;
	var name = 'flash'
	subs = window.open('', name, winParam);
	subs.document.write('<html>' + 
	'<head>' + 
	'<title>' + title + '</title>' + 
	'</head>' +
	'<body marginwidth="0" marginheight="0" topmargin="0" leftmargin="0">' +
	'<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="375px" height="500px">' +
	'	<param name="movie" value="/flash/t10.swf">' +
	'	<param name="quality" value="high">' +
	'	<embed src="/flash/t10.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="375px" height="500px"></embed>' +
	'</object>' +
	'</body>' +
	'</html>')
	}
}
