function druckversion(oLink, id, tmpParams) {
	if (oLink.target != '_blank') {
		oLink.href = '/index.php?id=' + id + tmpParams + '&druckversion=1';
		oLink.target = '_blank';
	}
}


function heightInhalt() {
	var divOben = document.getElementById('top');
	var divLinks = document.getElementById('left');
	var divInhalt = document.getElementById('content');
	divInhalt.style.height = 'auto';
	divInhalt.className = '';
	var hClient = document.documentElement.clientHeight;
	var hOben = divOben.offsetHeight;
	var hLinks = divLinks.offsetHeight;
	var hInhalt = divInhalt.offsetHeight;
	var paddingBottom = 100;
	var hSpace =  hClient - hOben - paddingBottom;
	
	if (hInhalt > hSpace) {
		if (hLinks > hSpace) {
			hSpace = hLinks;
		}
		divInhalt.style.height = hSpace + 'px';
		divInhalt.className = 'scroll';
	}
}


var slideshowCount = 0;
var slideshowLimit = 1;
var intSlideshow = null;

function slideshow(fade) {
	var $old = $j('#slideshow img.first');
	var $new = $old.next().length ? $old.next() : $j('#slideshow img:first');
	$old.addClass('middle');
	$old.removeClass('first');
	$new.css({opacity: 0.0});
	$new.addClass('first');
	$new.animate({opacity: 1.0}, fade, function() {
		$old.removeClass('middle');
	});
	
	if (slideshowLimit > 0) {
		if (slideshowCount <= slideshowLimit) {
			clearInterval(intSlideshow);
		}
		slideshowCount++;
	}
}

function slideshowInterval(fade, pause, limit) {
	document.getElementById('slideshow').className += ' visible';
	
	slideshowLimit = 0;
	if (limit > 0) {
		slideshowLimit = limit;
	}
	intSlideshow = setInterval('slideshow(' + fade + ')', pause);
}

function printFunction(oLink, id, tmpParams) {
	if (oLink.target != '_blank') {
		oLink.href = '/index.php?id=' + id + tmpParams + '&print=1';
		oLink.target = '_blank';
	}
}