// JavaScript Document

  
  
var timeout;   
  
function clickAction() {   
    frameFitting();   
    var fr = document.getElementById('iframe-top','iframe-bottom').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('iframe-top','iframe-bottom').width = '100%';   
    document.getElementById('iframe-top','iframe-bottom').height = document.getElementById('iframe-top','iframe-bottom').contentWindow.document.body.scrollHeight+4+'px';   
}   
  
onload = clickAction;   
  

