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