function init () {
	var divNodes = window.document.getElementsByTagName("div");
	for (var dn = 0; dn < divNodes.length; dn++) {
		if (divNodes[dn].currentStyle) {
			var style = divNodes[dn].currentStyle;
			if (style.bottom != "auto" && style.top != "auto") {
				var height = divNodes[dn].offsetParent.offsetHeight - getValue(style.top) - getValue(style.bottom);
				height -= getValue(style.borderTopWidth) + getValue(style.borderBottomWidth);
				if (divNodes[dn].offsetParent.nodeName.toLowerCase() == "body") {
					height -= 4;
				}
				divNodes[dn].style.height = Math.max(0, height) + "px";
			}
			if (style.right != "auto" && style.left != "auto") {
				var width = divNodes[dn].offsetParent.offsetWidth - getValue(style.left) - getValue(style.right);
				width -= getValue(style.borderLeftWidth) + getValue(style.borderRightWidth);
				if (divNodes[dn].offsetParent.nodeName.toLowerCase() == "body") {
					width -= 20;
				}
				divNodes[dn].style.width = Math.max(0, width) + "px";
			}
		}
	}
	window.onresize = init;
}
function getValue (pValue) {
	var value = window.parseInt(pValue);
	if (window.isNaN(value)) {
		value = 0;
	}
	return value;
}
