function setWindowWidth() { var w = (window.innerWidth || document.body.clientWidth); var hh = (window.innerHeight || document.body.clientHeight || document.documentElement.clientHeight); var b = document.getElementById('body_area'); var h = document.getElementById('header_area'); var l = "50%"; var m = "-500px"; if (w) { if (w <=1000) {l = "0"; m = "0px"; document.lastChild.style.overflowX = "auto"} if (w > 1000) {l = "0"; m = Math.floor((w-1000)/2) + "px"; document.lastChild.style.overflowX = "hidden"} if (b) {b.style.left=l; b.style.marginLeft=m;} if (b) { try { b.style.minHeight=(hh-75)+"px"; } catch(err) { // b.style.minHeight=(hh-95)+"px"; } } if (h) {h.style.left=l; h.style.marginLeft=m;} } return w; } function setScrollPosX() { var w = (window.innerWidth || document.body.clientWidth); var l = (window.scrollX || (document.documentElement.scrollLeft)); var h = document.getElementById('header_area'); var m = "0px"; if (w) { if (l > 0) {m="-"+l+"px";} if (w < 1001) {h.style.marginLeft=m;} } return m; }