if (document.getElementById("sidebar-bg-right")){
      document.getElementById("sidebar-bg-right").onclick = function(){
        swipeState = "middle";
        slideSidebar("right","outOfView");
      }