// EAN			--------	This script has been developed only for Internet Explorer (manager request)

function menu(){
	var page_title = document.title;
	var index_1 = page_title.indexOf("Equipment >");
	var string1 = page_title.substring(index_1);
	index1 = string1.indexOf(">");
	string1 = string1.substring(index1 + 2);
	index1 = string1.indexOf(">");
	var focus_btnID = string1.substring(0, index1-1);
	var focus_btn;
	//alert(focus_btnID);
	
	

	var menu = document.getElementById("equip_menu");
	var nb_options = menu.childNodes.length ;		//the indication EQUIPMENT(id="page_indicator") is not part of the first menu
	
	
	
	//default settings
	for(var i = 0 ; i < nb_options ; i++){
		if( (menu.childNodes[i].getAttribute("id")).indexOf(focus_btnID) >= 0 ){
			focus_btn = menu.childNodes[i];
			focus_btn.style.backgroundColor = "orange";
		}
	}
	
	
	
	
	
	

	//alert(nb_options);
	for(var i = 0 ; i < nb_options ; i++){
		if( (menu.childNodes[i].getAttribute("id")).indexOf("page_indicator")< 0){	//the indicator is excluder
		
			menu.childNodes[i].onmouseover = function(){
				if( this != focus_btn ){
					this.style.backgroundColor = "orange";
					this.style.cursor = "pointer";
				}
				else if( this == focus_btn ){
					this.style.cursor = "default";
				}
			}
			
			menu.childNodes[i].onmouseout = function(){
				if( this != focus_btn ){
					this.style.backgroundColor = "Transparent";
					this.style.cursor = "default";
				}
			}	
			
			menu.childNodes[i].onclick = function(){
				var direction;
				switch( this.getAttribute("id") ){
					case "Equipment_Ergoline": 		direction = this.getAttribute("id") + "_Prestige_990.html";		break;
					case "Equipment_SunDash": 		direction = this.getAttribute("id") + "_Radius_252.html";		break;
					case "Equipment_SunCapsule":	direction = "Equipment_SunCapsule.html";						break;
					case "Equipment_UsedEquipment":	direction = "Equipment_UsedEquipment.html";								break;
				}
				
				if( this != focus_btn )
				document.location.href = direction;
			}//---- end onclick
			
		
		}//---end if
	}//----- end for
	
}
