    var footnote;
    
    //	Pop up a footnote window

    function popWin(href) {
        if (footnote == null || footnote.closed) {
            footnote = window.open(href, "footnote",
	    	"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=350,height=300")
        } else { 
            if (navigator.appName.substring(0.8) == "Netscape") {
                footnote.location.href = href;
                footnote.focus();
            } else {
                footnote = window.open(href, "footnote",
		    "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=350,height=300")
            }
        }
        footnote.focus();
    }
    
    //	Display a footnote when its link is clicked

    function footOver(which) {
        top.defaultStatus = "Displaying footnote";
        popWin("f/" + which + ".html");
    }
    
    //	Set the current chapter in the navigation sidebar

    function setChapter(which) {
    	//  Clear any currently highlighted chapter
	var anchors = parent.chapters.document.getElementsByTagName("a");
	for (var i = 0; i < anchors.length; i++) {
    	    var a = anchors[i];
	    a.style.textDecoration = "none";
	    a.style.fontVariant = "normal";
	}
	
	//  Highlight the active chapter
	var el = parent.chapters.document.getElementById(which);
	el.style.textDecoration = "underline";
	el.style.fontVariant = "small-caps";
    }

