// JavaScript Document

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function toggleDisplay (id){
	if (document.getElementById) {
		var mydiv = document.getElementById(id);
		if(mydiv){
			var displayType = mydiv.style.display;
		}
		
		// Close all
		var menu = document.getElementById('menu').getElementsByTagName("ul");
		if(menu){
			for(var i=0; i < menu.length; i++){
				menu[i].style.display = 'none';
				
				if(menu[i].parentNode.firstChild){
					menu[i].parentNode.firstChild.className = '';
				}
			}
		}

		if(mydiv){
				switch(displayType){
				case 'none':
					mydiv.style.display = 'block';
					mydiv.parentNode.firstChild.className = 'active';	
				break;
				case 'block':
					mydiv.style.display = 'none';
					mydiv.parentNode.firstChild.className = '';
					mydiv.className = '';
				break;
				default:
					mydiv.style.display = 'block';
					mydiv.parentNode.firstChild.className = 'active';
			}
		}
	}
}

function toggleDisplay2 (id){
	if (document.getElementById) {
		var mydiv = document.getElementById(id);
		if(mydiv){
			var displayType = mydiv.style.display;
		}
		
		// Close all
		var menu = document.getElementById('menu2').getElementsByTagName("ul");
		if(menu){
			for(var i=0; i < menu.length; i++){
				menu[i].style.display = 'none';
				
				if(menu[i].parentNode.firstChild){
					menu[i].parentNode.firstChild.className = '';
				}
			}
		}

		if(mydiv){
				switch(displayType){
				case 'none':
					mydiv.style.display = 'block';
					mydiv.parentNode.firstChild.className = 'active';	
				break;
				case 'block':
					mydiv.style.display = 'none';
					mydiv.parentNode.firstChild.className = '';
					mydiv.className = '';
				break;
				default:
					mydiv.style.display = 'block';
					mydiv.parentNode.firstChild.className = 'active';
			}
		}
	}
}

function toggleDisplay3 (id){
	if (document.getElementById) {
		var mydiv = document.getElementById(id);
		if(mydiv){
			var displayType = mydiv.style.display;
		}
		
		// Close all
		var menu = document.getElementById('menu3').getElementsByTagName("ul");
		if(menu){
			for(var i=0; i < menu.length; i++){
				menu[i].style.display = 'none';
				
				if(menu[i].parentNode.firstChild){
					menu[i].parentNode.firstChild.className = '';
				}
			}
		}

		if(mydiv){
				switch(displayType){
				case 'none':
					mydiv.style.display = 'block';
					mydiv.parentNode.firstChild.className = 'active';	
				break;
				case 'block':
					mydiv.style.display = 'none';
					mydiv.parentNode.firstChild.className = '';
					mydiv.className = '';
				break;
				default:
					mydiv.style.display = 'block';
					mydiv.parentNode.firstChild.className = 'active';
			}
		}
	}
}