by Dragos, on December 24th, 2008  
If you would like to align an element vertically within a parent element, i use the following script.

<script type="text/javascript">

if (typeof window.innerWidth != 'undefined')
{
bh = window.innerHeight
}
if (typeof document.getElementById("myElementID").offsetHeight != 'undefined')
{
mbh = document.getElementById("myElementID").offsetHeight
}

document.getElementById("myElementID").style.marginTop=Math.round((bh-mbh)/2)+'px');

</script>

This will arrange an element in the middle of a webpage.