window.onresize = setBlock;
window.onload = setBlock;	
	
function setBlock() {
	var top = (getHeight() - 550) / 2;
	if (!document.all) { top -= 20;}
	document.getElementById("block").style.marginTop = top + 'px';	
}
	
	
function getHeight() {
    var myHeight = 0;
    if( typeof( window.innerWidth) == 'number' ) {
        myHeight = window.innerHeight; }
    else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
        myHeight = document.documentElement.clientHeight;}
    else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
        myHeight = document.body.clientHeight;}
    return myHeight;
}
