navHighlight(horiz_bkg)
//begin horizontal nav hightlight
function navHighlight (horiz_bkg)
{
	var id
	if (horiz_bkg == "ho"){id = "b_home"}
	else if (horiz_bkg == "ov"){id = "b_overview"}
	else if (horiz_bkg == "ab"){id = "b_about_us"}
	else if (horiz_bkg == "tr"){id = "b_transactions"}
	else if (horiz_bkg == "co"){id = "b_contact_us"}
	else {return false;}
	
	document.getElementById(id).src = "images/buttons/" + id + "_.gif"	
	document.getElementById(id).onmouseout = function(){
		document.getElementById(id).src = "images/buttons/" + id + "_.gif"
	}
}
//check if horiz_bkg exists and run the function if true
if(window.horiz_bkg && document.getElementById){navHighlight(horiz_bkg)}
// end horizontal nav hightlight


//make sure the top lines in the content area align on interior pages
if (document.getElementById("right_top_spacer") && document.getElementsByTagName("h2")[0] && document.getElementsByTagName("h2")[0].offsetHeight > 40) {
	document.getElementById("right_top_spacer").style.height = document.getElementsByTagName("h2")[0].offsetHeight - 14 + "px"
}

// 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

// set right vertical bar height
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

// 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].style.color='#236fdc';
			}
		}
}
