// HEADER1.JS - function definitions for the Arts Access HEADER.HTML, updated 9/28/06
function MOver(owner, color) {
  owner.style.cursor = 'hand'
  owner.style.backgroundColor = color;
  owner.children.tags('A')[0].style.color = 'white';
}
function MOut(owner) {
  owner.style.backgroundColor = 'black';
  owner.children.tags('A')[0].style.color = 'white';
}
function MClick(url) {
  location.href=url;
}
function NavLink1(name,location,color,title) { // Build link with mouseover based on color scheme, but freeze color if we are on location page
  myloc = " " + window.location;
  x = myloc.lastIndexOf('#') // remove bookmarks
  if (x>0) { myloc = myloc.substr(0,x) }
  myfile = myloc.substring(myloc.length-location.length);
  document.write('<td class="nav1" align="center" ');
  if (myfile==location) {
    document.write('style="background-color: ' + color + '">');
    linkcolor = color; // save to pass to affected page;
  }
  else {
    document.write('onmouseover="MOver(this, \'' + color + '\')" ');
    document.write('onmouseout="MOut(this)" ');
    document.write('onclick="MClick(\'' + location + '\')">');
  }
  document.write('<a class="nav1" href="' + location + '"' + ' title="' + title + '">' + name + '</a></td>');
}  
// PROBLEM:  FireFox and Netscape not honoring style.color in TD, so work around by leaving it unchanged
// Note choice of GREEN as background for secondary menus -- do not use in primary menus!
function MOver2(owner, color) {
  owner.style.cursor = 'hand';
  owner.style.backgroundColor = 'green';
  owner.children.tags('A')[0].style.color = 'white';
}
function MOut2(owner) {
  owner.style.backgroundColor = linkcolor;
  owner.children.tags('A')[0].style.color = 'white';
}
// 9/24 added id=nav2a
function NavLink2(name,location) { // Build secondary (page level) navigation links and used saved color scheme
  document.write('<td class="nav2" align="center" valign="top" ');
  document.write('style="background-color: ' + linkcolor + '" ')
  document.write('onmouseover="MOver2(this, \'' + linkcolor + '\')" ');
  document.write('onmouseout="MOut2(this)" ');
  document.write('onclick="MClick(\'' + location + '\')">');
  document.write('<a id="nav2a" class="nav2" href="' + location + '">' + name + '</a></td>');
}
linkcolor = "#666666" // set default linkcolor so this works within FrontPage and on non-primary pages
