/* BFI.at fontsize init */
function setcookie(name, value, days, path, domain, secure) { var expires = -1; if(typeof days == "number" && days >= 0) { var d = new Date(); d.setTime(d.getTime()+(days*24*60*60*1000)); expires = d.toGMTString(); } value = escape(value); document.cookie = name + "=" + value + ";" + (expires != -1 ? " expires=" + expires + ";" : "") + (path ? "path=" + path : "") + (domain ? "; domain=" + domain : "") + (secure ? "; secure" : ""); }
function delcookie(name) { setcookie(name, "-", 0); }
function getcookie(name) { var idx = document.cookie.indexOf(name+'='); if(idx == -1) { return null; } value = document.cookie.substring(idx+name.length+1); var end = value.indexOf(';'); if(end == -1) { end = value.length; } value = value.substring(0, end); value = unescape(value); return value; }


function getFontSettings() {
	var fs;
	if(fs=getcookie('fontSize')){ changeFontSize(getcookie('fontSize')); 
		switch (fs) {
			case '15':
				MM_nbGroup('over','a01pl','site/images/a01_pl.jpg','',1);
				MM_nbGroup('down','group1','a02pl','site/images/a02_hi.jpg',1)
			break;
			case '17':
				MM_nbGroup('over','a01pl','site/images/a01_pl.jpg','',1);
				MM_nbGroup('down','group1','a03pl','site/images/a03_hi.jpg',1)
			break;
		}
	}
}


function changeFontSize(fontSize) {
	var myContent = document.getElementById('textContent');
	if (myContent.style) myContent.style.fontSize=fontSize+'px';
	
	var textElements=new Array("td","a","div","span");
	
	var p=new Array();
	for(z=0;z<textElements.length;z++) {
		var tmp=myContent.getElementsByTagName(textElements[z]);
		p=p.concat(tmp);
	}
	
   	for(i=0;i<p.length;i++) {
   		var container = p[i];
   		if (container.length>0) {
//   			container[0].className='test';
			for(j=0;j<container.length;j++) {
				
   				if (container[j].className=="") container[j].style.fontSize=fontSize+'px';
			}
   		}
   	}
   	
	setcookie('fontSize', fontSize, 365, '/');
}

/* ENDOF BFI.at fontsize init */

function BFI_checkSelect(objSel) {
	var selObj = MM_findObj(objSel);
	if (selObj.selectedIndex==0) {
		alert(objSel+' muss ausgewählt werden!');
		document.MM_returnValue=false;
	}	
}

function popupVideoTeaser() {
	wndMovie=window.open('site/_flash/player_body.swf?BufferTime=5','wndMovie','width=403,height=213,resizable=no');
}

function popupVideoTeaserChoose(flash, flashWidth, flashHeight) {
	var url='/site/_flash/'+flash;
	wndMovie=window.open(url,'wndMovie','width='+flashWidth+',height='+flashHeight+',resizable=no');
}

function overlayClose(){
	var div='overlay_div';
	document.getElementById(div).style.visibility = "hidden";
	document.getElementById(div).style.display = "none";
	document.getElementById('homenews').style.visibility = "";
	document.getElementById('strich').style.visibility = "";
	document.getElementById('aaa').style.visibility = "";
}