var depend = {
	updateIframeHeight: function (content) {
		var lightview = Element.down(window.parent.document, "#lightview");
		if (lightview) {
			
			// get content height
			var lightviewContent = lightview.down("#lightviewContent");
			var lightviewWrapper = lightview.down(".lv_contentBottom");
			
			if (!lightviewContent) return false;
			
			var content = content;
			var footer = $("footer");
			var sideContent = $("side-content");

			// hide asides
			sideContent.hide();
			footer.hide();

			// position iframe
			var contentHeight = content.getHeight();
			var contentWidth = content.getWidth();
			var position = content.positionedOffset();
			
			// set initial properties
			if (lightviewContent.getStyle("position")!=="absolute") {
				lightviewContent.writeAttribute({"scrolling":"no"});
				lightviewContent.setStyle({
					"position":"absolute",
					"left":(-1*position.left)+"px",
					"width":(position.left+contentWidth+70)+"px"
				});
				lightviewWrapper.setStyle({
					"overflowY":"auto",
					"overflowX":"hidden"
				});
			}
			
			// update height
			lightviewContent.setStyle({
				"top":(-1*position.top-20)+"px",
				"height":(position.top+contentHeight-20)+"px"
			});
			
			// focus on content
			if (lightviewContent.contentWindow.location.hash != "#content") {
				lightviewContent.contentWindow.location.hash = "#content";
			}
			return true;
		} else {
			if (console) console.log("cannot find lightview");
			return false;
		}
	}
}
