Of course you can also just use a plain old CSS solution. Place this text at the top of the pages that should NOT show the SideBar:
<style type="text/css">#SideBar {display: none;}</style>
No Javascript required.