
  var currentWidth = 0;
  addEventListener("load", function() {
      setTimeout(orientationChange, 0);
  }, false);
  function orientationChange() {
      if (window.innerWidth != currentWidth) {
          currentWidth = window.innerWidth;
          document.body.setAttribute('orient', (currentWidth == 320) ? "portrait" : "landscape");
          setTimeout(scrollTo, 100, 0, 1);
      }
  }
  setInterval(orientationChange, 400);


