function autofitIframe(id){ // v.1.0
//copyright 2004 Eddie Traversa http://www.dhtmlnirvana.com/
if (!window.opera && !document.mimeType && document.all && document.getElementById){
parent.document.getElementById(id).style.height=this.document.body.offsetHeight+"px";
}
else if(document.getElementById) {
parent.document.getElementById(id).style.height=this.document.body.scrollHeight+"px"
}
}


 function resizeIframe(iframeID) {
if(self==parent) return false; /* Checks that page is in iframe. */
else if(document.getElementById&&document.all) /* Sniffs for IE5+.*/

var FramePageHeight = document.body.scrollHeight + 10; /* framePage
is the ID of the framed page's BODY tag. The added 10 pixels prevent an
unnecessary scrollbar. */

parent.document.getElementById(iframeID).style.height=FramePageHeight;
/* "iframeID" is the ID of the inline frame in the parent page. */
} 


function calcHeight(the_iframe)
{
var the_height=parent.document.getElementById(the_iframe).contentWindow.document.body.scrollHeight;//find the height of the internal page
var the_width=parent.document.getElementById(the_iframe).contentWindow.document.body.scrollWidth;//find the width of the internal page
parent.document.getElementById(the_iframe).style.height=the_height;//change the height of the iframe
parent.document.getElementById(the_iframe).style.width=the_width;//change the width of the iframe
}   



