tById('ad_last')){ var leftHeight=mahua.$('mainbox').offsetHeight; var rightHeight=mahua.$('sidebox').offsetHeight; if(leftHeight>rightHeight){ var sideboxclear=0; var sideboxleft=offsetLeft(mahua.$('ad_last')); mahua.adEffect('ad_last'); } } function offsetLeft(elements){ var left = elements.offsetLeft; var parent = elements.offsetParent; while( parent != null ){ left += parent.offsetLeft; parent = parent.offsetParent; }; return left; };