Mm_FlashvideoPopupParams = 'width=690,height=362,scrollbars=auto,resizable=yes,screenX=150,screenY=100';

function showReiter (name, id) 
{
	for (i=1;i<=10;i++){
		var name2 = name + i ;
		if (document.getElementById(name2)){
			if (id == i){
				document.getElementById(name2).style.background = '#ffffff';
			}
			else {
				document.getElementById(name2).style.background = '#f4f4f4';			
			}	
		}
	} 
}

function getCookieContent (cookieName) 
{
	function getCookieValue (position) 
	{
		var endpos = document.cookie.indexOf(";", position);
		if (endpos == -1)
			endpos = document.cookie.length;
		return unescape(document.cookie.substring(position, endpos));
	}
	var cookieString       = cookieName + "=";
	var cookieStringLength = cookieString.length;
	var allCookieLength    = document.cookie.length;
	var n = 0;
	while (n < allCookieLength) {
		var m = n + cookieStringLength;
		if (document.cookie.substring(n, m) == cookieString)
			return getCookieValue(m);
		n = document.cookie.indexOf(" ", n) + 1;
		if (n == 0) break;
	}
	return null;
}

	
			function SPONDetectFlashVerInit(){
				if(!document.getElementById('swfversionscript')){
					var isIE  = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
					var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
					var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;
					
					if(isIE && isWin && !isOpera){
						document.write('<scr'+'ipt id="swfversionscript" type="text/vbscript">\n');
document.write('Function SPONGetSwfVer(i)\n');
document.write('on error resume next\n');
document.write('Dim swControl, swVersion\n');
document.write('swVersion = 0\n');
document.write('set swControl = CreateObject("ShockwaveFlash.ShockwaveFlash." + CStr(i))\n');
document.write('if (IsObject(swControl)) then\n');
document.write('swVersion = swControl.GetVariable("$version")\n');
document.write('end if\n');
document.write('SPONGetSwfVer = swVersion\n');
document.write('End Function\n');
document.write('<\/scr'+'ipt>\n');
document.write('\n');

					} else {
						document.write('<scr'+'ipt id="swfversionscript" type="text/javascript">\n');
document.write('function SPONGetSwfVer(i)\n');
document.write('{\n');
document.write('if (navigator.plugins != null && navigator.plugins.length > 0) {\n');
document.write('if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) {\n');
document.write('var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";\n');
document.write('var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description;\n');
document.write('descArray = flashDescription.split(" ");\n');
document.write('tempArrayMajor = descArray[2].split(".");\n');
document.write('versionMajor = tempArrayMajor[0];\n');
document.write('versionMinor = tempArrayMajor[1];\n');
document.write('if ( descArray[3] != "" ) {tempArrayMinor = descArray[3].split("r");} else {tempArrayMinor = descArray[4].split("r");}\n');
document.write('versionRevision=tempArrayMinor[1] > 0 ? tempArrayMinor[1] : 0;\n');
document.write('// variable flashVer zusammensetzen -> analog zu ie\n');
document.write('flashVer="x " + versionMajor + "," + versionMinor + "," + versionRevision;\n');
document.write('}else{flashVer=-1;}\n');
document.write('}\n');
document.write('// MSN/WebTV 2.6 supports Flash 4\n');
document.write('else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1) flashVer = 4;\n');
document.write('// WebTV 2.5 supports Flash 3\n');
document.write('else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1) flashVer = 3;\n');
document.write('// older WebTV supports Flash 2\n');
document.write('else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 2;\n');
document.write('// Can\'t detect in all other cases\n');
document.write('else {flashVer = -1;}\n');
document.write('return flashVer;\n');
document.write('}\n');
document.write('<\/scr'+'ipt>\n');
document.write('\n');

					}
				}
			} 
		function SPONDetectFlashVer(reqMajorVer, reqMinorVer, reqRevision) 
		{
			var reqVer = parseFloat(reqMajorVer + "." + reqRevision);
			// loop backwards through the versions until we find the newest version	
			for (var i=25;i>0;i--) {
				versionStr = SPONGetSwfVer(i);
				if (versionStr == -1 ) { 
					return false;
				} else if (versionStr != 0) {
					var versionArray = new Array();
					var tempArray   = versionStr.split(" ");
					var tempString  = tempArray[1];
					versionArray    = tempString .split(",");
					var versionMajor    = versionArray[0];
					var versionMinor    = versionArray[1];
					var versionRevision = versionArray[2];
					var versionString   = versionMajor + "." + versionRevision;   // 7.0r24 == 7.24
					var versionNum      = parseFloat(versionString);
					// is the major.revision >= requested major.revision AND the minor version >= requested minor
					if ( (versionMajor > reqMajorVer) && (versionNum >= reqVer) ) {
						return true;
					} else {
						return ((versionNum >= reqVer && versionMinor >= reqMinorVer) ? true : false );	
					}
				}
			}
		}
	 function SPONLoadFlash(videoid, flashvars){
		if(document.getElementById){
			if ( SPONDetectFlashVer(7,0,14) ) {
				document.getElementById('flashvideoswf'+videoid).innerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" id="'+videoid+'" width="180" height="155">\n<param name="movie" value="http://www.manager-magazin.de/static/flash/flashvideo-180.swf" />\n<param name="quality" value="high" />\n<param name="bgcolor" value="#f2f2f2" />\n<param name="menu" value="false" />\n<param name="wmode" value="opaque" />\n<param name="allowScriptAccess" value="sameDomain" />\n<param name="FlashVars" value="'+flashvars+'" />\n<embed src="http://www.manager-magazin.de/static/flash/flashvideo-180.swf" name="'+videoid+'" type="application/x-shockwave-flash" width="180" height="155" pluginspage="http://www.macromedia.com/go/getflashplayer" quality="high" bgcolor="#f2f2f2" menu="false" wmode="opaque" allowScriptAccess="sameDomain" FlashVars="'+flashvars+'"><\/embed>\n<\/object>\n';
							 } else {  
				document.getElementById('flashvideoswf'+videoid).innerHTML = '<div style="width:100%;height:155px;padding:3px;background-color:#f0f0f0">\n<font face="verdana" size="-2">\nDer benötigte Flash Player 7 wurde nicht gefunden.<br />\nMögliche Ursachen:<br /><br />\nJavaScript erkennt den Player nicht korrekt.<br />\n		<a href="http://www.manager-magazin.de/videoplayer/0,6521,'+videoid+',00.html" title="Video abspielen..." target="SPONflashvideo" onClick="window.open(\'http://www.manager-magazin.de/videoplayer/0,6521,'+videoid+',00.html\',\'SPONflashvideo\',SpOnENV_FlashvideoPopupParams).focus();return false;">Große Version ohne Abfrage starten (Flash Player 8 erforderlich)<\/a><br /><br />\nDer Player ist nicht vorhanden.<br />\n<a href="http://www.macromedia.com/go/getflash/" target="_blank">Jetzt installieren<\/a>\n<\/font>\n<\/div>';
							 SPONShowFlashDiv(videoid);
				document.getElementById('flashvideocredit'+videoid).style.display = 'none';
			}
		}
	}


	function SPONShowFlashDiv(videoid){
		//alert('Zeige Videofenster '+videoid);
		document.getElementById('flashvideoswf'+videoid).style.zIndex=3;
		document.getElementById('flashfotocredit'+videoid).style.display = 'none';
		document.getElementById('flashvideocredit'+videoid).style.display = 'block';
	}


	function SPONVideoPopup(videoid){
		window.open('http://www.manager-magazin.de/videoplayer/0,6521,'+videoid+',00.html', 'MmFlashvideo', Mm_FlashvideoPopupParams).focus();
	}
	



