BoxResizer = function () {
	// bind the events to all the corresomnding IDs
	if (!document.getElementsByTagName) return false;
	var x = document.getElementsByTagName("div");
	for (var i = 0; i < x.length; i++) {
		if (x[i].id == "welkom") {
			alignWelkomToQlinksBox(x[i]);
		}
		if (x[i].id == "content1") {
			alignSiblingContentBoxes(x[i]);
		}
	}
}

function alignWelkomToQlinksBox(welkomBox){
	var maxSize = welkomBox.offsetHeight;
	var qlinksBox = document.getElementById("qlinks");
	
	// determine the largest height of the row
	if (qlinksBox.offsetHeight > maxSize){
		maxSize = qlinksBox.offsetHeight;
	}
	
	// and make em all just as high (compensate with current padding)
	welkomBox.style.height = (maxSize - 30) + "px";
	qlinksBox.style.height = (maxSize - 14) + "px";
}

function alignSiblingContentBoxes(currentBox){
	var maxSize = 0;
	var box = currentBox;
	
	// determine the largest height of the row
	while (box != null){
		if (box.offsetHeight > maxSize){
			maxSize = box.offsetHeight;
		}
		box = box.nextSibling;
	}
	
	// and make em all just as high
	box = currentBox;
	while (box != null){
		box.style.height = maxSize + "px";
		box = box.nextSibling;
	}
	
	// scale the submenu box (compensate with current padding)
	var submenuBox = document.getElementById("submenu");
	submenuBox.style.height = (maxSize - 103) + "px";
}
