function resizeCaller() {
    if (document.getElementById)
          resizeIframe("headerFrame");
}

 

//This function resizes the iframe to be as tall as the external page's height
function resizeIframe(frameid){
  var currentfr=document.getElementById(frameid)
  if (currentfr && !window.opera){
        if (currentfr.contentDocument && currentfr.contentDocument.body.offsetHeight) //ns6 syntax
              currentfr.height = currentfr.contentDocument.body.offsetHeight+16; 
        else if (currentfr.Document && currentfr.Document.body.scrollHeight) //ie5+ syntax
              currentfr.height = currentfr.Document.body.scrollHeight;
  }
}

//call the resizeCaller() function each time page loads
addLoadEvent(resizeCaller);

//window.onload=resizeCaller