//  resizeIframe(FRAMENAME) dynamically resizes the height of an iframe based on its content.
//      syntax: <body onLoad="resizeIframe('nameOfIframeOnParentPage');">
//  
//  If you are using this script to resize iframes where the domain name of the child page 
//  may vary from the domain name of the parent, the following MUST BE DECLARED ON BOTH
//  PARENT (in the case of sitezen pages, this can be on the page master javascript pane)
//  AND THE CHILD PAGE:
//  
//      document.domain="mydomain.com";
//
//  The child page should then also include:
//
//		<script type="text/javascript" src="http://common.funeralnet.com/js/resize_iframe.js"></script>
//  
//  -- Michael Lieberman <mjl@funeralnet.com> 30 Nov 2006 (rev 16 July 2007)

function resizeIframe(theframe,minheight){
  var mybody = document.body || document.documentElement;
  var minheight = minheight || 100;
  if (document.getElementById && (window != top)){
    var theiframe = parent.document.getElementById(theframe);
	theiframe.style.height=minheight+'px';
    var theheight = (mybody.scrollHeight > mybody.offsetHeight)
	  ? mybody.scrollHeight : mybody.offsetHeight;
	theiframe.style.height=theheight+'px';
	theiframe.style.overflow='hidden'; // sometimes breaks table layouts in IE [mjl]
  }
}
//window.onload = resizeIframe('contentFrame');
