/* Fuer den Domainchecker - Fehler-Meldungen */

document.small_error1_top = -200;
document.small_error1_left = -200;

/* ######################################################################################################## */
	/**
	  * 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 Quell-Location- und Parameteruebergabe */
function popUPwS(ziel, quelle, breite, hoehe, scrol, resize) {
  var links = screen.width - breite; //Bildschirmbreite
  var hoch = screen.height - hoehe; //Bildschirmhhe
  var popleft = links/2;
  var poptop = hoch/2;
  oWindow = window.open(ziel, "", "width="+ breite +",height=" + hoehe +",top="+ poptop +",left="+ popleft +",resizable="+ resize +",directories=no,scrollbars="+ scrol +",menubar=no,location=no,toolbar=no")
  oWindow.name = quelle;
  oWindow.focus();
}

/* 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+'');
}
/* ######################################################################################################## */


/* 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	


/* ######################################################################################################## */

/* =============================================================================================
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 */ 
/* =====================================================================================*/
