var Version = 0;

function getFlash()
{

	var agent = navigator.userAgent.toLowerCase(); 
	
	// FŸr Netscape 3
	if (agent.indexOf("mozilla/3") != -1 && agent.indexOf("msie") == -1) {
		Version = 0;
	}

	// FŸr Netscape 3 und höher, Opera 3 und hšher, Internet Explorer 5 Mac und hšher
	if (navigator.plugins != null && navigator.plugins.length > 0)
	{
		var flashPlugin = navigator.plugins['Shockwave Flash'];
		if (typeof flashPlugin == 'object')
		{ 
			if (flashPlugin.description.indexOf('7.') != -1) Version = 7;
			else if (flashPlugin.description.indexOf('6.') != -1) Version = 6;
			else if (flashPlugin.description.indexOf('5.') != -1) Version = 5;
			else if (flashPlugin.description.indexOf('4.') != -1) Version = 4;
			else if (flashPlugin.description.indexOf('3.') != -1) Version = 3;
		}
	}

	// FŸr Internet Explorer 4 Windows und hšher
	else if (agent.indexOf("msie") != -1 && parseInt(navigator.appVersion) >= 4 && agent.indexOf("win")!=-1 && agent.indexOf("16bit")==-1) 		{
		document.write('<scr' + 'ipt language="VBScript"\> \n');
		document.write('on error resume next \n');
		document.write('dim obFlash \n');
		document.write('set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash.7") \n');
		document.write('if IsObject(obFlash) then \n');
		document.write('Version = 7 \n');
		document.write('else set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash.6") end if \n');
		document.write('if Version < 7 and IsObject(obFlash) then \n');
		document.write('Version = 6 \n');
		document.write('else set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash.5") end if \n');
		document.write('if Version < 6 and IsObject(obFlash) then \n');
		document.write('Version = 5 \n');
		document.write('else set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash.4") end if \n');
		document.write('if Version < 5 and IsObject(obFlash) then \n');
		document.write('Version = 4 \n');
		document.write('else set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash.3") end if \n');
		document.write('if Version < 4 and IsObject(obFlash) then \n');
		document.write('Version = 3 \n');
		document.write('end if');
		document.write('</scr' + 'ipt\> \n');
	}

	// FŸr WebTV 2.5
	else if (agent.indexOf("webtv/2.5") != -1) Version = 3;

	// FŸr Šlteres WebTV
	else if (agent.indexOf("webtv") != -1) Version = 2;

	// Alles andere
	else
	{
		Version = -1;
	}

	return Version;
}
