// MSR 2007-10-05:
// Removed check for dept_name = "Navigation Name 10" as the name may be different
// Added FEATURE BEGIN and FEATURE END comments
// Added comments
function draw_leaf_tree(){
	var base_dept="10";
	var passed_base=false;
	
	// If the leaf_tree array exists and it has elements...
	if ((typeof(leaf_tree)!="nothing")&&(leaf_tree.length>0)){
	
		// Loop through the array backwards
		for (i=leaf_tree.length-1;i>=0;i--){
		
			// If we're past the base department...
			if (passed_base){

				//seperator - getting here only after 2 levels deep to created bullet
				document.write("<span class=\"leaftreespacer\">&nbsp;&raquo;&nbsp;</span>");
				
				// set class variable depending on if it's the last link in the tree or not.
				var tmpClass = (i == 0)? "leaftree2" : "leaftree";
				
				//link and name
				document.write("<a href=\"" + leaf_tree[i].dept_link + "\" CLASS=\"" + tmpClass + "\">" + leaf_tree[i].dept_name + "<\/a>");
				
			}else{
			
				// If we're on the base department...
				if (leaf_tree[i].dept_id==base_dept){
				
					passed_base=true;
					//HOME link and HOME name
					document.write("<a href=\"default.asp\" class=\"leaftree\" onClick=\"return(visitargs('default.asp','','URL'));\">Home<\/a>");
					
				} //end if
			} //end if
		} // end for
	}// end if
} // end function