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

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.');
	}
}


 // this function is needed to work around 
  // a bug in IE related to element attributes
  function hasClass(obj) {
     var result = false;
     if (obj.getAttributeNode("class") != null) {
         result = obj.getAttributeNode("class").value;
     }
     return result;
  }   

 function stripe(id) {

    // the flag we'll use to keep track of 
    // whether the current row is odd or even
    var even = false;
  
    // if arguments are provided to specify the colours
    // of the even & odd rows, then use the them;
    // otherwise use the following defaults:
    var evenClass = arguments[1] ? arguments[1] : "clientlist_item";
    var oddClass = arguments[2] ? arguments[2] : "clientlist_item2";
  
    // obtain a reference to the desired table
    // if no such table exists, abort
    var table = document.getElementById(id);
    if (! table) { return; }
    

    // find all the &lt;tr&gt; elements... 
    var trs = table.getElementsByTagName("tr");
      
    // ... and iterate through them
    for (var i = 0; i < trs.length; i++) {
      if (hasClass(trs[i]) == 'clientlist_item') {
 	    trs[i].className  = even ? evenClass : oddClass;         
      }
      // flip from odd to even, or vice-versa
      even =  ! even;
    }
  }
