// set right vertical bar height
if (document.getElementById("body_content") && document.getElementById("body_content").offsetHeight < 358)
document.getElementById("body_content").style.height = "291px" // 15px less because of padding-bottom in style sheet

if (document.getElementById("body_content_wide") && document.getElementById("body_content_wide").offsetHeight < 358)
document.getElementById("body_content_wide").style.height = "291px" // 15px less because of padding-bottom in style sheet

// give alternating colors to tables with the regTbl class
if(document.getElementsByTagName){
	var el = document.getElementsByTagName("TR");
	for(var i=0; i < el.length; i++){
		if(el[i].parentNode.parentNode.className.indexOf("regTbl") != -1){
			if(i%2 == 1){el[i].className = "tblon";} 
			else {el[i].className = "tbloff";}
		}
	}
}

// check file name and highlight if it matches a link
var file_name = location.href
// get rid of query string
if (file_name.indexOf('?')!= -1) {
		var query = true;
		var ques_loc = file_name.indexOf('?');
		var query_string = file_name.substring(ques_loc, file_name.length);
		file_name = file_name.substring(0,ques_loc);
}

// get rid of bookmarks
if (file_name.indexOf('#')!= -1) {
		var bm = true;
		var bm_loc = file_name.indexOf('#');
		var bookmark = file_name.substring(bm_loc, file_name.length);
		file_name = file_name.substring(0,bm_loc);
}

// loop through all the links
for (check_links = 0; check_links < document.links.length; check_links++) {
	var link_name = document.links[check_links].href;
	// highlight link if it matches filename
	// exclude nn4 and others
	if (document.getElementById) {
		if (link_name == file_name) {
			document.links[check_links].className = 'current';
		}
	}
}