<style type="text/css">
div {background:#eeeeee; border:1px black solid; width:50px; height:50px; position:absolute; top:50px; left:50px;}
</style>
<script type="text/javascript">
function toogle(id){
var elem = document.getElementById(id);
elem.style.display = (elem.style.display == 'none' ? 'block' : 'none');
}
</script>
<div id="okno" style="display:none;"></div>
<input type="button" value="Открыть / Закрыть" onclick="toogle('okno');"/>