var ie4 = (document.all)    ? 1 : 0;
var nn4 = (document.layers) ? 1 : 0;
bOK = (ie4) || (nn4);

function EM(name,user,addr) {
	if (name == null) alert("must specify at least the name!");
	if (user == null) user = name;
	if (addr == null) addr = "neurovia.umn.edu";
	return("<a HREF=mailto:" + user + "@" + addr + ">" + name + "</a>");
}
function PR(str) {
	window.document.writeln(str);
}
function _nva_print_cell(state,name,link,caption,sel) {
	if (name == sel) { window.document.writeln(
		"<td BGCOLOR=gray>");
	} else if (state == 0) { window.document.writeln(
		"<td BGCOLOR=maroon>");
	} else { window.document.writeln(
		"<td BGCOLOR=gold>");
	}
	window.document.writeln(
		 "<table BORDER=0 CELLSPACING=0 CELLPADDING=2><tr><td ALIGN=center>");
	if (name == sel) {
		if (state == 0) { window.document.writeln(
		  "<div CLASS=gold><b>" + caption + "</b></div>") }
		else { window.document.writeln(
		  "<div CLASS=maroon><b>" + caption + "</b></div>") }
	} else if (state == 0) { window.document.writeln(
		  '<a HREF="', link, '"><div CLASS=gold><b>', caption, "</b></div></a>");
	} else {  window.document.writeln(
		  '<a HREF="', link, '"><div CLASS=maroon><b>', caption, "</b></div></a>");
	}
	window.document.writeln(
		 "</td></tr></table>",
		"</td>");
}
function _nva_start_row() {
	window.document.writeln("<tr><td><table BORDER=0 ALIGN=center CELLPADDING=2 CELLSPACING=0><tr ALIGN=center>\n");
}
function _nva_spacer_cell() {
	window.document.writeln("<td WIDTH=5></td>");
}
function _nva_end_row() {
	window.document.writeln("</tr></table></td></tr>");
}

function _nva_blank_row() {
	window.document.writeln("<tr><td HEIGHT=5></td></tr>");
}

function nva_header(which) {
window.document.writeln(
"<table ALIGN=center WIDTH=800 CELLPADDING=0 CELLSPACING=0>",
  '<tr><td ALIGN=center><img SRC=/title.gif ALT="NeuroViA"><td><tr>',
  '<tr><td><img SRC=/images/transparent.gif HEIGHT=4 ALT=""></td></tr>',
"</table>");

_nva_start_row();
_nva_print_cell(0,"neurovia","/neurovia.html","NeuroVia",which);
_nva_spacer_cell();
_nva_print_cell(1,"inc","/incweb/","Human Brain Project<br>INC Website",which);
_nva_spacer_cell();
_nva_print_cell(0,"conformal","/conformal/","Conformal Mapping and <br> Scientific Visualization",which);
_nva_spacer_cell();
_nva_print_cell(1,"trials","/parkinsons/Parkinsons.html","Clinical Trials",which);
_nva_end_row();

_nva_start_row();
_nva_blank_row();
_nva_end_row();

_nva_start_row();
_nva_print_cell(0,"personnel","/personnel.html","Personnel",which);
_nva_spacer_cell();
_nva_print_cell(1,"comments","/comments.html","Comments",which);
_nva_spacer_cell();
_nva_print_cell(0,"search","/search.html","Search",which);
_nva_end_row();

window.document.writeln(
"</table>",
"<hr ALIGN=center WIDTH=800>");
};

function nva_footer() {
date = new Date();
mod = new Date(document.lastModified);
var modDate = (mod.getMonth() + 1) + "/" + mod.getDate() + "/" + mod.getFullYear();
var thisYear =  date.getFullYear();
window.document.writeln(
"<hr ALIGN=center WIDTH=800>",
"<table ALIGN=center WIDTH=800 CELLPADDING=0 CELLSPACING=0><tr>",
	"<td ALIGN=left VALIGN=bottom WIDTH=30%><font SIZE=-2>",
		"&copy; " + thisYear + " <a HREF=\"/neurovia.html\">NeuroVia Lab</a><br>",
		"<a HREF=\"mailto:webmaster@neurovia.umn.edu\">webmaster@neurovia.umn.edu</a><br>",
		"Last modified: " + modDate,
	"</font></td>",
	"<td ALIGN=center VALIGN=middle WIDTH=40%>",
		"<table CELLPADDING=0 CELLSPACING=0><tr>",
		"<td><font SIZE=-1><b><a HREF=\"/neurovia.html\">HOME</a></b></font></td>",
		"<td><font SIZE=-1>&nbsp;|&nbsp;</font></td>",
		"<td><font SIZE=-1><b><a HREF=\"/search.html\">SEARCH</a></b></font></td>",
		"<td><font SIZE=-1>&nbsp;|&nbsp;</font></td>",
		"<td><font SIZE=-1><b><a HREF=\"/personnel.html\">CONTACT</a></b></font></td>",
		"</tr></table>",
		"<table CELLPADDING=0 CELLSPACING=0><tr>",
		"<td><font SIZE=-1><b><a HREF=\"/sitemap_nva.html\">SITEMAP</a></b></font></td>",
		"<td><font SIZE=-1>&nbsp;|&nbsp;</font></td>",
		"<td><font SIZE=-1><b><a HREF=\"/calendar_login.html\"\ target=new>CALENDAR</a></b></font></td>",
		"</tr></table>",
	"</td>",
	"<td ALIGN=right VALIGN=bottom WIDTH=30%><font SIZE=-2>",
		"The University of Minnesota is an<br>equal opportunity educator and employer.",
	"</font></td>",
 "</tr></table>");
};

function _clinic_print_cell(state,name,link,caption,sel) {
	if (name == sel) {
		window.document.writeln("<tr><td BGCOLOR=lightgrey>");
	} else if (state == 0) {
		window.document.writeln("<tr><td BGCOLOR=maroon>");
	} else {
		window.document.writeln("<tr><td BGCOLOR=gold>");
	}
	if (name == sel) {
		window.document.writeln(
		" <table BORDER=0 CELLSPACING=0 CELLPADDING=2><tr><td ALIGN=center>",
		"  <a HREF=\"" + link + "\">",
		"  <font color=maroon><b>" + caption + "</b></font></a>",
		" </td></tr></table>",
		"</td></tr>");	
	} else if (state == 0) { 
		window.document.writeln(
		" <table BORDER=0 CELLSPACING=0 CELLPADDING=2><tr><td ALIGN=center>",
		"  <a HREF=\"" + link + "\">",
		"  <font color=gold><b>" + caption + "</b></font></a>",
		" </td></tr></table>",
		"</td></tr>");
	} else {  
		window.document.writeln(
		" <table BORDER=0 CELLSPACING=0 CELLPADDING=2><tr><td ALIGN=center>",
		"  <a HREF=\"" + link + "\">",
		"  <font color=maroon><b>" + caption + "</b></font></a>",
		" </td></tr></table>",
		"</td></tr>");
	}
}


function clinic_menu(which) {
window.document.writeln(

"<TABLE ALIGN=left cellpadding=2 cellspacing=3 border=0 width=15%>",
"<TR><TD valign=center align=center nowrap><FONT size=+1 color=#0000A0><B><I>",
"</I></B></FONT></TD></TR>");

_clinic_print_cell(0,"clinic_home","Parkinsons_new.html","Clinic Home",which);
_clinic_print_cell(1,"introduction","introduction.html","About Us",which);
_clinic_print_cell(0,"trials","trials.html","Clinical Trials",which);
_clinic_print_cell(1,"maps","maps.html","Directions",which);
_clinic_print_cell(0,"personnel","personnel.html","Contact Us",which);
_clinic_print_cell(1,"links","","Helpful Resources",which);

window.document.writeln(
"</table>");
};












