function initResizeIframe()
{
	var iframe = null;
	
	if (iframe = document.getElementById("ifrm")){
	
		iframe.onload = checkLoaded;
		iframe.onreadystatechange = checkLoaded;
		
		resizeFrame(iframe);
	}
}

function checkLoaded()
{
	if((document.all && this.readyState == "complete") || !document.all)
		resizeFrame(this);
}

function resizeFrame(obj)
{
	var fHeight = 1000; //Fixed if nothing is found
	if(obj.contentDocument && obj.contentDocument.body.offsetHeight)
		fHeight = obj.contentDocument.body.offsetHeight;
	else if(obj.Document.body.scrollHeight)
		fHeight = obj.Document.body.scrollHeight;
	obj.style.height = fHeight + "px";
	obj.scrolly = 0;
	window.scrollTo(0, 0);
}
