<script>
/* free code from dyn-web.com */
function getDocHeight(doc) {
doc = doc || document;
// from http://stackoverflow.com/questions/1145850/get-height-of-entire-document-with-javascript
var body = doc.body, html = doc.documentElement;
var height = Math.max( body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight );
return height;
}
function setIframeHeight(id) {
var ifrm = document.getElementById(id);
var doc = ifrm.contentDocument? ifrm.contentDocument: ifrm.contentWindow.document;
ifrm.style.visibility = 'hidden';
ifrm.style.height = "10px"; // reset to minimal height in case going from longer to shorter doc
ifrm.style.height = getDocHeight( doc ) + 5+"px";
ifrm.style.visibility = 'visible';
}
</script>
<script>
/* script Arie Molendijk - classical-music.tk */
function load_iframe(which_div,which_iframe,url,position_type,width)
{
frames[which_iframe].location.replace(url);
document.getElementById(which_div).style.display='block';
document.getElementById(which_div).style.background='transparent';
document.getElementById(which_div).style.width=width;
document.getElementById(which_iframe).style.width=document.getElementById(which_div).style.width;
document.getElementById(which_iframe).style.background='white';
document.getElementById(which_iframe).style.border='1px solid silver'
document.getElementById(which_iframe).style.position=position_type;
if(document.getElementById(which_iframe).style.display=='none'){document.getElementById(which_div).style.display='none'}
}
function hide_iframe(which)
{
document.getElementById(which).style.display='none'
}
</script>
<!-- Javascript replacement of deprecated frameborder and scrolling attributes, found at
http://www.dynamicdrive.com/forums/showthread.php?t=60454&page=2;
put it after all the other scripts -->
<script defer src="frameborder_and_scrolling.js"></script>
<!-- This script has the following lines:
(function(run){
for (i=0;i<frames.length; i++) {
var f1 = document.getElementsByTagName('iframe')[i];
if(!f1 && window.addEventListener && !run){
document.addEventListener('DOMContentLoaded', arguments.callee, false);
return;
}
if(!f1){setTimeout(arguments.callee, 300); return;}
f2 = f1.cloneNode(false);
f1.src = 'about: blank';
f2.frameBorder = '0';
f2.allowTransparency = 'yes';
f2.scrolling = 'no';
f1.parentNode.replaceChild(f2, f1);
}
})();
It must be external because it has 'defer' -->