

attachEventListener(window, "resize", checkBrowserWidth, false);




function checkBrowserWidth()
{
	var theWidth = getBrowserWidth();
	
	if (theWidth == 0)
	{
		addLoadListener(checkBrowserWidth);		
		return false;
	}
	var d = document.getElementById("container");
	if (d)
	{
		if (theWidth < 1100)
		{	
			var e = 1100 - theWidth;
			if (e < 155)
				d.style.marginLeft =  "-" + (e/2 +60) + "px";
			else
				d.style.marginLeft = "-155px";
		}
		else
			d.style.marginLeft = "auto";
	}

	return true;
};




function getBrowserWidth()
{
	if (window.innerWidth)
	{
		return window.innerWidth;
	}
	else if (document.documentElement && document.documentElement.clientWidth != 0)
	{
		return document.documentElement.clientWidth;
	}
	else if (document.body)
	{
		return document.body.clientWidth;
	}
	
	return 0;
};