﻿function show(id) {
	document.getElementById(id).style.display = 'block';
}

function hide(id) {
	document.getElementById(id).style.display = 'none';
}

function toggle(id) {
	var el = document.getElementById(id);
	if (el.style.display != 'none') {hide(id);} else {show(id);}
}

function setModuleHeights() {
	var h1 = document.getElementById('m1').offsetHeight;
	var maxHeight = h1;
	
	var h2 = document.getElementById('m2').offsetHeight;
	if (h2 > maxHeight) {maxHeight = h2};
	
	var h3 = document.getElementById('m3').offsetHeight;
	if (h3 > maxHeight) {maxHeight = h3};
	
	var h4 = document.getElementById('m4').offsetHeight;
	if (h4 > maxHeight) {maxHeight = h4};
	
	maxHeight = maxHeight - 18;
	
	document.getElementById('m1').style.height = maxHeight;
	document.getElementById('m2').style.height = maxHeight;
	document.getElementById('m3').style.height = maxHeight;
	document.getElementById('m4').style.height = maxHeight;
	
}

function sendmail() {
	mail_str = "mailto:?subject=" + document.title;
	mail_str += "&amp;body= " +  location.href;
	location.href = mail_str;
}