function toggleSitemap () {
	var s = $('sitemap');	
	var sl = $('sitemapLink');
	
	if (s.visible()) {
	 	Effect.BlindUp(s, {duration: 0.5});
		sl.removeClassName('opened').addClassName('closed').innerHTML = 'Sitemap';
	} else {
	 	Effect.BlindDown(s, {duration: 0.5});
		sl.removeClassName('closed').addClassName('opened').innerHTML = 'Close sitemap';
	}
}
function FlashAdjustHeight (h) {
	$('flashbox').style.height = (h)+"px";
}

var lastopened = null;
var singleOpen = true;	
function showContent (foldID) {
	var fold = $(foldID+'_content');
	var animDuration = 0.3;
	var btn;
	if (fold) {
		if (fold.visible()) {
			if (fold.currentEffekt && fold.currentEffekt.state != "finished") {
				return; 
			}
			btn = $(foldID);
			btn.className = 'bbFold';			
			fold.currentEffekt = new Effect.BlindUp(fold, {duration:animDuration});
			lastopened=null;
			
		} else {
			if (fold.currentEffekt && fold.currentEffekt.state != "finished") {
					return; 
			}
			if(lastopened!=null && lastopened!=fold && singleOpen){				
				last=$(lastopened+'_content');
				$(lastopened).className='bbFold';
				new Effect.BlindUp(last,{duration:animDuration});
			}
	    	btn = $(foldID);
			btn.className = 'bbFold_aktiv';			
			lastopened=foldID;
			fold.currentEffekt = new Effect.BlindDown(fold, {duration:animDuration});		
				
		}
		btn.blur();
	}
}
function setMouseOver (obj) {
	obj = $(obj);	
	if (obj && obj.className == 'bbFold') {
		obj.className = 'bbFold_over';
	}
}
function setMouseOut (obj) {
	obj = $(obj);
	if (obj && obj.className == 'bbFold_over') {
		obj.className = 'bbFold';
	}
}

var sh = screen.height;
var sw = screen.width;
function openBew(url) {
	var xpos = parseInt((sw - 500) / 2);
	var ypos = 10;
	var iWnd = window.open(''+url+'', 'bewerbung','resizable=yes,scrollbars=yes,menubar=no,location=no,toolbar=no,status=no,width=600,height=820,top=' + ypos + ',left=' + xpos);
	iWnd.focus()
}

