function replaceFonts(){
	if(typeof sIFR == "function"){
		sIFR.replaceElement(named({sSelector:"h1.article", sFlashSrc:"fileadmin/planet_OOE/swf/imago_medium.swf", sColor:"#62BD19", sLinkColor:"#62BD19", sBgColor:"#F9F5EC", sHoverColor:"#62BD19", nPaddingTop:0, nPaddingBottom:0}));
		sIFR.replaceElement(named({sSelector:"h1.headline", sFlashSrc:"fileadmin/planet_OOE/swf/imago_medium.swf", sColor:"#62BD19", sLinkColor:"#62BD19", sBgColor:"#EAEED6", sHoverColor:"#62BD19", nPaddingTop:0, nPaddingBottom:0}));
		sIFR.replaceElement(named({sSelector:"h4", sFlashSrc:"fileadmin/planet_OOE/swf/imago_medium.swf", sColor:"#000000", sLinkColor:"#000000", sBgColor:"#F9F5EC", sHoverColor:"#000000", 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 contentElement = document.getElementById('content');
			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';
			}
		}
	}
}

function setRSS() {
	if (document.getElementById) {
		var windowHeight = getWindowHeight();
		if (windowHeight > 0) {
			var contentHeight = document.getElementById('container').offsetHeight;
			var footerElement = document.getElementById('footer');
			var rssDiv = document.getElementById('rss');
			var leftDiv = document.getElementById('contentleft');
			var contentDiv = document.getElementById('content');
			var footerHeight  = footerElement.offsetHeight;
			//rssDiv.style.position = 'relative';
			//rssDiv.style.bottom = footerElement.style.top;
		}
	}
}


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

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



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


function teaserOver(obj) {
	
    if(obj.className != 'teaseritemactive'){
		obj.className = "teaseritemactive";
	}
	return;
}

function teaserOut(obj) {
    if(obj.className != 'teaseritem'){
		obj.className = "teaseritem";
	}
	return;
}

function attachTeaserEffect(){
	if (document.getElementById && document.createTextNode) {
		var contentMain = document.getElementById('contentmain');
		var divs = contentMain.getElementsByTagName('div');
   		for (var i=0;i<divs.length;i++) {
   			if(divs[i].className=='teaseritem'){
   				divs[i].onmouseover = function(){this.className='teaseritemactive'; return false}
   				divs[i].onmouseout = function(){this.className='teaseritem'; return false}
   			}
			/* 
			//left align all images
			var imgs = divs[i].getElementsByTagName('img');
			for(var j=0; j < imgs.length; j++){
				imgs[j].setAttribute("align", "left");
			}
			*/
  		}
 	}
}