function window_width() {
  var x;
  x = document.body.clientWidth;
  
  if(x < 970 && document.getElementById('right'))
    document.getElementById('right').style.width = "480px";
  
  if(x >= 970 && document.getElementById('right'))
    document.getElementById('right').style.width = "240px";
}

window.onresize = window_width;
window.onload = window_width;
