function getScrollerWidth() {
	var scr = null;
	var inn = null;
	var wNoScroll = 0;
	var wScroll = 0;

	// Outer scrolling div
	scr = document.createElement('div');
	scr.style.position = 'absolute';
	scr.style.top = '-1000px';
	scr.style.left = '-1000px';
	scr.style.width = '100px';
	scr.style.height = '50px';
	// Start with no scrollbar
	scr.style.overflow = 'hidden';

	// Inner content div
	inn = document.createElement('div');
	inn.style.width = '100%';
	inn.style.height = '200px';

	// Put the inner div in the scrolling div
	scr.appendChild(inn);
	// Append the scrolling div to the doc
	document.body.appendChild(scr);

	// Width of the inner div without scrollbar
	wNoScroll = inn.offsetWidth;
	// Add the scrollbar
	scr.style.overflow = 'auto';
	// Width of the inner div with scrollbar
	wScroll = inn.offsetWidth;

	// Remove the scrolling div from the doc
	document.body.removeChild(document.body.lastChild);

	// Pixel width of the scroller
	return (wNoScroll - wScroll);
}

// Get the height/width of the entire document
function getDocumentHeight() {
	var a=0,b=0;
	if (!isNaN(document.body.parentNode.scrollHeight)) a=document.body.parentNode.scrollHeight;
	if (!isNaN(window.innerHeight)) b=window.innerHeight;
	return Math.max(a,b);
}
function getDocumentWidth() {
	var a=0,b=0;
	if (!isNaN(document.body.parentNode.scrollWidth)) a=document.body.parentNode.scrollWidth;
	if (!isNaN(window.innerWidth)) b=window.innerWidth;
	var w = Math.max(a,b);
	// keine horizontalen Scrollbalken erzeugen, nur weil schon ein vertikaler da ist
	if (window.innerHeight < document.body.parentNode.scrollHeight) {
		w -= getScrollerWidth();
	}
	return w;
}

function do_onload_stuff() {
	if ($('shadowlayer')) {
		var hgt = getDocumentHeight();
		var wdt = getDocumentWidth();
		$('shadowlayer').style.height = hgt+"px";
		$('shadowlayer').style.width = wdt+"px";
	}
}

function hideShadow() {
	$('shadowlayer').hide();
}

function showPic(src, breite, hoehe, alt) {
	do_onload_stuff();
	var img = "<img src=\"" + src + "\" width=\"" + breite + "\" height=\"" + hoehe + "\" alt=\"" + alt + "\" title=\"" + alt + "\">";
	$('bild_vergroessert').innerHTML = img;
	$('bild_gross').style.width = breite+"px";
	$('bild_gross_container').show();
	jQuery('#shadowlayer').show().fadeTo('slow',.5);
}

function hidePic() {
	$('bild_gross_container').hide();
	jQuery('#shadowlayer').fadeTo('slow',0.01,hideShadow);
}

function prepareLinks() { }

