<!--
function init(e)
{
  activateMenu('nav');
  externalLinks();
  setFocus();
}

// fix IE's non-support of hover on elements other than "a"
// for the multi-level dropdowns
activateMenu = function(nav) 
{
	if(document.all && document.getElementById(nav).currentStyle)
	{
	  // only MSIE supports document.all
    var navroot = document.getElementById(nav);

    /* Get all the list items within the menu */
    var lis=navroot.getElementsByTagName("LI");
    for(i=0;i<lis.length;i++)
    {
      /* If the LI has another menu level */
      if(lis[i].lastChild.tagName=="UL")
      {
        /* assign the function to the LI */
        lis[i].onmouseover=function()
        {
          /* display the inner menu */
          this.lastChild.style.display="block";
        }
        lis[i].onmouseout=function()
        {
          this.lastChild.style.display="none";
        }
      }
    }
  } // end if IE/Win
} // end activateMenu

// Target attribute is not allowed under xhtml "strict"
// use rel="external" in links to open new window
// (courtesy SitePoint.com)
function externalLinks()
{
  if (!document.getElementsByTagName) { return; }
  var anchors = document.getElementsByTagName("a");
  for (var i=0; i<anchors.length; i++)
  {
    var anchor = anchors[i];
    if (anchor.getAttribute("href") &&
        anchor.getAttribute("rel") == "external")
    {
      anchor.target = "_blank";
    }  // end if
  }  // end for
}  // end externalLinks

// set the entry focus to the first blank 
// in the first form displayed
function setFocus()
{
  if(document.forms[0])
  {
    var el = document.forms[0].elements[0];
    //document.write(el.type+"<br />\n");  // DEBUG
    if(el.type == "text" || el.type == "textarea")
    {
      el.focus();
    }
  }
} // end setFocus

window.onload = init;

// tell about the search functionality
function aboutSearch()
{
  msg = "HOW TO SEARCH: Enter any number of keywords separated by spaces; the more words, the narrower the search (fewer items you will find); to exclude specific words, prefix the word with a minus sign (hyphen) such as '-word'.";
  alert(msg);
}

//-->
