vedo se mi riesce di fartene una al volo:

<html>
<head>
<title>Untitled</title>
<script type="text/javascript">

pippo=new Array ('auto','hidden');

function Barre (moz){
ciccio=document.getElementsByTagName('body')[0];
ciccio.style.overflow=pippo[moz];
}
</script>
<style type="text/css">
html, body {height:100%}
body {background:gray;
text-align:center;
}
div {background:silver;
width:600px;
text-align:left;
border:1px solid fuchsia;
height:1200px;
margin:auto;
}

h1, p {cursorointer}
</style>
</head>
<body>
<div>
<h1 onclick="Barre(1)">Nascondi barra</h1>
<p onclick="Barre(0)">mostra barra</p>
</div>
</body>
</html>

non so se è quello che ti serve