function pageWidth() {
	return window.innerWidth != null? window.innerWidth : document.documentElement && document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body != null ? document.body.clientWidth : null;
} 

function pageHeight() {
	return  window.innerHeight != null? window.innerHeight : document.documentElement && document.documentElement.clientHeight ?  document.documentElement.clientHeight : document.body != null? document.body.clientHeight : null;

}

function posLeft() {
	return typeof window.pageXOffset != 'undefined' ? window.pageXOffset :document.documentElement && document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ? document.body.scrollLeft : 0;
} 
	
function posTop() {
	return typeof window.pageYOffset != 'undefined' ?  window.pageYOffset : document.documentElement && document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ? document.body.scrollTop : 0;
} 

function posRight() {
	return posLeft()+pageWidth();
}

function posBottom() {
	return posTop()+pageHeight();
}

function stretch() {
	var bottomheight = document.getElementById('mast_head').offsetHeight;
	bottomheight = bottomheight + document.getElementById('splash_container').offsetHeight;
	bottomheight = bottomheight + document.getElementById('content_container').offsetHeight;
	contentheight = bottomheight;
	bottomheight = bottomheight - document.getElementById('menu_container').offsetHeight;
	bottomheight = bottomheight - document.getElementById('right_top').offsetHeight;
	var rightwidth = (pageWidth() - 716);
	if (pageWidth() < 960) {
		rightwidth = 260;
	}
	
	if (contentheight < pageHeight()) {
		bottomheight = pageHeight() - document.getElementById('menu_container').offsetHeight - document.getElementById('right_top').offsetHeight;
		contentheight = pageHeight() - document.getElementById('splash_container').offsetHeight - document.getElementById('mast_head').offsetHeight
		document.getElementById('content_container').style.height = contentheight + 'px';
	}
	
	document.getElementById('right_top').style.width = rightwidth + 'px';
	document.getElementById('right_bottom').style.width = rightwidth + 'px';
	document.getElementById('right_bottom').style.height = bottomheight + 'px';
	document.getElementById('right_bottom_content').style.height = bottomheight + 'px';
	document.getElementById('menu_container').style.width = rightwidth + 'px';
}