<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251" />
<title>Demo iframe Resize by Exterior</title>
<script type="text/javascript">
<!--
var timeout;
function clickAction() {
frameFitting();
var fr = document.getElementById('demo_frame').contentWindow.document.body.getElementsByTagName('a');
for (var i=0; i<fr.length; i++) {
fr[i].onclick = function() {
clearInterval(timeout);
timeout = setInterval("frameFitting()",100);
}
}
}
function frameFitting() {
document.getElementById('demo_frame').width = '100%';
document.getElementById('demo_frame').height = document.getElementById('demo_frame').contentWindow.document.body.scrollHeight+4+'px';
}
onload = clickAction;
//-->
</script>
</head>
<body>
<iframe src="frame.html" id="demo_frame" align="center" scrolling="no" frameborder="0" marginheight="0" marginwidth="0"></iframe>
</body>
</html>