// EAN
function submenu_section_control(){
	var menu = document.getElementById("submenu_section");
	var nb_options = menu.childNodes.length;
	
	//default settings
	var subsection_focus_button = document.title;
	var sub_button_number_index = subsection_focus_button.lastIndexOf("> ") + 2;
	var sub_button_number = subsection_focus_button.substring(sub_button_number_index);
	var sub_buttonFocus;
	
	
	//alert("--"+ sub_button_number +"--");
	
	
	//highlight the subsection button when the page loads
	for(var i = 0 ; i < nb_options ; i++){
		if( (menu.childNodes[i].getAttribute("id")).indexOf(sub_button_number) >= 0 ){
			//alert(menu.childNodes[i].getAttribute("id"));
			sub_buttonFocus = menu.childNodes[i];
			
			sub_buttonFocus.style.cursor = "pointer";
			sub_buttonFocus.style.textDecoration = "underline";
			sub_buttonFocus.style.color = "orange";
		}//--- end if
	}//--- end for
	
	
	
	
	for(var i = 0 ; i < nb_options ; i++){
		if(menu.childNodes[i].getAttribute("id") != "section_name"){
			menu.childNodes[i].onmouseover = function(){
				if(this != sub_buttonFocus){
					this.style.cursor = "pointer";
					this.style.textDecoration = "underline";
					this.style.color = "orange";
				}
				else if(this == sub_buttonFocus){
					this.style.cursor = "default";
				}
			}

			menu.childNodes[i].onmouseout = function(){
				if(this != sub_buttonFocus){
					this.style.cursor = "default";
					this.style.textDecoration = "none";
					this.style.color = "#F6F4DF";
				}
			}
			
			menu.childNodes[i].onclick = function(){
				var direction = this.getAttribute("id") + ".html";
				document.location.href = direction;
			}
		}//--- end if
	}//---- end for
	
}