function get_height(doc) {
	var h = 0, sh, oh;
	if (doc.height) h = doc.height;
	else if (doc.body) {
		if (doc.body.scrollHeight) h = sh = doc.body.scrollHeight;
		if (doc.body.offsetHeight) h = oh = doc.body.offsetHeight;
		if (sh && oh) h = Math.max(sh, oh);

		
	}
	elem =  doc.getElementById('frame_wrap');
	if(elem.scrollHeight)
		return Math.max(h, elem.scrollHeight);
	return h;
}

function resize_iframe(name) {
	var win = window.frames[name];
	var e = document.getElementById ? document.getElementById(name) : null;
	if (e && win) {
		e.style.height = "auto";
		var h = get_height(win.document);
		if (h) e.style.height = h + 30 + "px";
	}
}

