$(window).load(function(){
	resizeContentHolder();
});
function resizeContentHolder(){
	$('#contentholder').show();
	var debug = false;
	var x3 = $('#col3').height();
	var x2 = $('#col2').height();
	var xt = $('#footertable').height();
	var ct = $('#contenttable').height();
	var x = x3 - x2;
	var xy = ct - x2;
	if(ct == null){
		ct = 0;
	}
	if (x > 0) { 
		$('#contenttable').css('margin-top', x+2);
		$('#footertable').css('margin-top', x+20+ct);
		$('#col2').css('padding-bottom', x+xt+ct+30);
		if(debug == true){
		alert('x > 0: ' + 'ct '+ct+ ' x '+x+' x3 '+x3+ ' x2 '+x2+' xy '+xy);
		}
	}
	else if(x < 0 && x3 > x2){
		if(debug == true){
		alert('x<0&x3>x2: '+'contentable '+ct+ ' x '+x+' col3 '+x3+ ' col2 '+x2+' xy '+xy);
		}
		$('#contenttable').css('margin-top', -xy);
		$('#col2').css('padding-bottom', x2+xy+xt+ct+65);
	} 
	else if(x < 0 && x3 > 0){
		var differenzcols = x3-x2;
		if(differenzcols < 0){
		differenzcols = differenzcols * -1;
		}
		$('#col2').css('padding-bottom', +xt);
		$('#contenttable').css('margin-top', 50);
		var col2 = x2-ct;
		if(debug == true){
		alert('x<0&x3>0: '+'contentable '+ct+ ' x '+x+' col3 '+x3+ ' col2 '+x2+' col2lone'+col2+' xy '+xy+' diff'+differenzcols );
		}
	}else {
		if(debug == true){
		alert('else');
		}
		$('#col2').css('padding-bottom', xt+ct+30);
	}
}