<!--
changeVar = 0;
//used
function setChangeVar(val) {
  changeVar = val;
}
//used
function redirto(id) {
	if (isNaN(id)) {
		//if the id is not numeric - handle it as it where an url - needed eg. for the heute link
		if(changeVar) { document.location.href=id; }
	} else {
		if (id!='1000000') document.location.href='http://www.zdf.de/ZDFde/inhalt/' + id % 32 + '/0,1872,' + id + ',00.html';
	}
}

//?
function jumpform(index) {
  window.location.href = index;
}

//used
function turnOff(name) {
  document.getElementById(name).style.display = 'none';
}

//used
function turnOn(name) {
  document.getElementById(name).style.display = 'block';
}

//used
function white(name) {
  document.getElementById(name).style.backgroundColor = "#FFFFFF";
  document.getElementById(name).style.color = "#FB7D19";
}

//used
function gray(name) {
  document.getElementById(name).style.backgroundColor = "";
  document.getElementById(name).style.color = "";
}

//?
function remove_miniepg_on(name) {
	document.getElementById(name).style.background = "#FB7D19 url(ZDFde/img/epg_hinter_on.jpg) repeat-x left top";
	document.getElementById(name).style.color = "#FFFFFF";
}

//?
function remove_miniepg_off(name) {
	document.getElementById(name).style.background = "#BFBFBF url(ZDFde/img/epg_hinter_off.jpg) repeat-x left top";
	document.getElementById(name).style.color = "#333333";
}

//used at LS.war
function change_day () {
  if (document.Chooser.zeitraum[6].checked == true || document.Chooser.zeitraum[5].checked == true) {
    var deaktiviert = false;
  } else {
    var deaktiviert = true;
  }
  for (var i = 1; i < 8; i++) {
    document.Chooser['weekday'+i].disabled = deaktiviert;
  }
}

//Javascript für Externe Links oder Popups Anfang
var externerLinkText = "Externer Link - Link öffnet im selben Fenster";
var textNeuesFenster = "Externer Link - Link öffnet in neuem Fenster";
var isOp = (navigator.userAgent.toLowerCase().indexOf("opera") != -1) ? true : false;

//?
function remove_titleAnpassen(linkObjekt) {
	if(linkObjekt.getAttribute) {
		textAlt = linkObjekt.getAttribute("title");
        if(textAlt.indexOf(textNeuesFenster) == -1) {
			textZusatz = textAlt.substring((textAlt.indexOf(externerLinkText)) + externerLinkText.length, textAlt.length);
            linkObjekt.setAttribute("title", " " + textNeuesFenster + textZusatz);
				}
		}
}

//?
function remove_fensterOeffnen(linkObjekt) {
	var linkHref= "";
	if (linkObjekt.getAttribute) linkHref = linkObjekt.getAttribute("href");
	if (linkHref == "") return true;
	var fensterName = "_blank";
	var externesLinkFenster = window.open(linkHref,fensterName);
	if (externesLinkFenster && !isOp) externesLinkFenster.focus();
	return (externesLinkFenster) ? false : true;
}

//used
function pop(file,windowname,features)
{
	helpwindow = window.open(file,windowname,features);
	helpwindow.focus();
	return false;
}
	
//Javascript für Externe Links oder Popups Ende

//used
function openTDFdriver(Year, DriverID) 
{
	var link_1 = "http://www.letour.fr/";
	var link_2 = "/TDF/RIDERS/de/coureurs/";
	var link_3 = ".html"
	dest = link_1 + Year + link_2 + DriverID + link_3;
	ZDF_Tour_Fahrer = window.open (dest,"Fahrer",'width=500,height=450,top=0,left=0,toolbar=0,location=0,scrollbars=1,resizable=0');
	ZDF_Tour_Fahrer.focus();
}

//used
function openTDFetapinfo(Path) 
{
	var link_1 = "http://www.zdf.de/";
	var link_2 = ".html"
	dest = link_1 + Path + link_2;
	ZDF_Tour_info = window.open (dest,"EtapInfo",'width=780,height=550,top=0,left=0,toolbar=0,location=0,scrollbars=1,resizable=0');
	ZDF_Tour_info.focus();
}

//used
function openReport(competitionid, competitionshort, seasonid, matchid) 
{
	var link_1 = "http://www.zdf.de/ZDFxt/module/ticker/index2.html?";
	var separator = ","
	var link_suffix = ".html"
	dest = link_1 + competitionid + separator + competitionshort + separator + seasonid + separator + matchid;
	ZDF_Fussball_Bericht = window.open (dest,"Spielbericht",'width=824,height=600,top=100,left=100,toolbar=0,location=0,scrollbars=1,resizable=1');
	ZDF_Fussball_Bericht.focus();
}


 //used
function getServerTimeObj() {
	var xhReq = Frontend.createXMLHttpRequest();
	// if it's not possible to create a HttpRequest-Object return no 
	// time-difference (use the client time)
	//try { xhReq.open("GET", "http://www.heute.de/ZDFheute/date", false)} catch (e)
  	try { xhReq.open("GET", "/ZDFheute/date", false)} catch (e) {      
      return new Date();}

  	try { xhReq.send(null); } catch(e) {
      return new Date(); }
  	var strTime = xhReq.responseText;
    if(!strTime) return new Date();
	var arVal = strTime.split("&");
	var strDateFormat = "";
  var year = 0;
  var month = 0;
  var day = 0;
  var hour = 0;
  var minute = 0;
	for(i=0;i<arVal.length;i++) {
    if(arVal[i].search("year=") != -1) {          
		  year = arVal[i].slice(5);
		} else if(arVal[i].search("month=") != -1) {
		  month = arVal[i].slice(6);
		} else if(arVal[i].search("day=") != -1) {
		  day = arVal[i].slice(4);          
		} else if(arVal[i].search("hour=") != -1) {
		  hour = arVal[i].slice(5);          
		} else if(arVal[i].search("minute=") != -1) {
		  minute = arVal[i].slice(7);          
		}
	}
  	var Monat = new Array();
  	Monat["Jan"] = 0;
  	Monat["Feb"] = 1;
  	Monat["Mar"] = 2;
  	Monat["Apr"] = 3;
  	Monat["May"] = 4;
  	Monat["Mai"] = 4;
  	Monat["Jun"] = 5;
  	Monat["Jul"] = 6;
  	Monat["Aug"] = 7;
  	Monat["Sep"] = 8;
  	Monat["Oct"] = 9;
  	Monat["Okt"] = 9;
  	Monat["Nov"] = 10;
  	Monat["Dec"] = 11;
  	Monat["Dez"] = 11;
	//this is the actual serverdate
	var now = new Date(year, Monat[month], day, hour, minute);
  return now;
}

 

 //Weatherselect
	
		wicon0=new Image;
		wicon0.src='/ZDF/img/weather/weather_20.gif';
		 
		wicon1=new Image;
		wicon1.src='/ZDF/img/weather/weather_21.gif';
		 
		wicon2=new Image;
		wicon2.src='/ZDF/img/weather/weather_19.gif';
		 
		wicon3=new Image;
		wicon3.src='/ZDF/img/weather/weather_19.gif';
		 
		wicon4=new Image;
		wicon4.src='/ZDF/img/weather/weather_19.gif';
		 
		wicon5=new Image;
		wicon5.src='/ZDF/img/weather/weather_21.gif';
		 
		wicon6=new Image;
		wicon6.src='/ZDF/img/weather/weather_19.gif';
		 
		wicon7=new Image;
		wicon7.src='/ZDF/img/weather/weather_19.gif';
		 
		wicon8=new Image;
		wicon8.src='/ZDF/img/weather/weather_25.gif';
		 
		wicon9=new Image;
		wicon9.src='/ZDF/img/weather/weather_19.gif';
		 
		wicon10=new Image;
		wicon10.src='/ZDF/img/weather/weather_19.gif';
		 
		wicon11=new Image;
		wicon11.src='/ZDF/img/weather/weather_20.gif';
		 
		wicon12=new Image;
		wicon12.src='/ZDF/img/weather/weather_19.gif';
		 
		wicon13=new Image;
		wicon13.src='/ZDF/img/weather/weather_19.gif';
		 
		wicon14=new Image;
		wicon14.src='/ZDF/img/weather/weather_19.gif';
		 
		wicon15=new Image;
		wicon15.src='/ZDF/img/weather/weather_20.gif';
		 
		wicon16=new Image;
		wicon16.src='/ZDF/img/weather/weather_19.gif';
		 
		wicon17=new Image;
		wicon17.src='/ZDF/img/weather/weather_21.gif';
		 
		wicon18=new Image;
		wicon18.src='/ZDF/img/weather/weather_19.gif';
		 
		wicon19=new Image;
		wicon19.src='/ZDF/img/weather/weather_19.gif';
		  
		t0=new Image;
		t0.src='/ZDFde/img/weather/t0.gif';
	
		t1=new Image;
		t1.src='/ZDFde/img/weather/t1.gif';
	
		t2=new Image;
		t2.src='/ZDFde/img/weather/t2.gif';
	
		t3=new Image;
		t3.src='/ZDFde/img/weather/t3.gif';
	
		t4=new Image;
		t4.src='/ZDFde/img/weather/t4.gif';
	
		t5=new Image;
		t5.src='/ZDFde/img/weather/t5.gif';
	
		t6=new Image;
		t6.src='/ZDFde/img/weather/t6.gif';
	
		t7=new Image;
		t7.src='/ZDFde/img/weather/t7.gif';
	
		t8=new Image;
		t8.src='/ZDFde/img/weather/t8.gif';
	
		t9=new Image;
		t9.src='/ZDFde/img/weather/t9.gif';
		tp0=new Image;
		tp0.src='/ZDFde/img/weather/tp0.gif';
		tp1=new Image;
		tp1.src='/ZDFde/img/weather/tp1.gif';
	
	var arNightTemp=new Array('-1','1','-1','6','1','-1','2','4','-1','6','1','0','3','4','2','-1','5','-2','5','3',0);
	var arDayTemp=new Array('3','2','4','9','6','1','2','10','0','9','6','3','10','7','8','3','8','0','9','10',0);
	


//used in old code
function remove_openVoteResult(strSource, width, height)
{
	voteResultWin = window.open(strSource,"voteresult","width="+width+",height="+height+",location=0,menubar=0,status=0,toolbar=0,scrollbars=0,resizable=0");
}

//used
function openVoting(strSource)
{
	votingWin = window.open(strSource,"voting","width=379,height=434,location=0,menubar=0,statusbar=0,scrollbars=0,resizable=0");
}

//USED from the sportticker!!!
function openWindow(url,name,w,h,scroll) {
				var win = null;
        LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
        TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
        eigenschaften = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable=no'
        win = window.open(url,name,eigenschaften)
}


scrollSteps = 200
timer=""

//used
function scrollWin(anchorID){

	if (navigator.userAgent.indexOf("Opera") > 0){

	}
	else {

		var s,d;
			var test1 = document.body.scrollHeight;
			var test2 = document.body.offsetHeight
			if (test1 > test2) // all but Explorer Mac
			{
				s = document.body.scrollWidth;
				d = document.body.scrollHeight;
			}
			else // Explorer Mac;
					 //would also work in Explorer 6 Strict, Mozilla and Safari
			{
				s = document.body.offsetWidth;
				d = document.body.offsetHeight;
			}


		var a,b;
			if (self.innerHeight) // all except Explorer
			{
				a = self.innerWidth;
				b = self.innerHeight;
			}
			else if (document.documentElement && document.documentElement.clientHeight)
				// Explorer 6 Strict Mode
			{
				a = document.documentElement.clientWidth;
				b = document.documentElement.clientHeight;
			}
			else if (document.body) // other Explorers
			{
				a = document.body.clientWidth;
				b = document.body.clientHeight;
			}


		var y;

			if (self.pageYOffset) // all except Explorer
			{
				y = self.pageYOffset;
			}

			else if (document.documentElement && document.documentElement.scrollTop)
				// Explorer 6 Strict
			{
				y = document.documentElement.scrollTop;
			}

			else if (document.body) // all other Explorers
			{
				y = document.body.scrollTop;
			}

		id=anchorID.substring(anchorID.indexOf("#")+1,anchorID.length)
		clearTimeout(timer)

		if (y <= document.getElementById(id).offsetTop-scrollSteps){
				window.scrollBy(0,scrollSteps)
				timer=setTimeout("scrollWin('"+id+"')",10)

		if(y > (d-b)-scrollSteps){
			clearTimeout(timer)
			y = d-b
		}

	}
	else{

	if(y >= document.getElementById(id).offsetTop+scrollSteps){
		window.scrollBy(0,-scrollSteps)
		timer=setTimeout("scrollWin('"+id+"')",10)
	}
	else{
		clearTimeout(timer)
		y = document.getElementById(id).offsetTop
	}

}

return false

}

}



//v1.7
// Flash Player Version Detection
// Detect Client Browser type
// Copyright 2005-2007 Adobe Systems Incorporated.  All rights reserved.
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;

//used internally from not used proc
function ControlVersion()
{
	var version;
	var axo;
	var e;

	// NOTE : new ActiveXObject(strFoo) throws an exception if strFoo isn't in the registry

	try {
		// version will be set for 7.X or greater players
		axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
		version = axo.GetVariable("$version");
	} catch (e) {
	}

	if (!version)
	{
		try {
			// version will be set for 6.X players only
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
			
			// installed player is some revision of 6.0
			// GetVariable("$version") crashes for versions 6.0.22 through 6.0.29,
			// so we have to be careful. 
			
			// default to the first public version
			version = "WIN 6,0,21,0";

			// throws if AllowScripAccess does not exist (introduced in 6.0r47)		
			axo.AllowScriptAccess = "always";

			// safe to call for 6.0r47 or greater
			version = axo.GetVariable("$version");

		} catch (e) {
		}
	}

	if (!version)
	{
		try {
			// version will be set for 4.X or 5.X player
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
			version = axo.GetVariable("$version");
		} catch (e) {
		}
	}

	if (!version)
	{
		try {
			// version will be set for 3.X player
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
			version = "WIN 3,0,18,0";
		} catch (e) {
		}
	}

	if (!version)
	{
		try {
			// version will be set for 2.X player
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
			version = "WIN 2,0,0,11";
		} catch (e) {
			version = -1;
		}
	}
	
	return version;
}

//used internally from not used proc
// JavaScript helper required to detect Flash Player PlugIn version information
function GetSwfVer(){
	// NS/Opera version >= 3 check for Flash plugin in plugin array
	var flashVer = -1;
	
	if (navigator.plugins != null && navigator.plugins.length > 0) {
		if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) {
			var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
			var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description;
			var descArray = flashDescription.split(" ");
			var tempArrayMajor = descArray[2].split(".");			
			var versionMajor = tempArrayMajor[0];
			var versionMinor = tempArrayMajor[1];
			var versionRevision = descArray[3];
			if (versionRevision == "") {
				versionRevision = descArray[4];
			}
			if (versionRevision[0] == "d") {
				versionRevision = versionRevision.substring(1);
			} else if (versionRevision[0] == "r") {
				versionRevision = versionRevision.substring(1);
				if (versionRevision.indexOf("d") > 0) {
					versionRevision = versionRevision.substring(0, versionRevision.indexOf("d"));
				}
			}
			var flashVer = versionMajor + "." + versionMinor + "." + versionRevision;
		}
	}
	// MSN/WebTV 2.6 supports Flash 4
	else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1) flashVer = 4;
	// WebTV 2.5 supports Flash 3
	else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1) flashVer = 3;
	// older WebTV supports Flash 2
	else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 2;
	else if ( isIE && isWin && !isOpera ) {
		flashVer = ControlVersion();
	}	
	return flashVer;
}

//?
// When called with reqMajorVer, reqMinorVer, reqRevision returns true if that version or greater is available
function remove_DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision)
{
	versionStr = GetSwfVer();
	if (versionStr == -1 ) {
		return false;
	} else if (versionStr != 0) {
		if(isIE && isWin && !isOpera) {
			// Given "WIN 2,0,0,11"
			tempArray         = versionStr.split(" "); 	// ["WIN", "2,0,0,11"]
			tempString        = tempArray[1];			// "2,0,0,11"
			versionArray      = tempString.split(",");	// ['2', '0', '0', '11']
		} else {
			versionArray      = versionStr.split(".");
		}
		var versionMajor      = versionArray[0];
		var versionMinor      = versionArray[1];
		var versionRevision   = versionArray[2];

        	// is the major.revision >= requested major.revision AND the minor version >= requested minor
		if (versionMajor > parseFloat(reqMajorVer)) {
			return true;
		} else if (versionMajor == parseFloat(reqMajorVer)) {
			if (versionMinor > parseFloat(reqMinorVer))
				return true;
			else if (versionMinor == parseFloat(reqMinorVer)) {
				if (versionRevision >= parseFloat(reqRevision))
					return true;
			}
		}
		return false;
	}
}

//used internally
function AC_AddExtension(src, ext)
{
  if (src.indexOf('?') != -1)
    return src.replace(/\?/, ext+'?');
  else
    return src + ext;
}

//used internally
function AC_Generateobj(objAttrs, params, embedAttrs)
{
  var str = '';
  if (isIE && isWin && !isOpera)
  {
    str += '<object ';
    for (var i in objAttrs)
    {
      str += i + '="' + objAttrs[i] + '" ';
    }
    str += '>';
    for (var i in params)
    {
      str += '<param name="' + i + '" value="' + params[i] + '" /> ';
    }
    str += '</object>';
  }
  else
  {
    str += '<embed ';
    for (var i in embedAttrs)
    {
      str += i + '="' + embedAttrs[i] + '" ';
    }
    str += '> </embed>';
  }

  document.write(str);
}

//used
function AC_FL_RunContent(){
  var ret =
    AC_GetArgs
    (  arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
     , "application/x-shockwave-flash"
    );
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}

//used
function AC_SW_RunContent(){
  var ret =
    AC_GetArgs
    (  arguments, ".dcr", "src", "clsid:166B1BCA-3F9C-11CF-8075-444553540000"
     , null
    );
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}

//used internally
function AC_GetArgs(args, ext, srcParamName, classid, mimeType){
  var ret = new Object();
  ret.embedAttrs = new Object();
  ret.params = new Object();
  ret.objAttrs = new Object();
  for (var i=0; i < args.length; i=i+2){
    var currArg = args[i].toLowerCase();   

    switch (currArg){   
      case "classid":
        break;
      case "pluginspage":
        ret.embedAttrs[args[i]] = args[i+1];
        break;
      case "src":
      case "movie":   
        args[i+1] = AC_AddExtension(args[i+1], ext);
        ret.embedAttrs["src"] = args[i+1];
        ret.params[srcParamName] = args[i+1];
        break;
      case "onafterupdate":
      case "onbeforeupdate":
      case "onblur":
      case "oncellchange":
      case "onclick":
      case "ondblClick":
      case "ondrag":
      case "ondragend":
      case "ondragenter":
      case "ondragleave":
      case "ondragover":
      case "ondrop":
      case "onfinish":
      case "onfocus":
      case "onhelp":
      case "onmousedown":
      case "onmouseup":
      case "onmouseover":
      case "onmousemove":
      case "onmouseout":
      case "onkeypress":
      case "onkeydown":
      case "onkeyup":
      case "onload":
      case "onlosecapture":
      case "onpropertychange":
      case "onreadystatechange":
      case "onrowsdelete":
      case "onrowenter":
      case "onrowexit":
      case "onrowsinserted":
      case "onstart":
      case "onscroll":
      case "onbeforeeditfocus":
      case "onactivate":
      case "onbeforedeactivate":
      case "ondeactivate":
      case "type":
      case "codebase":
        ret.objAttrs[args[i]] = args[i+1];
        break;
      case "id":
      case "width":
      case "height":
      case "align":
      case "vspace":
      case "hspace":
      case "class":
      case "title":
      case "accesskey":
      case "name":
      case "tabindex":
        ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];
        break;
      default:
        ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];
    }
  }
  ret.objAttrs["classid"] = classid;
  if (mimeType) ret.embedAttrs["type"] = mimeType;
  return ret;
}

/////////////////////////////////////////////////////////////////////////////////////
/// OLD functions

//FLASH

// fpi-init

var requiredVersion = 5;
var useRedirect = false;
var flash2Installed = false;
var flash3Installed = false;
var flash4Installed = false;
var flash5Installed = false;
var flash6Installed = false;
var flash7Installed = false;
var flash8Installed = false;
var flash9Installed = false;
var flash10Installed = false;
var flash11Installed = false;
var maxVersion = 10;
var actualVersion = 0;
var hasRightVersion = false;
var jsVersion = 1.0;

// fpi-writevb

var isIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
var isWin = (navigator.appVersion.indexOf("Windows") != -1) ? true : false;

jsVersion = 1.1;

if(isIE && isWin){
	document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n');
	document.write('on error resume next \n');
	document.write('flash2Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.2"))) \n');
	document.write('flash3Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.3"))) \n');
	document.write('flash4Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.4"))) \n');
	document.write('flash5Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.5"))) \n');
	document.write('flash6Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.6"))) \n');
	document.write('flash7Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.7"))) \n');
	document.write('flash8Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.8"))) \n');
	document.write('flash9Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.9"))) \n');
	document.write('flash10Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.10"))) \n');
	document.write('flash11Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.11"))) \n');
	document.write('</SCR' + 'IPT\> \n');
}


// fpi-main
//used
function detectFlash(){

	if (navigator.plugins){
		if (navigator.plugins["Shockwave Flash 2.0"]
		|| navigator.plugins["Shockwave Flash"]){
			var isVersion2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
			var flashDescription = navigator.plugins["Shockwave Flash" + isVersion2].description;
			var flashVersion = parseInt(flashDescription.charAt(flashDescription.indexOf(".") - 1));
			flash2Installed = flashVersion == 2;
			flash3Installed = flashVersion == 3;
			flash4Installed = flashVersion == 4;
			flash5Installed = flashVersion == 5;
			flash6Installed = flashVersion == 6;
			flash7Installed = flashVersion == 7;
			flash8Installed = flashVersion == 8;
			flash9Installed = flashVersion == 9;
			flash10Installed = flashVersion == 10;
			flash11Installed = flashVersion == 11;
		}
	}
	for (var i = 2; i <= maxVersion; i++) {
		if (eval("flash" + i + "Installed") == true) actualVersion = i;
	}

	if(navigator.userAgent.indexOf("WebTV") != -1) actualVersion = 2;

	if (actualVersion >= requiredVersion) {
		hasRightVersion = true;
		if (useRedirect) {
			if(jsVersion > 1.0) {
				window.location.replace(flashPage);
			} else {
				window.location = flashPage;
			}
		}
	} else {

		if (useRedirect) {
			if(jsVersion > 1.0) {
				window.location.replace((actualVersion >= 2) ? upgradePage : noFlashPage);
			} else {
				window.location = (actualVersion >= 2) ? upgradePage : noFlashPage;
			}
		}
	}
}

detectFlash();

//USED
// function for inserting flash to article text
// placement: 	used to determine the size of the flash
//				(main (476 x 236), flash-applikation (476 x 635), default (298 x 235), mediathek-popup (780 x 410)
// version: 	the ch_version field from table animation - used for checking the correct version
function func_call_animation_body(URL1, URL2, placement, version) {
	var useRedirect;
	useRedirect = false;
	
	if (!useRedirect) {

		//checking which version is needed - default to the requiredVersion var
		if ( typeof(version) == 'undefined' ) {
			version = '';
		}


		switch (version) {
			case ('5.x'):
				neededVersion = 5;
				break;
			case ('6.x'):
				neededVersion = 6;
				break;
			case ('7.x'):
				neededVersion = 7;
				break;
			case ('8.x'):
				neededVersion = 8;
				break;
			default:
				neededVersion = requiredVersion;
				break;
		}


		if ( actualVersion >= neededVersion ) {
			var oeTags = '<OBJECT CLASSID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ';
			if (placement=="main") {
				var oeTags = oeTags + 'WIDTH="476" HEIGHT="236" ';
			} else if (placement=="flash-applikation") {
				var oeTags = oeTags + 'WIDTH="476" HEIGHT="635" ';
			} else if (placement=="mediathek-popup") {
				var oeTags = oeTags + 'WIDTH="780" HEIGHT="410" ';
			} else {
				var oeTags = oeTags + 'WIDTH="298" HEIGHT="235" ';
			}
			var oeTags = oeTags
			+ 'CODEBASE="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab">'
			+ '<PARAM NAME="MOVIE" VALUE="' + URL1 + '">'
			+ '<PARAM NAME="PLAY" VALUE="true">'
			+ '<PARAM NAME="LOOP" VALUE="false">'
			+ '<PARAM NAME="QUALITY" VALUE="high">'
			+ '<PARAM NAME="MENU" VALUE="false">'
			+ '<EMBED SRC="' + URL1 + '"';
			if (placement=="main") {
				var oeTags = oeTags + 'WIDTH="476" HEIGHT="236"';
			} else if (placement=="flash-applikation") {
				var oeTags = oeTags + 'WIDTH="476" HEIGHT="635" ';
			} else if (placement=="mediathek-popup") {
				var oeTags = oeTags + 'WIDTH="780" HEIGHT="410" ';
			} else {
				var oeTags = oeTags + 'WIDTH="298" HEIGHT="235"';
			}
			var oeTags = oeTags + 'PLAY="true"'
			+ 'LOOP="false"'
			+ 'QUALITY="high"'
			+ 'MENU="false"'
			+ 'TYPE="application/x-shockwave-flash"'
			+ 'PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">'
			+ '</EMBED>'
			+ '</OBJECT>';

			document.write(oeTags);
		} else {
			if (placement=="main") {
				var alternateContent = '<IMG SRC="' + URL2 + '" WIDTH="476" HEIGHT="236" BORDER="0">';
			} else if (placement=="flash-applikation") {
				var alternateContent = '<IMG SRC="' + URL2 + '" WIDTH="476" HEIGHT="635" BORDER="0">';
			} else if (placement=="mediathek-popup") {
				var alternateContent = '<IMG SRC="' + URL2 + '" WIDTH="780" HEIGHT="410" BORDER="0">';
			} else {
				var alternateContent = '<IMG SRC="' + URL2 + '" WIDTH="298" HEIGHT="235" BORDER="0">';
			}
			document.write(alternateContent);
		}
	}
}


//-->

