function navbar() {
	document.write("<div id=\"navcontainer\"><ul id=\"navlist\">");
	document.write("<li><a href=\"index.html\">Home</a></li>");
	document.write("<li><a href=\"publications.html\">Publications</a></li>");
	// document.write("<li><a href=\"personal.html\">Personal</a></li>");
	document.write("<li><a href=\"misc.html\">Misc &amp; Other</a></li>");
	document.write("</ul></div>");
}

function readFile(url) {
    if (typeof(url) == "undefined")
        return "<could not read file>";
    var p,rnd;
    if (document.all) {
        // For IE, create an ActiveX Object instance 
        p = new ActiveXObject("Microsoft.XMLHTTP");
    } else {
        // For mozilla, create an instance of XMLHttpRequest.
        p = new XMLHttpRequest();
    }
    // Prevent browsers from caching the included page
    // by appending a random  number
    rnd = Math.random().toString().substring(2);
    url = url.indexOf('?')>-1 ? url+'&rnd='+rnd : url+'?rnd='+rnd;
    // Open the url and write out the response
    p.open("GET",url,false);
    p.send(null);
    return p.responseText;
}

function publilinks(publikey) {
	document.write("<span class=\"publilink\">[ ");
	document.write("<a href=\"publis/" + publikey + ".abstract\" onMouseOver=\"showPopup('" + publikey + "Popup', event);\" onMouseOut=\"hideCurrentPopup();\">abstract</a>");
	document.write(" | ");
	document.write("<a href=\"publis/" + publikey + ".pdf\">paper</a>");
	document.write(" | ");
	
	if( arguments.length > 2 ) {
		nextInd = 1;
		do {
			supplName = arguments[ nextInd++ ];
			supplURL = arguments[ nextInd++ ];
			document.write("<a href=\"publis/" + supplURL + "\">" +  supplName + "</a>");
			document.write(" | ");
		} while( arguments.length > nextInd + 1 );
	}
	document.write("<a href=\"publis/" + publikey + ".bib\">bibtex</a>");
	document.write(" ]</span>");
	abstractStr = readFile("publis/" + publikey + ".abstract").replace(/[\n\r]/g, "<br>");;
	document.write("<div onclick='event.cancelBubble = true;' class=popup id=\"" + publikey + "Popup\">" + abstractStr + "<br/><br/><i>(click the link for text version)</i></div>");
}
