
//   Preload the swap images
pimage1 = new Image();
pimage2 = new Image();
pimage1.src = "/images/pointer.gif";
pimage2.src = "/images/space.gif";

mainnavmenu = new Array(
	// first column: menu item indentation level (0=no item (vertical space); 1..n=indentation level number)
	// second column: HTML code for the menu item
	// third column: href string for the menu item
	// (note: second and third column should not be present for menu items with indentation level 0)
	1, "Home",				"/",
	0,
	1, "People", 				"/people/",
	2,   "Faculty", 			"/faculty.html",
	2,   "Graduate Students",		"/gradstudents.html",
	2,   "Past Graduates", 			"/pastgraduates.html",
	//2,   "Staff",				"/staff.html",
	0,
	1, "Research",				"",
	2,   "Heartrate Detection",		"/projects/heartratedetection/",
	2,   "Speaker Separation",		"/projects/speakerseparation/",
	//2,   "Cell Signaling",			"http://students.washington.edu/jfkeane/CellSystems.html",
	2,   "Speech Enhancement",		"/people/bradgillespie/speech_enhancement.html",
	2,   "Audio Codec",			"/projects/audiocodec/",
	2,   "Whale Identification",		"/projects/whaleidentification/",
	0,
	1, "Publications",			"/publications.html",
	0,
	1, "Resources",				"",
	2,   "Modulation Tutorial",		"/projects/icassptutorial/",
	2,   "Modulation Toolbox",		"/projects/modulationtoolbox",
	0,
	1, "Courses",				"",
	2,   "by Prof. Les Atlas",		"/courses.html",
	0,
	1, "Related groups at UW",		"",
	2,   "SSLI lab",			"http://ssli.ee.washington.edu/",
	2,   "Information Design",		"http://idl.ee.washington.edu/",
	2,   "Data Compression",		"http://dcl.ee.washington.edu/",
	2,   "Biorobotics",			"http://brl.ee.washington.edu/",
	2,   "Radar Remote Sensing",		"http://rrsl.ee.washington.edu/",
	2,   "Other UW EE labs",		"http://www.ee.washington.edu/research/labs.html"
);

// Functions used to move the pointer around the page
function navselect(image_name)
{
  window.document.images[image_name].src = "/images/pointer.gif";
}
function navunselect(image_name)
{
  window.document.images[image_name].src = "/images/space.gif";
}

//   Determine the current path (necessary for sub-listings)
current_path = self.location.pathname;

function writenavmenu(navmenu) {
  idx = 0;
  menunr = 100;
  submenunr = 1;
  last = navmenu.length;
  while (idx < last) {
    if (navmenu[idx] == 0) {
      document.writeln('<br>');
      menunr = menunr + 100;
      submenunr = 1;
      idx = idx + 1;
    }
    else {
      // write spacer image
      if (navmenu[idx] > 1) {
        document.writeln('<img src="/images/space.gif" width=' + (10*(navmenu[idx]-1)) + ' height=13 border=0>');
      } 
      // write space/pointer image
      document.writeln('<img src="/images/space.gif" width=10 height=13 border=0 name="nav' + (menunr+submenunr) + '">');
      if (navmenu[idx+2] == "") {
        document.writeln(navmenu[idx+1] + '<br>');
      }
      else {
	link = navmenu[idx+2];
	if (link.substring(0,1)=="/") {
	  link = ISDL_ROOT + link;
	}
        document.write('<a href="' + link + '" ');
        document.write('onMouseOver="navselect(\'nav' + (menunr+submenunr) + '\');" ');
        document.write('onMouseOut="navunselect(\'nav' + (menunr+submenunr) + '\');">');
        document.write(navmenu[idx+1]);
        document.writeln('</a><br>');
      }

      submenunr = submenunr + 1;
      idx = idx + 3;
    }
  }
}

document.writeln('<p>');
writenavmenu(mainnavmenu);
document.writeln('</p>');
