



//modify for 800x600 resolution
//rewrite the horizontal nav with smaller buttons, resize elemments
if (screen.width < 801){


	if(document.getElementById("lcol_spacer")){document.getElementById("lcol_spacer").style.width = "192px"}
	if(document.getElementById("mcol_spacer")){document.getElementById("mcol_spacer").style.width = "384px"}
	if(document.getElementById("rcol_spacer")){document.getElementById("rcol_spacer").style.width = "192px"}
	if(document.getElementById("buttons")){document.getElementById("buttons").style.width = "770px"}
	if(document.getElementById("main")){document.getElementById("main").style.width = "770px"}
	if(document.getElementById("buttons_area")){document.getElementById("buttons_area").innerHTML = buttons800}
	if(document.getElementById("personal_investing")){document.getElementById("personal_investing").style.left = "109px"}
	if(document.getElementById("institutional")){document.getElementById("institutional").style.left = "302px"}
	if(document.getElementById("opportunities")){document.getElementById("opportunities").style.left = "494px"}
	if(document.getElementById("about")){document.getElementById("about").style.left = "634px"}
	
}

//set the horiz nav hightlight
if(horiz_bkg && document.getElementById){
	var small_width = ""
	if (screen.width < 801){small_width = "_800"} //this sets it to a different image for 800x600 resolution
	if (horiz_bkg == "ab"){
		document.getElementById("b_about").src = "images/build06/b_about" + small_width + "_.gif"
		document.getElementById("b_about").onmouseout = function(){
			document.getElementById("b_about").src = "images/build06/b_about" + small_width + "_.gif"
		}
	}

}

/*change on master*/
/*change on master*/
/*change on master*/
/*change on master*/
/*change on master*/
//begin horizontal nav hightlight
function navHighlight (horiz_bkg){
	var id
	if (horiz_bkg == "aic"){id = "b_about_ic"}
	else if (horiz_bkg == "fr"){id = "b_fin_resources"}
	else if (horiz_bkg == "fo"){id = "b_forms"}
	else if (horiz_bkg == "faq"){id = "b_faq"}
	else {return false;}
	document.getElementById(id).src = "images/build06/" + id + "_.gif"
	document.getElementById(id).onmouseout = function(){
		document.getElementById(id).src = "images/build06/" + 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 = "343px" // 15px less because of padding-bottom in style sheet

//safari scroll bar - html { min-height: 100%; margin-bottom: 1px; }

// 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
	if(document.getElementById)
	{
		if(link_name == file_name)
		{ document.links[check_links].className = "current"; }
	}
}
