/** 
 * autofitIframe:
 * função que redimensiona o iframe conforme a necessidade
 * extraída de: http://www.devpapers.com/article/200
 * @params id - id do iframe onde a página está sendo recarregada.
 * colocar na página que está sendo carregada:
 * onload="autofitIframe('contentFRM')"
 */

function autofitIframe(id){
	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 fitIframeOnWindow(id){
	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";
	}
} 