function correctBG(){
	var aryViewPort = getViewportSize();
	var intWebsiteViewPort = 945;
	var intLeftImage = 707; //688; jetzt bündig mit Navi und vorher bündig mit Viewport
	var intRightImage = 173;
	var intSidebarLeftWidth = 205;
	var intSidebarRightWidth = 164;
	
	if(hasScrollbar())
		aryViewPort[1] -= getScrollerWidth();
	
	var intMitte = aryViewPort[1] / 2;
	var intHalfWebsite = intWebsiteViewPort / 2;
	var intLinksWebsite = intMitte - intHalfWebsite;
	
	document.getElementById("bg-left").style.display = "block";
	document.getElementById("bg-right").style.display = "block";
	
	if(aryViewPort[1] > intWebsiteViewPort){
		document.getElementById("bg-left").style.left = (intLinksWebsite - intLeftImage + intSidebarLeftWidth) + "px";
		document.getElementById("bg-right").style.left = (intMitte + intHalfWebsite - intSidebarRightWidth) + "px";
	}else{
		document.getElementById("bg-left").style.left = (intSidebarLeftWidth - intLeftImage) + "px";
		document.getElementById("bg-right").style.left = (intWebsiteViewPort - intSidebarRightWidth) + "px";
	}
}

function hasScrollbar(){
	var vHeight = 0;
	
	if (document.all) {
		if (document.documentElement) {
			vHeight = document.documentElement.clientHeight;
		} else {
			vHeight = document.body.clientHeight
		}
	} else {
		vHeight = window.innerHeight;
	}

	if (document.body.offsetHeight > vHeight)
		return true;
	else
		return false;
}

function getViewportSize(){
	var aryViewPort = new Array();
	var viewportwidth;
	var viewportheight;

	// the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight
	if (typeof window.innerWidth != 'undefined')
	{
		viewportwidth = window.innerWidth,
		viewportheight = window.innerHeight
	}

	// IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)
	else if (typeof document.documentElement != 'undefined'
		&& typeof document.documentElement.clientWidth !=
		'undefined' && document.documentElement.clientWidth != 0)
	{
		viewportwidth = document.documentElement.clientWidth,
		viewportheight = document.documentElement.clientHeight
	}

	// older versions of IE
	else
	{
		viewportwidth = document.getElementsByTagName('body')[0].clientWidth,
		viewportheight = document.getElementsByTagName('body')[0].clientHeight
	}
	
	aryViewPort[1] = viewportwidth;
	aryViewPort[2] = viewportheight;
	
	return aryViewPort;
}

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 sans scrollbar
    wNoScroll = inn.offsetWidth;
    // Add the scrollbar
    scr.style.overflow = 'auto';
    // Width of the inner div width 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);
}

