// JavaScript Document
window.onload = loadFunctions;

function loadFunctions() {
	linkTo();
	findHeight();
	}

function findHeight() {
	var leftColumn = document.getElementById('leftColumn');
	var rightColumn = document.getElementById('rightColumn');
	var rightHeight = rightColumn.offsetHeight;
	var leftHeight = leftColumn.offsetHeight;
	var rightInt = parseInt(rightHeight);
	var leftInt = parseInt(leftHeight);
	if (leftInt < rightInt ) {
		var rightHeight = rightColumn.offsetHeight + 'px';
		var mainArea = document.getElementById('contentMain');
		mainArea.style.height = rightHeight;
	} else {
		var leftHeight = leftColumn.offsetHeight + 'px';
		var mainArea = document.getElementById('contentMain');
		mainArea.style.height = leftHeight;
	}
}

function linkTo() {
	document.getElementById("homePicLink").onclick = function () {
		window.location = "index.php";
	}	
	document.getElementById("aboutPicLink").onclick = function () {
		window.location = "aboutUs.php";
	}
	document.getElementById("servicesPicLink").onclick = function () {
		window.location = "generalServices.php";
	}
	document.getElementById("volunteerPicLink").onclick = function () {
		window.location = "volunteerOpportunities.php";
	}
	document.getElementById("newsPicLink").onclick = function () {
		window.location = "news.php";
	}
	document.getElementById("contactPicLink").onclick = function () {
		window.location = "contact.php";
	}
	document.getElementById("employmentPicLink").onclick = function () {
		window.location = "jobPostings.php";
	}
}