/*
 * v. 1.0
 *
 */

var res = fDetect(minVer, 10);

if (!res[0] || res[0] < minVer) {
	fpMsg(minVer, res[0]);
}

function fDetect(req, m) {
	var avs = navigator.appVersion
	var vers = parseInt(avs, 10);
	if (avs.indexOf("MSIE") > 0) {
		vers = parseInt(avs.substr(avs.indexOf("MSIE") + 5, 1));
	}
	var ie = navigator.appName.indexOf("Microsoft") >= 0;
	var avail = 0;
	if (typeof(navigator.plugins["Shockwave Flash"]) == "object") {
		var desc = navigator.plugins["Shockwave Flash"].description;
		avail = desc.substr(16, (desc.indexOf(".", 16) - 16));
	} else if (typeof(ActiveXObject) == "function") {
		for (var i = 5; i < (m + 1); i ++) {
			try {
				if (typeof(new ActiveXObject("ShockwaveFlash.ShockwaveFlash." + i)) == "object") {
					avail = i;
				}
		   } catch(e) {
		   }
		}
	}
	if (!avail && ie && vers > 6) {
		avail = req;
	}
	return [avail, req];
}

function fpMsg(v, av) {
	var arr = document.getElementsByTagName("object");
	for (var i=0; i<arr.length; i++) {
		arr[i].style.display = "none";
	}
	var arr = document.getElementsByTagName("embed");
	for (var i=0; i<arr.length; i++) {
		arr[i].style.display = "none";
	}
	document.body.style.overflow = "hidden";
	document.write('<div style="position:absolute;z-index:507;margin:0;padding:0;left:0;top:0;width:100%;height:100%;background-color:#CCCCFF;filter:Alpha(opacity=80); -moz-opacity:0.8;opacity:0.8"></div>');
	document.write('<div style="position:absolute;z-index:508;margin:0;padding:0;left:0;top:0;width:100%;height:100%;background-color:transparent;">');
	document.write('	<h1 style="font-family:Arial,Verdana,Sans-Serif;font-size:22px;font-weight:bold;text-align:center;margin:20px;margin-top:100px;padding:0;color:#000000">');
	document.write('		Diese Seite erfordert Flashplayer ' + v + ' und h&ouml;her');
	document.write('	</h1>');
	document.write('	<p style="font-family:Arial,Verdana,Sans-Serif;font-size:14px;font-weight:bold;text-align:center;margin:20px;margin-bottom:10px;color:#000000"">');
	document.write('		<a href="http://www.adobe.com/go/getflashplayer" style="color:#000000;">');
	document.write('			Klicken Sie hier, um den aktuellen Flashplayer herunterzuladen.');
	document.write('		</a>');
	document.write('	</p>');
	document.write('	<p style="font-family:Arial,Verdana,Sans-Serif;font-size:11px;font-weight:bold;text-align:center;margin:2px;color:#555555"">');
	document.write('		Sie werden nach ' + delay + ' Sekunden automatisch zum Flashplayer-Download weitergeleitet');
	document.write('	</p>');
	document.write('');
	document.write('</div>');
	setTimeout("getFp()", delay * 1000);
}

function getFp() {
	self.location.href = "http://www.adobe.com/go/getflashplayer";
}
