function setSize() {
	var pageSize = this.getPageSize();
	var vpWidth = pageSize[2];
	var vpHeight = pageSize[3];

	// topnav = 30 + 1 top border + 1 bottom border =  32
	// h2 = 250 (height and top margin) + 20 bottom margin = 270
	// footer = 30 + 1 top border = 31
	// TOTAL: 32 + 270 + 31 = 333
	
	// 333 is the minimum content on the page
	
	// If the viewport is larger than 333, then HEIGHTSET should be sized to make sure
	// the footer is at the bottom of the page; the size of the HEIGHTSET is viewport - 333.
	// We then add another pixel to make sure there's always a scrollbar.
	
	var contentHeight = vpHeight-130-50-18-28;   
	var bodyHeight = vpHeight-130-28;

	if (vpHeight < 826 ) {
		document.getElementById("content").style.height = contentHeight + "px";
	  	document.getElementById("mainBody").style.height = bodyHeight + "px";
	 	}
	 	
	}
		


getPageSize = function() {
	var xScroll, yScroll, windowWidth, windowHeight;
	if (window.innerHeight && window.scrollMaxY) {
		xScroll = this.document.scrollWidth;
		yScroll = (this.isFrame ? parent.innerHeight : self.innerHeight) + (this.isFrame ? parent.scrollMaxY : self.scrollMaxY);
		}
	else if (this.document.body.scrollHeight > this.document.body.offsetHeight){
		xScroll = this.document.body.scrollWidth;
		yScroll = this.document.body.scrollHeight;
		}
	else {
		xScroll = this.document.getElementsByTagName("html").item(0).offsetWidth;
		yScroll = this.document.getElementsByTagName("html").item(0).offsetHeight;
		xScroll = (xScroll < this.document.body.offsetWidth) ? this.document.body.offsetWidth : xScroll;
		yScroll = (yScroll < this.document.body.offsetHeight) ? this.document.body.offsetHeight : yScroll;
		}

	if (self.innerHeight) {
		windowWidth = (this.isFrame) ? parent.innerWidth : self.innerWidth;
		windowHeight = (this.isFrame) ? parent.innerHeight : self.innerHeight;
		}
	else if (document.documentElement && document.documentElement.clientHeight) {
		windowWidth = this.document.documentElement.clientWidth;
		windowHeight = this.document.documentElement.clientHeight;
		}
	else if (document.body) {
		windowWidth = this.document.getElementsByTagName("html").item(0).clientWidth;
		windowHeight = this.document.getElementsByTagName("html").item(0).clientHeight;
		windowWidth = (windowWidth == 0) ? this.document.body.clientWidth : windowWidth;
		windowHeight = (windowHeight == 0) ? this.document.body.clientHeight : windowHeight;
		}

	var pageHeight = (yScroll < windowHeight) ? windowHeight : yScroll;
	var pageWidth = (xScroll < windowWidth) ? windowWidth : xScroll;
	return new Array(pageWidth, pageHeight, windowWidth, windowHeight);
	}


