function insertIt() { 
var _y = document.getElementById('framediv'); 
var _x = window.frames[0].document.body.innerHTML; 
_y.innerHTML = _x 
}

function docHeight(doc) {
	var docHt = 0, sh, oh;
	if (doc.height)
		docHt = doc.height;
	else if (doc.body) {
		if (doc.body.scrollHeight)
			docHt = sh = doc.body.scrollHeight;
		if (doc.body.offsetHeight)
			docHt = oh = doc.body.offsetHeight;
		if (sh && oh)
			docHt = Math.max(sh, oh);
	}
	return docHt;
}  

function sizeFrameContent() {
	var frameEl = document.getElementById('iframe1');
		if (frameEl) {
		var frameWin = window.frames['iframe1'];
		frameEl.style.height = "auto";
		frameEl.style.height = docHeight(frameWin.document) + 'px';
	}
}
