is_inited = 0;
var myAccordion;
function akk_init(id,zeile_active,zeile_passive, schrift_aktiv, schrift_passiv)
{
	if(!is_inited || 1)
	{
		myAccordion = new Fx.Accordion($$('.projekt_toggler'), $$('.projekt_element'), {
			display: -1,
			alwaysHide: true, 
			onActive: function(toggler, element) { toggler.setStyle('background', zeile_active); toggler.isActive = true; element.tween('margin-bottom', '50px');}, 
			onBackground: function(toggler, element) { toggler.setStyle('background', zeile_passive); toggler.isActive = false; element.tween('margin-bottom', '0px');} 
		});
		$$('.projekt_toggler').removeEvents('mouseenter', 'mouseleave');
		$$('.projekt_toggler').addEvent('mouseenter', function(){
			if(!this.isActive)
			{
				this.setStyle('background', zeile_active);
				this.setStyle('color', schrift_aktiv);
			}
		});
		$$('.projekt_toggler').addEvent('mouseleave', function(){
			if(!this.isActive)
			{
				this.setStyle('background', zeile_passive);
				this.setStyle('color', schrift_passiv);
			}
		});
		is_inited = 1;
	}
}
function openInNewWindow(link, where) {
	if(where == '_blank')
	{
		var newWindow = window.open(link, '_blank');
		newWindow.focus();
	}
	else
	{
		location.href = link;
	}
	return false;
}
function filter (link,tab,code){
	location.href = link + '?' + code + '=' + document.getElementById(code).value + '&tab_id=' + tab;
}
function openTab(id){
	myAccordion.display(id);
}
