function resize() {
	try {
		window.parent.postMessage(getHeight(), '*');
	}
	catch(e) {
	}
}

function getHeight() {
	return Math.max(Math.max(document.body.scrollHeight, document.documentElement.scrollHeight),
					Math.max(document.body.offsetHeight, document.documentElement.offsetHeight),
					Math.max(document.body.clientHeight, document.documentElement.clientHeight));
}

window.onload = resize;

