function detect_flash() {
	var flashVersion = '';

	if(!cookie_enabled()) return '';

	if(location.href.indexOf('flashver=') >= 0) return '';

	// NS3+, Opera3+, IE5+ Mac (support plugin array):  check for Flash plugin in plugin array
	if (navigator.plugins != null && navigator.plugins.length > 0) {
		var flashPlugin = navigator.plugins['Shockwave Flash'];
		if (typeof flashPlugin == 'object') { 
			var version_info = flashPlugin.description.match(/^shockwave flash ([\d.]*)\s+(r[\d.]*)?$/i);
			if(version_info.length > 1) {
				flashVersion = version_info[1]
				if(version_info.length > 2) {
					flashVersion = flashVersion + "." + version_info[2].substr(1);
				}
			}
			else
				flashVersion = '1';
		}
	} else {
		var flashMajor = 7;
		var flashPlugin = 0;
		while(typeof(flashPlugin) != 'object' && flashMajor >= 4) {
			eval('try { flashPlugin = new ActiveXObject("ShockwaveFlash.ShockwaveFlash." + flashMajor); } catch(er) { flashMajor--; }');
		}
		flashVersion = '' + flashMajor;
	}
	return flashVersion;
}

function cookie_enabled() {
	var cookieEnabled = false;

	if ((typeof navigator.cookieEnabled)=="undefined"){ 
		document.cookie="go_flash_testcookie"
		cookieEnabled = (document.cookie.indexOf("go_flash_testcookie")<0) ? false : true;
		document.cookie="" //erase dummy value
	}
	else
		cookieEnabled = navigator.cookieEnabled;

	return cookieEnabled;
}

