ASD.setHighlightLeftNav = function() {
    if($('navigation-specialization') || $('navigation-degreetype')) {
	var spec = $('navigation-specialization').innerHTML;
	var deg = $('navigation-degreetype').innerHTML;
	var urlPath = ASD.getPathToHighlight(deg,spec);
	if(urlPath!="") {
	    // look for it in the anchor links
	    var links = $$('.asd .left-nav a');
	    if(links.size()>0) {
		// all left-nav links
		var found = false;
		links.each(function(item) {
		    if(!found && item.href.include(urlPath)) {
			item.up().id = "selected";
			found = true;
		    }
		});
	    }
	}
    }
}

// get hidden UL elements, make their LI parent clickable
document.observe("dom:loaded", function() {
    var hiddenNavSections = $$("div.left-nav ul li ul");
    if(hiddenNavSections) {
	hiddenNavSections.each( function(index) {
	    var parent = index.up("li",0);
	    var child = index;
	    if(child.style.display!="block") {
		// if the child hasn't been opened yet, set the default to none
		child.style.display = "none";
	    }
	    Event.observe(parent, 'click', function(event) {
		var clickPosX = Event.pointerX(event);
		var obj = event.element();
		var pos = obj.cumulativeOffset();
		var clickedWidth = clickPosX - pos.left;
		var threshold = parent.hasClassName("selected") ? 18:30;
		if(clickedWidth<threshold){
		    Event.stop(event);
		    parent.toggleClassName("selected");
		    // sadly, have to do this...Prototype can not toggle()
		    // when CSS controls display
		    if(child.style.display == "none")
			child.style.display = "block";
		    else
			child.style.display = "none";
		}
	    });
	});
    };
});