$(document).ready(adjustLayout);
$(window).bind("resize", adjustLayout);

function adjustLayout() {
	var pageHeight = Math.max(
		$(window).height(),
		$("div#Content").offset().top + $("div#Content").height()
	);
	$("div#Page").height(pageHeight);

	fitToBottom($(".vline"), pageHeight);
	fitToBottom($("#Vline"), pageHeight); //column separator line on index.aspx
}

function fitToBottom(elements, pageHeight) {
	if(elements.length == 0)
		return;

	$(elements).height(pageHeight - $(elements).offset().top);		
}

function mailTo(name) {
	return document.location = "mail" + "to:" + 
		name + "@" + "consis." + "ch";
}
