<iframe id="contentFrame" name="contentFrame" src="about:blank" marginwidth="0" marginheight="0" frameborder="0" width="100%" height="100%" scrolling="no"></iframe>
<div id="content">
... contents ...
</div>
...
<script type="text/javascript">
function init(){
var doc = document.getElementById('content');
if(doc.offsetHeight == 0){
} else {
pageheight = doc.offsetHeight;
parent.document.getElementById("contentFrame").height = pageheight+"px";
}
}
window.onload = function(){
init();
}
</script>