/* Fuer den Domainchecker - Fehler-Meldungen */

document.small_error1_top = -200;
document.small_error1_left = -200;

/* ######################################################################################################## */
/* Popup Funktion fuer Linke-Navi Multi-Server Teilnahmebedingungen */
function openMultiPop(){
obj=open("/server/dedicated/multi-server/teilnahmebedingungen.html", "popup", "width=650,height=500,directories=no,scrollbars=yes,menubar=no,resizable=no,status=no,toolbar=no")
obj.window.focus()
}


/* ######################################################################################################## */
	/**
	  * Funktion fuer Buttons, die aus einem Popup heraus geoeffnet werden 
	  * altes Popup-Fenster schliessen und neue Seite im Browser-Fenster oeffnen
	  */
	function openInNewWindow(_url){
		var url = _url;
		window.opener.location.href = url;
		window.close();
	}


/* ######################################################################################################## */

/* Einfache Ein- und Ausblenden Funktion */
function showArea(iNumber) {

	if (! iNumber || iNumber != parseInt(iNumber)) { return; }
	var iLauf = 0;
	while ( ++iLauf > 0 && window.document.getElementById('show_'+iLauf+'_3')
	) {
		if (iNumber == iLauf) {
			window.document.getElementById('show_'+iLauf+'_1').style.display = "none";
			window.document.getElementById('show_'+iLauf+'_2').style.display = "block";
			window.document.getElementById('show_'+iLauf+'_3').style.display = "block";
		} else {
			window.document.getElementById('show_'+iLauf+'_1').style.display = "block";
			window.document.getElementById('show_'+iLauf+'_2').style.display = "none";
			window.document.getElementById('show_'+iLauf+'_3').style.display = "none";
		}
	}
}//showArea

function hideArea(iNumber) {

	if (! iNumber || iNumber != parseInt(iNumber)) { return; }
	var iLauf = 0;
	while ( ++iLauf > 0 && window.document.getElementById('show_'+iLauf+'_3')
	) {
		if (iNumber == iLauf) {
			window.document.getElementById('show_'+iLauf+'_1').style.display = "block";
			window.document.getElementById('show_'+iLauf+'_2').style.display = "none";
			window.document.getElementById('show_'+iLauf+'_3').style.display = "none";
		} else {
			window.document.getElementById('show_'+iLauf+'_1').style.display = "block";
			window.document.getElementById('show_'+iLauf+'_2').style.display = "none";
			window.document.getElementById('show_'+iLauf+'_3').style.display = "none";
		}
	}
}//hideArea


/* ######################################################################################################## */


/* Einfache Einblenden Funktion */
function showSimple(iNumber) {

	if (! iNumber || iNumber != parseInt(iNumber)) { return; }
	var iLauf = 0;
	while ( ++iLauf > 0 && window.document.getElementById('showSimple_'+iLauf)
	) {
		if (iNumber == iLauf) {
			window.document.getElementById('showSimple_'+iLauf).style.display = "block";
		} else {
			window.document.getElementById('showSimple_'+iLauf).style.display = "none";

		}
	}
}//showSimple
/* ######################################################################################################## */


/* FAQ Toggle Funktion */
function toggleFaqEntry(obj) {
	 if(obj.className == "active")
	  obj.className = "";
	 else {
	  for(i=0; i<obj.parentNode.childNodes.length; i++) {
	   obj.parentNode.childNodes[i].className = "";
	  }
	  obj.className = "active";
	 }
	}

	function openFaqEntry() {
	 document.getElementById(location.href.substring(location.href.lastIndexOf("#")+1,location.href.length)).className = "active";
	}
	
/* ######################################################################################################## */


/* Erweiterte PopUp-Funktion mit Parameteruebergabe */
function popup(url, breite, hoehe, scrol, resize){
var links = screen.width - breite; //Bildschirmbreite
var hoch = screen.height - hoehe; //Bildschirmhhe
var popleft = links/2;
var poptop = hoch/2;
obj=open(url, "popup", "width="+ breite +",height=" + hoehe +",top="+ poptop +",left="+ popleft +",resizable="+ resize +",directories=no,scrollbars="+ scrol +",menubar=no,location=no,toolbar=no")
obj.window.focus()
}

/* ######################################################################################################## */


/* Einfache PopUp-Funktion */
function openPop(URLStr, winWidthStr, winHeightStr){

var winWidth=winWidthStr; 
var winHeight=winHeightStr; 

winWidthPos =(screen.availWidth/2)-(winWidth/2); 
winHeightPos =(screen.availHeight/2)-(winHeight/2); 	
	
		
  popWin = open(URLStr, 'popUpWin', 'toolbar=no,status=no,menubar=no,scrollbars=yes,resizable=no,width='+winWidth+'px'+',height='+winHeight+'px'+',left='+winWidthPos+', top='+winHeightPos+',screenX='+winWidthPos+',screenY='+winHeightPos+'');
}
/* ######################################################################################################## */


/* Zweite Erweiterte PopUp-Funktion mit Parameteruebergabe */

var winpop;
//var img;
//var w;
function popup2(url, winBreite, winHoehe, posLinks, posTop, linkfield, options, winname) {	
	var screenBreite = (screen.availWidth) ? screen.availWidth : 800;
	var screenHoehe = (screen.availHeight) ? screen.availHeight : 600;
	if ((winBreite != null) && (winBreite <= 100)) winBreite = 100;
	if ((winBreite == null) || (winBreite < 100) || (winBreite > screenBreite)) winBreite = screenBreite - 100;
	if ((winHoehe != null) && (winHoehe <= 100)) winHoehe = 100;
	if ((winHoehe == null) || (winHoehe < 100) || (winHoehe > screenHoehe-120)) winHoehe = screenHoehe - 120;
	if ( (posLinks == null) || (posLinks < 0) || (screenBreite < posLinks + winBreite) ) posLinks = (screenBreite - winBreite) / 2; // mitte des bildschirms
	if ( (posTop == null) || (posTop < 0) || (screenHoehe < posTop + winHoehe) ) posTop = (screenHoehe - winHoehe) / 2 - 20; // mitte des bildschirms
	if (posTop < 0) posTop = 0;
	if (winpop && (winpop.closed != true)) winpop.close();
	if (!options) options = 'toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1';
    if (!winname) winname = 'w';
	winpop = window.open(escapeZoomURL(url), winname, options + ',width=' +winBreite+ ',height=' +winHoehe+ ',left=' +posLinks+ ',top=' +posTop);
	if (linkfield) winpop.w = linkfield;
	winpop.focus();
	return false;
}

/* ######################################################################################################## */

/* Ein- und Ausblenden-Funktion fuer FourSteps-Modul */

function change_Cnt(iStep, iCnt) {
		var iLauf = 1;
		while (window.document.getElementById('step'+iLauf)) {
			if (iLauf == iStep) {
				window.document.getElementById('cnt'+iLauf).style.display = 'block';
				window.document.getElementById('step'+iLauf).className = "activ";
			} else {
				window.document.getElementById('cnt'+iLauf).style.display = 'none';
				window.document.getElementById('step'+iLauf).className = "passiv";
			}
			iLauf++;
		}
	}//change_Cnt

/* Ein- und Ausblenden-Funktion mit GoogleVideo fuer FourSteps-Modul */
function change_cnt_4steps(iStep, iCnt, google_video) {
		var iLauf = 1;
		while (window.document.getElementById('step'+iLauf)) {
			if (iLauf == iStep) {
				if (google_video) {
					var flashvars = false;
					var params = {
					  wmode: "transparent",
					  allowscriptaccess: "sameDomain",
					  menu:true
					};
					var attributes = false;
				swfobject.embedSWF("/imperia/md/content/strato_de/flash/google/google_video.swf", "cnt_google_video", "512", "356", "8.0.0", "expressInstall.swf", flashvars, params, attributes);
				window.document.getElementById('cnt'+iLauf).style.display = 'block';
				window.document.getElementById('step'+iLauf).className = "activ";
				} else {
				window.document.getElementById('cnt'+iLauf).style.display = 'block';
				window.document.getElementById('step'+iLauf).className = "activ";
				swfobject.embedSWF("ie_no_sound.swf", "cnt_google_video", "512", "356", "8.0.0", "expressInstall.swf", flashvars, params, attributes);
				
				}	
				
			} else {
				window.document.getElementById('cnt'+iLauf).style.display = 'none';
				window.document.getElementById('step'+iLauf).className = "passiv";
				
			}
			iLauf++;
		}
	}//change_cnt_4steps	


/* #################################################################################################################### */


/* Autorun-Funktion fuer Flash-Videos */

//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;

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;
}

// 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 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;
	}
}


/* ######################################################################################################## */

/* =============================================================================================
ANFANG - Globales Popup-Script. Sämtliche Einstellungen lassen 
sich damit dezentral direkt im Aufruf des Popups vornehmen. 
Dadurch brauchen wir nicht mehr fuer jedes Popup eine Extra Funktion!
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
So sieht der Popup-Aufruf: <a onclick="globalPopup('/verzeichnis/seite.html','name',
'height=100,width=100,scrollbars=yes,menubar=no,toolbar=no');return false;">Link</a>
===============================================================================================*/
function globalPopup(url,name,params) {
 var sizeX = 0;
 var sizeY = 0;
 var winX = screen.availWidth;
 var winY = screen.availHeight;
 var tmpArray = params.split(',');
 for (var i = 0; i < tmpArray.length; i++) {
  if (tmpArray[i].indexOf('width') != -1) {
   var tmpArray2 = tmpArray[i].split('=');
   sizeX = tmpArray2[1];
  }
  if (tmpArray[i].indexOf('height') != -1) {
   var tmpArray2 = tmpArray[i].split('=');
   sizeY = tmpArray2[1];
  }
 }
 var centerX = Math.round(winX / 2 - sizeX / 2);
 var centerY = Math.round(winY / 2 - sizeY / 2);
 params += ',left=' + centerX + ',top=' + centerY;
 var pWindow = open(url,name,params).focus();
}
/* =====================================================================================*/
/* ENDE - Globales Popup-Scripts */ 
/* =====================================================================================*/