$(document).ready(function(){
	resize();
});

function resize(){
	var bodyElement = document.getElementsByTagName("body")[0];
	var htmlElement = document.getElementsByTagName("html")[0];
	

		if (document.body.offsetWidth < 980){
			margin = -171;
		} else {
			margin = (document.body.offsetWidth-1280)/2;
		}
		marginround = Math.floor(margin);
		$("#wrapper").css("margin-left",marginround+"px");
	
	if (document.body.offsetWidth < 980){
		bodyElement.style.cssText="overflow-x:scroll";
		htmlElement.style.cssText="overflow-x:scroll";
	} else {
		bodyElement.style.cssText="overflow-x:hidden";
		htmlElement.style.cssText="overflow-x:hidden";
	}

	if ($.browser.msie && (jQuery.browser.version == "6.0") ){
		bodyElement.style.cssText="overflow-x:scroll";
		htmlElement.style.cssText="overflow-x:scroll";
		$("#wrapper").css("margin-left","-171px");
        }
}