// requires "jquery.js"

jQuery(document).ready(function() {
	var equalheight = function(lcol, rcol) {
		var setheight = function(col, h) {
			var s = col.currentStyle || document.defaultView.getComputedStyle(col, "");
			var y = h;
			if (s.borderTopWidth && s.borderTopWidth != "medium") {
				y -= s.borderTopWidth.replace("px", "");
			}
			if (s.borderBottomWidth && s.borderBottomWidth != "medium") {
				y -= s.borderBottomWidth.replace("px", "");
			}
			if (s.paddingTop) {
				y -= s.paddingTop.replace("px", "");
			}
			if (s.paddingBottom) {
				y -= s.paddingBottom.replace("px", "");
			}
			col.style.height = y + "px";
		};

		var h = 0;
		if (lcol && lcol.style) {
			lcol.style.height = "auto";
			h = h < lcol.offsetHeight ? lcol.offsetHeight : h;
		}
		if (rcol && rcol.style) {
			rcol.style.height = "auto";
			h = h < rcol.offsetHeight ? rcol.offsetHeight : h;
		}

		setheight(lcol, h);
		setheight(rcol, h);
	}

	equalheight(document.getElementById("top-index-news"), document.getElementById("top-index-updates"));
	equalheight(document.getElementById("top-index-products"), document.getElementById("top-index-company"));
});

