Как вариант:
block=document.getElementById("main");
blockHeight=block.offsetHeight;
var padding = 0;
if (block.currentStyle)
padding = parseInt(block.currentStyle.paddingTop) + parseInt(block.currentStyle.paddingBottom);
else if (window.getComputedStyle)
padding = parseInt(window.getComputedStyle(block, null).paddingTop) + parseInt(window.getComputedStyle(block, null).paddingBottom);
blockHeight = blockHeight-padding;