var MAIN_WIDTH = 1074; function globalResize() { var el_lSpace = document.getElementById("l_space"); var el_rSpace = document.getElementById("r_space"); var el_capsule = document.getElementById("capsule"); var mainBlack = document.getElementById("mainBlack"); var mbbInfo = $('mbbInfo'); var wWidth = document.documentElement.clientWidth | document.body.clientWidth; var wHeight = document.documentElement.clientHeight | document.body.clientHeight; var lW = (wWidth <= MAIN_WIDTH)?0:((wWidth - MAIN_WIDTH) >> 1); var rW = (wWidth <= MAIN_WIDTH)?0:(wWidth - MAIN_WIDTH - lW); var iw = (wWidth >= MAIN_WIDTH)?705:(705 - (MAIN_WIDTH - wWidth)); if(iw < 644) iw = 644; var difference = (MAIN_WIDTH - wWidth); if(difference > 61) difference = 61; if(difference < 0) difference = 0; el_lSpace.style.width = lW + "px"; el_rSpace.style.width = rW + "px"; mainBlack.style.width = ((wWidth <= MAIN_WIDTH)?MAIN_WIDTH:wWidth) + "px"; mainBlack.style.height = el_capsule.clientHeight + "px"; mbbInfo.style.width = iw + "px"; $('capsule').style.width = (MAIN_WIDTH - difference) + "px"; $('main_body').style.width = (MAIN_WIDTH - 32 - difference) + "px"; if($('header') != null) $('header').style.width = (MAIN_WIDTH - 32 - difference) + "px"; if($('header2') != null) $('header2').style.width = (MAIN_WIDTH - 32 - difference) + "px"; if($('header') != null) $('header').style.width = (MAIN_WIDTH - 32 - difference) + "px"; $('mainBtnBar').style.width = (MAIN_WIDTH - 32 - difference) + "px"; $('loginBar').style.width = (MAIN_WIDTH - 32 - difference) + "px"; $('mainBottomBody').style.width = (MAIN_WIDTH - 32 - difference) + "px"; $('bottomShops').style.width = (MAIN_WIDTH - 32 - difference) + "px"; $('ratingSystems').style.width = (MAIN_WIDTH - 32 - difference) + "px"; $('bottomSamson').style.width = (MAIN_WIDTH - 32 - difference) + "px"; $('bottomVectorEmail').style.width = (MAIN_WIDTH - difference) + "px"; $bvePos = findPos($('bottomVectorEmail')); $('l_shadow').style.height = $('r_shadow').style.height = $bvePos[1] + "px"; } function $(id) { return document.getElementById(id); } function findPos(obj) { var curleft = curtop = 0; if (obj.offsetParent) { curleft = obj.offsetLeft curtop = obj.offsetTop while (obj = obj.offsetParent) { curleft += obj.offsetLeft curtop += obj.offsetTop } } return [curleft, curtop]; }