function changeDiv(the_div,the_change) { var the_style = getStyleObject(the_div); if (the_style != false) { the_style.display = the_change; } } function getStyleObject(objectId) { if (document.getElementById && document.getElementById(objectId)) { return document.getElementById(objectId).style; } else if (document.all && document.all(objectId)) { return document.all(objectId).style; } else { return false; } } function getWindowWidth() { var windowWidth = 0; if (typeof(window.innerWidth) == 'number') { windowWidth = window.innerWidth; } else { if (document.documentElement && document.documentElement.clientWidth) { windowWidth = document.documentElement.clientWidth; } else { if (document.body && document.body.clientWidth) { windowWidth = document.body.clientWidth; } } } return windowWidth; } function SetDivision() { var browserWidth = getWindowWidth(); if (browserWidth > 1280) { changeDiv("left-column-top-sponsor-off","none"); changeDiv("left-column-top-sponsor-on","block"); changeDiv("left-column-sponsor-on","block"); changeDiv("left-column-sponsor-off","none"); changeDiv("right-column-top-sponsor-off","none"); changeDiv("right-column-top-sponsor-on","block"); changeDiv("right-column-sponsor-on","block"); changeDiv("right-column-sponsor-off","none"); } }