/*
function replaceFonts(){

	if(typeof sIFR == "function"){
		sIFR.replaceElement(named({sSelector:"h1", sFlashSrc:"fileadmin/beast/swf/fago_med.swf", sColor:"#69737D", sLinkColor:"#69737D", sBgColor:"#FFFFFFF", sHoverColor:"#FFFFFFF", nPaddingTop:0, nPaddingBottom:18}));
		sIFR.replaceElement(named({sSelector:"h2", sFlashSrc:"fileadmin/beast/swf/fago_med.swf", sColor:"#69737D", sLinkColor:"#69737D", sBgColor:"#FFFFFFF", sHoverColor:"#FFFFFFF", nPaddingTop:0, nPaddingBottom:15}));
		sIFR.replaceElement(named({sSelector:"h3", sFlashSrc:"fileadmin/beast/swf/fago_med.swf", sColor:"#AD0000", sLinkColor:"#AD0000", sBgColor:"#FFFFFFF", sHoverColor:"#AD0000", nPaddingTop:0, nPaddingBottom:11}));
		sIFR.replaceElement(named({sSelector:"h5", sFlashSrc:"fileadmin/beast/swf/fago_med.swf", sColor:"#AD0000", sLinkColor:"#AD0000", sBgColor:"#FFFFFFF", sHoverColor:"#AD0000", nPaddingTop:0, nPaddingBottom:0}));
	}

}
*/

function openPopUp(mypage, myname, w, h) {
  var winl = (screen.width - w) / 2;
  var wint = (screen.height - h) / 2;
  winprops = 'height='+h+',width='+w+',scrollbars=0,resizable=0';
  newwin = window.open(mypage, myname, winprops);
  if (newwin.opener == null) { // for Nav 2.0x 
   newwin.opener = self; // this creates and sets a new property 
  }
  if (parseInt(navigator.appVersion) >= 4) { newwin.window.focus(); }
}


function centerPopUp(mypage, myname, w, h) {
  var winl = (screen.width - w) / 2;
  var wint = (screen.height - h) / 2;
  winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars=0,resizable=0';
  newwin = window.open(mypage, myname, winprops);
  if (newwin.opener == null) { // for Nav 2.0x 
   newwin.opener = self; // this creates and sets a new property 
  }
  if (parseInt(navigator.appVersion) >= 4) { newwin.window.focus(); }
}


function getWindowHeight() {
	var windowHeight = 0;
	if (typeof(window.innerHeight) == 'number') {
		windowHeight = window.innerHeight;
	}
	else {
		if (document.documentElement && document.documentElement.clientHeight) {
			windowHeight = document.documentElement.clientHeight;
		}
		else {
			if (document.body && document.body.clientHeight) {
				windowHeight = document.body.clientHeight;
			}
		}
	}
	return windowHeight;
}

function setFooter() {
	if (document.getElementById) {
		var windowHeight = getWindowHeight();
		if (windowHeight > 0) {
			var contentHeight = document.getElementById('container').offsetHeight;
			var footerElement = document.getElementById('footer');
			var wrapperElement = document.getElementById('wrapper');
			var footerHeight  = footerElement.offsetHeight;
			
			if (windowHeight - (contentHeight + footerHeight) >= 0) {
				footerElement.style.position = 'relative';
				footerElement.style.top = (windowHeight - (contentHeight + footerHeight)) + 'px';
				wrapperElement.style.height = windowHeight + 'px';
			}
			else {
				footerElement.style.position = 'static';
			}
		}
	}
}


/*
window.onload = function() {
	setFooter();
}

window.onresize = function() {
	setFooter();
}

*/

function toggle( targetId ) {
	if (document.getElementById) {
		target = document.getElementById( targetId );
		if (target.style.display == "none"){
			target.style.display = "";
		} else {
			target.style.display = "none";
		}
	}
}

function toggleInline( targetId ) {
	if (document.getElementById) {
		target = document.getElementById( targetId );
		if (target.style.display == "inline"){
			target.style.display = "none";
		} else {
			target.style.display = "inline";
		}
	}
}

function show( targetId ) {
	if (document.getElementById) {
		target = document.getElementById( targetId );
		if (target.style.display == "none"){
			target.style.display = "block";
		}
	}
}
function hide( targetId ) {
	if (document.getElementById) {
		target = document.getElementById( targetId );
		if (target.style.display == "block"){
			target.style.display = "none";
		}
	}
}


function printPage(){
	if(window.print){
		window.print();
	}else{
		alert('Bitte drücken Sie "Strg + p" um die Seite zu drucken oder verwenden Sie die Druckfunktion von ihrem Brower.');
	}
}