
// JavaScript Document


// hides all sub nav, then shows div specified by id

function hideSub(id){
	var parent;
	parent = document.getElementById("primary");
		var children = parent.getElementsByTagName('UL');
		if(children){
			
			for(var i = 0; i < children.length; i++){
				children[i].style.display = 'none';
			}
		}
	if(id){
		showSub(id);
	}
}

function showSub(id){
	if(id == "a"){
	id="a1";
	}
	var parent = document.getElementById(id);
	if(parent){
		var children = parent.getElementsByTagName('UL');
		if(children[0]){
			children[0].style.display = 'block';
		}
	}
		
}

