var currentSection = location.pathname.split("/")[location.pathname.split("/").length - 1].replace(/\.html/, ""),
	sections = new Array();

function hiLite(image) {
	if ( !mac && ie4 ) document.images[image].style.borderColor =  "#FFCC00";
	Show(image + '_text', top.info);
}

function loLite(image) {
	if ( !mac && ie4 ) document.images[image].style.borderColor = "black";
	Hide(image + '_text', top.info);
}

if (ns4) {
	document.classes.notes.all.top = "25px";
	document.classes.notes.all.left = "8px";
}

function newSection(name, href, target) {
	var index = sections.length;
	sections[index] = new Object();
	sections[index].name = name;
	sections[index].href = href;
	sections[index].target = ( target ) ? target : "thumbs";
}

newSection("print", "print.html");
newSection("web", "web.html");
newSection("misc", "misc.html");
newSection("resume", "../bio", "_top");

function header() {
	var x,
		headerOut = '<div style="width: 559px;"><table border=0 cellpadding=0 cellspacing=5 align="center">\n<tr>';
	for ( x=0; x < sections.length; x++ ) {
		var thisSection = sections[x];
		linkTemplate = ( thisSection.name == currentSection )
			? '	<td class="sectionLinks" width="60">@@name@@</td>'
			: '	<td class="sectionLinks" width="60"><a href="@@href@@" target="@@target@@">@@name@@</a></td>';
		headerOut += linkTemplate.replace(/\@\@href\@\@/gi, thisSection.href).replace(/\@\@name\@\@/gi, thisSection.name).replace(/\@\@target\@\@/gi, thisSection.target);
	}
	headerOut += '</tr>\n</table></div>';
	document.write(headerOut);
}
