$(document).ready(function() {
  resetContentSize();
  resetHeader();
});

function resetContentSize() {
	console.log("Fixing main-content height:");	
	let mainContent = document.getElementById('main-content');
	mainContent.setAttribute('style', 'height: auto');
	mainContent = document.getElementById('main-content');
	var offsetHeight = Number(mainContent.offsetHeight);
	console.log("\tHeight was: " + offsetHeight);
	var newHeight = offsetHeight + 30;	
	console.log("\tSetting css: " + 'height:'+newHeight+'px');
	mainContent.setAttribute('style', 'height:'+newHeight+'px');
	console.log("\tHeight become: " + mainContent.offsetHeight);
	return;
}

function resetHeader() {
	var header = document.getElementById('header');
	header.setAttribute('style', 'height: auto');
	header = document.getElementById('header');	
	var hh = Number(header.offsetHeight);
	hh = hh + 10;
	header.setAttribute('style', 'height:'+hh+'px');
}