function do_nav_over(passed_Div) {

	passed_Div.className='top_over';
	window.status=passed_Div.innerText;
	hide_current_sub_nav()
//	window.event.cancelBubble = true;
	return true;
	
}

function do_nav_out(passed_Div) {

	passed_Div.className='top_normal';
	window.status='';
	//window.event.cancelBubble = true;
	return true;
	
}

function do_sub_nav_over(passed_Div) {

	passed_Div.className='sub_over';
	window.status=passed_Div.innerText;
	//window.event.cancelBubble = true;
	return true;
	
}

function do_sub_nav_out(passed_Div) {

	passed_Div.className='sub_normal';
	window.status='';
	//window.event.cancelBubble = true;
	return true;
	
}

function do_page_link(passed_URL, linkType) {

	if (linkType == 1) {
		location.href=passed_URL;
	} else if (linkType == 2) {
		window.open(passed_URL);
	} else {
		alert('Sorry, this link is broken.')
	}

}

//Variables For Showing Sub Menu
var sub_nav_to_show;
var sub_left_adjuster = 1;//1
var sub_top_adjuster = 109;//109

function show_sub_menu(passed_top_nav, sub_ID) {

	//Hide the open Sub Nav
	hide_current_sub_nav()
	
	var sub_nav_left = parseInt(document.getElementById('navigationHolder').offsetLeft) + sub_left_adjuster;
	var sub_nav_top = parseInt(passed_top_nav.offsetTop) + sub_top_adjuster;
	
	sub_nav_to_show = eval('document.getElementById("nav_sub' + sub_ID + '")');
	sub_nav_to_show.style.left = sub_nav_left
	sub_nav_to_show.style.top = sub_nav_top
	sub_nav_to_show.style.display='';
	//window.event.cancelBubble = true;

}

function hide_current_sub_nav() {

	if (typeof sub_nav_to_show == 'object') {
		 sub_nav_to_show.style.display='none';	
	}

}

function checkNavigation() {
						
		if (typeof sub_nav_to_show == 'object') {
		    					
				eDOffSL = parseInt(sub_nav_to_show.offsetLeft);
				eDOffSW = parseInt(sub_nav_to_show.offsetWidth);					
				eDOffSH = parseInt(sub_nav_to_show.offsetHeight);
				eDOffST = parseInt(sub_nav_to_show.offsetTop);				
				scrollAmount = parseInt(document.body.scrollTop);
				
				if ((window.event.x < (eDOffSL - sub_left_adjuster)) || (window.event.x > ((eDOffSL + eDOffSW) + sub_top_adjuster)) || ((window.event.y + scrollAmount) > ((eDOffST + eDOffSH) - 1)) || ((window.event.y + scrollAmount) < eDOffST)) {
				    
				  hide_current_sub_nav()
						
				}															
		}
}

//Show/Collapse JavaScript
var old_div;
var new_div;

function swap_div(passed_div_name) {

	old_div = eval("document.getElementById(\"" + passed_div_name + "\");");
	new_div = eval("document.getElementById(\"" + passed_div_name + "_over\");");
	
	old_div.style.display='none';
	new_div.style.display='';
	new_div.style.cursor='hand';

}

function reverse_swap() {
	
	new_div.style.display='none';
	old_div.style.display='';
	old_div.style.cursor='auto';
	
}

function disp_or_hide(passed_section) {

  section_row = eval('document.getElementById("' + passed_section + '");');
  arrow_up_div = eval('document.getElementById("' + passed_section + '_arrow_up");');
  arrow_down_div = eval('document.getElementById("' + passed_section + '_arrow_down");');
  				
  if (section_row.style.display == "none") {
  
  	 section_row.style.display = "";
  	 arrow_up_div.style.display = "";
  	 arrow_down_div.style.display = "none";					 
  
  }
  else {
  
  	 section_row.style.display = "none";
  	 arrow_up_div.style.display = "none";
  	 arrow_down_div.style.display = "";	
  
  }

}

function disp_or_hide_special(passed_section) {
			
  var arrow_down_div_obj = eval('document.getElementById("' + passed_section + '_arrow_down");');
  var arrow_up_div_obj = eval('document.getElementById("' + passed_section + '_arrow_up");');
  var text_div_obj = eval('document.getElementById("' + passed_section + '_text");');
  var padding_row_obj = eval('document.getElementById("padding_tr");');
  				
  if (arrow_down_div_obj.style.display == '') {
  
   arrow_down_div_obj.style.display = 'none';
   arrow_up_div_obj.style.display = '';
   text_div_obj.style.display = '';
   
  }
  else {
   
   arrow_up_div_obj.style.display = 'none';
   arrow_down_div_obj.style.display = '';
   text_div_obj.style.display = 'none';
   
  }
  
  if ((document.getElementById("more_info_text").style.display=='none') && (document.getElementById("tech_term_text").style.display=='none')) {
  
  		 padding_row_obj.style.display = 'none';
  
  }
  else {
  
   padding_row_obj.style.display = '';
   
  }


}
