
function init()
{
	YAHOO.util.Event.addListener(window, "resize", adjust);
	adjust();
}

function adjust()
{
	resize($("motto"));
	resize($("nav"));
	moveContent();
}

// pushes content to one-third from the top, and makes sure the horizontal scores line up
function moveContent()
{
	var h = Element.getDimensions("content").height;
	var top = Math.round(( YAHOO.util.Dom.getViewportHeight() - Element.getDimensions("content").height )/3);
	top -= top%3;
	if (Element.getDimensions("mottoDiv").height > 132)
		top += 1;
	else
		top += 2;
	$("content").style.top = top > 0 ? top+"px" : "2px";
}

function resize(obj)
{
	var h = Element.getDimensions(obj).height;
	if (h % 3)
		obj.style.height = h - (h % 3) + 3;
}
