// Allow an <iframe> whose id is "spl-body" to have a dynamic height (depending from its content).

function autoResize(el) {
	if (el.contentDocument && el.contentDocument.body) {
		el.height = el.contentDocument.body.offsetHeight;
	} else if (el.contentWindow.document.body) {
		el.height = el.contentWindow.document.body.scrollHeight;
	}
	setTimeout(function(){autoResize(el);}, 100)
}

function addEvent(obj, evType, fn) {
	if (obj.addEventListener) {
		obj.addEventListener(evType, fn, false);
		return true;
	}
	if (obj.attachEvent)
		return obj.attachEvent("on" + evType, fn);
	return false;
}

addEvent(window, "load", function(){ autoResize(document.getElementById('spl-body')); });

