if(!main){
	var main=0;
}
if(!sub){
	var sub=0;
}
if(!login){
	var login=0;
}
titles=new Array("About ARES","Staff and Students","Current Projects","Recent Publications","Facilities and Equipment","Numerical Simulations");
pages=new Array("ARES","People","Projects","Publications","Facilities","Simulations");
links=new Array("index.htm","people.htm","projects.htm","publications.htm","facilities.htm","simulations.htm");
colors=new Array("9999ff","99cc99","cc99cc","cccc99","cc9999","cc9999");
acolors=new Array("6666cc","669999","669966","999966","996666","cc9999");
thecolor="";
var bgc="aaaaaa";
for(i=0;i<=4;i++){
	if(i!=main){
		acolors[i]="";
	}else{
		acolors[i]="BGCOLOR="+colors[i];
		thecolor="BGCOLOR="+colors[i];
	}
}
if(main==0){
	subpages=new Array("Home","People","Sponsors");
	sublinks=new Array("/cgi-bin/index.pl?index.htm","/cgi-bin/index.pl?people.htm","/cgi-bin/index.pl?sponsors.htm");
}
if(main==1){
	subpages=new Array("About Resources","Presentations","Papers");
	sublinks=new Array("/cgi-bin/index.pl?index1.htm","/cgi-bin/index.pl?presentations.htm","/cgi-bin/index.pl?papers.htm");
}
if(main==2){
	subpages=new Array("Message Board","New User","Moderators");
	sublinks=new Array("/ddboard/cgi-bin/ddboard_index.pl","/newuser.pl","/cgi-bin/index.pl?moderator.htm");
}
if(main==3){
	subpages=new Array("About the Database","Locations","Login");
	sublinks=new Array("/cgi-bin/index.pl?index3.htm","/cgi-bin/index.pl?locations.htm","/cgi-bin/index.pl?login.htm");
}
if(main==4){
	subpages=new Array("Contact","Technical","Suggestions");
	sublinks=new Array("/cgi-bin/index.pl?index4.htm","/cgi-bin/index.pl?technical.htm","/cgi-bin/index.pl?suggestions.htm");
}
var user="";
var userb="";

var menub="<CENTER>"+
	"<TABLE HEIGHT=100% WIDTH=800 CELLPADDING=0 CELLSPACING=0 BORDER=0>"+
	"<TR HEIGHT=20><TD></TD></TR>"+
	"<TR HEIGHT=200><TD>"+
	"<TABLE HEIGHT=200  WIDTH=800  CELLPADDING=0 CELLSPACING=0 BORDER=0><TR>"+
	"<TD WIDTH=400 HEIGHT=200 BACKGROUND=images/ares.gif></TD><TD WIDTH=400 BACKGROUND=images/topright"+main+".gif></TD>"+
	"</TR></TABLE>"+
	"</TD></TR>"+
	"<TR HEIGHT=20><TD></TD></TR>"+
	"<TR><TD BACKGROUND=images/topbot.gif HEIGHT=30><TABLE HEIGHT=30 WIDTH=800 CELLPADDING=3><TR>"+
	"<TD></TD><TD VALIGN=TOP WIDTH=400><FONT style=\"font-size:20px; font-weight:bold; color:#ffffff;\">"+titles[main]+"</FONT></TD>"+
	"<TD><A HREF="+links[0]+">"+pages[0]+"</A></TD><TD>|</TD>"+
	"<TD><A HREF="+links[1]+">"+pages[1]+"</A></TD><TD>|</TD>"+
	"<TD><A HREF="+links[2]+">"+pages[2]+"</A></TD><TD>|</TD>"+
	"<TD><A HREF="+links[3]+">"+pages[3]+"</A></TD><TD>|</TD>"+
	"<TD><A HREF="+links[4]+">"+pages[4]+"</A></TD><TD>|</TD>"+
	"<TD><A HREF="+links[5]+">"+pages[5]+"</A></TD>"+
				
	"</TR></TABLE></TD></TR>"+
	"<TR BGCOLOR=ffffff  style=\"background-repeat: no-repeat;\"><TD VALIGN=TOP>"+
	"<TABLE WIDTH=800 CELLPADDING=0 CELLSPACING=0 BORDER=0><TR><TD VALIGN=TOP>"+
	""+
	""+
	""+
	""+
	""+
	""+
	"";

document.write(menub);
