You need to get the height of the window using
document.body.clientHeight
Then you need the height of the layer, or table.
Then use
document.getElementById("ID").style.top = document.body.clientHeight - document.getElementById("ID").offsetHeight
to set its position
<div id="div1" style="position:absolute;left:0;top:0;width:300px;height:100px;border:1px solid blue">hi there</div>
<script>
<!--
win_height=document.body.clientHeight
div_height= document.getElementById("div1").offsetHeight
document.getElementById("div1").style.top = win_height - div_height
// -->
</script>