var browser=new Object();

browser.isIE=(navigator.appName=="Microsoft Internet Explorer" && navigator.userAgent.indexOf("Opera")<0)?true:false;
browser.isOpera=navigator.userAgent.indexOf("Opera")>0?true:false;
browser.isMozilla=navigator.product=="Gecko"?true:false;

browser.getIEversion=function(){
  if(!browser.isIE)return 0; else {
    var ver=navigator.appVersion;
    ver=ver.substring(ver.indexOf("MSIE")+4);
    return ver.substring(0,ver.indexOf(";"));
  }
}

function getViewportWidth(){
  if(window.innerWidth)return parseInt(window.innerWidth);
  else if(document.documentElement && document.documentElement.clientWidth)return parseInt(document.documentElement.clientWidth);
  else if(document.body && document.body.clientWidth)return parseInt(document.body.clientWidth);
}

function shiftBackground(){
	document.body.style.backgroundPosition=(Math.floor((getViewportWidth()-984)/2)%42)-(browser.isIE?0:8)+"px 0px";
}
window.onload = function() {
	shiftBackground();
}
