﻿function setColumnHeight() {
	var iScreenHeight = jQuery("html").height();
	
	var iTopDivHeight = getTopDivHeight();
	var iMiddleDivHeight = getMiddleDivHeight();
	var iBottomDivHeight = getBottomDivHeight();
	
	var iColumnHeight = iTopDivHeight + iMiddleDivHeight + iBottomDivHeight;
	
	if (iScreenHeight < iColumnHeight) {
		jQuery("div.containerColumnRight").height(iColumnHeight);
	} else {
		jQuery("div.containerColumnRight").height(iScreenHeight);
	}
}

function getTopDivHeight() {
	var iTopDivHeight = jQuery("div.containerColumnRight .top").height();
	
	return iTopDivHeight;
}

function getMiddleDivHeight() {
	var iMiddleDivHeight = jQuery("div.containerColumnRight .middle").height();
	
	return iMiddleDivHeight;
}

function getBottomDivHeight() {
	var iActieVoorwaaardenDivHeight = jQuery("div.containerColumnRight .bottom .actieVoorwaarden").height();
	
	var strActieVoorwaaardenDivTop = jQuery("div.containerColumnRight .bottom .actieVoorwaarden").css("top");
	var iActieVoorwaaardenDivTop = parseInt(strActieVoorwaaardenDivTop.replace("px", ""));
	
	var iBottomDivHeight = iActieVoorwaaardenDivHeight + iActieVoorwaaardenDivTop;
	
	return iBottomDivHeight;
}
