
var browser=navigator.appName;
var b_version=navigator.appVersion;
var version=parseFloat(b_version);

window.onresize= function() {
	adjustVerticalHeights();
}

window.onload = function() {
	adjustVerticalHeights();
}

function adjustVerticalHeights() {
	var pageHeight = findPageHeight();
	
	
	
	// colRight is the main text column to right of subnav
	var colRight = document.getElementById("col-right");
	var rightColHeight = colRight.offsetHeight;
	var colSeparator = document.getElementById("col-separator");
	
	
	if ( document.getElementById("sidebar-squeeze") ) {
		var colRightGreen = document.getElementById("sidebar-squeeze");
	} else if ( document.getElementById("home-sidebar-squeeze") ) {
		var colRightGreen = document.getElementById("home-sidebar-squeeze");
	}

	var pageHeightAdj = pageHeight - 165;
	
	if ( document.getElementById("home") ) {
		if ( browser.indexOf("Microsoft") != -1 ) {
			// the flash embed complicates the compenstated height
			if ( b_version.indexOf( "MSIE 6.0" ) != -1 ){
				colSeparator.style.height = (pageHeight - 444)+"px";
			} else {
				colSeparator.style.height = (pageHeight - 441)+"px";
			}
			
		} else { // must be safari or firefox
			colSeparator.style.height = (pageHeight - 442)+"px";
		}
	} else { // for all 2nd level pages
		if ( rightColHeight >= pageHeightAdj ) {
			colSeparator.style.height = rightColHeight+"px";
		} else {
			
			colSeparator.style.height = (pageHeight - 165)+"px";
		}
	}
}

 
function findPageHeight(){
	var winHeight, d=document;
	if (typeof window.innerWidth!='undefined') {
	winWidth = window.innerWidth;
	winHeight = window.innerHeight;
	} else if ( d.documentElement
	&& typeof d.documentElement.clientWidth!='undefined'
	&& d.documentElement.clientWidth!=0 ) {
	winWidth = d.documentElement.clientWidth;
	winHeight = d.documentElement.clientHeight;
	} else if ( d.body
	&& typeof d.body.clientWidth!='undefined') {
	winWidth = d.body.clientWidth;
	winHeight = d.body.clientHeight;
	}
	return winHeight;
}

function popWin(in_url) {
	window.open(in_url,"Window1", "menubar=no,width=1024,height=665,toolbar=no,scrollbars=yes,resizable=no,titlebar=no,location=no");
}

