resizeBackground = function()
{
	try 
	{
		var background = document.getElementById('site_background');
		if(isIE6)
		{
			document.getElementById('scroller').style.height = document.body.clientHeight - 40 - 85 + "px";
			document.getElementById('main').style.paddingBottom = 0;
		}
		var client_width = document.body.clientWidth;
		var client_height = document.body.clientHeight;
		
		var faktor1 = client_width / background.width;
		var faktor2 = client_height / background.height;
	
	   if(faktor1 > faktor2)
	   {
		   var ratio = faktor1;
	   }
	   else
	   {
		   var ratio = faktor2;
	   }
	   background.width = background.width * ratio;
	   background.height = background.height * ratio;
	}
	catch(e) { }
}

document.body.onload
{
	resizeBackground();
}

window.onresize
{
	resizeBackground();
}

